Fix position weight matrix assignment

This commit is contained in:
coolneng 2021-06-05 20:40:13 +02:00
parent 02d20d4e72
commit 035162bd8d
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 4 additions and 4 deletions

View File

@ -22,10 +22,10 @@ def generate_example(sequence, reference_sequence, weight_matrix) -> bytes:
"reference_sequence": Feature( "reference_sequence": Feature(
int64_list=Int64List(value=list(encode_sequence(reference_sequence))) int64_list=Int64List(value=list(encode_sequence(reference_sequence)))
), ),
"A_counts": Feature(float_list=FloatList(value=[weight_matrix["A"][0]])), "A_counts": Feature(float_list=FloatList(value=weight_matrix["A"])),
"C_counts": Feature(float_list=FloatList(value=[weight_matrix["C"][0]])), "C_counts": Feature(float_list=FloatList(value=weight_matrix["C"])),
"G_counts": Feature(float_list=FloatList(value=[weight_matrix["G"][0]])), "G_counts": Feature(float_list=FloatList(value=weight_matrix["G"])),
"T_counts": Feature(float_list=FloatList(value=[weight_matrix["T"][0]])), "T_counts": Feature(float_list=FloatList(value=weight_matrix["T"])),
} }
example = Example(features=Features(feature=schema)) example = Example(features=Features(feature=schema))
return example.SerializeToString() return example.SerializeToString()