From 035162bd8dc9bb8a2a8fa3924448e755968380d9 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 5 Jun 2021 20:40:13 +0200 Subject: [PATCH] Fix position weight matrix assignment --- src/preprocessing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/preprocessing.py b/src/preprocessing.py index caf8019..c16a6fa 100644 --- a/src/preprocessing.py +++ b/src/preprocessing.py @@ -22,10 +22,10 @@ def generate_example(sequence, reference_sequence, weight_matrix) -> bytes: "reference_sequence": Feature( int64_list=Int64List(value=list(encode_sequence(reference_sequence))) ), - "A_counts": Feature(float_list=FloatList(value=[weight_matrix["A"][0]])), - "C_counts": Feature(float_list=FloatList(value=[weight_matrix["C"][0]])), - "G_counts": Feature(float_list=FloatList(value=[weight_matrix["G"][0]])), - "T_counts": Feature(float_list=FloatList(value=[weight_matrix["T"][0]])), + "A_counts": Feature(float_list=FloatList(value=weight_matrix["A"])), + "C_counts": Feature(float_list=FloatList(value=weight_matrix["C"])), + "G_counts": Feature(float_list=FloatList(value=weight_matrix["G"])), + "T_counts": Feature(float_list=FloatList(value=weight_matrix["T"])), } example = Example(features=Features(feature=schema)) return example.SerializeToString()