Skip to content

Commit

Permalink
fixed label indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheww95 committed Nov 21, 2024
1 parent a084717 commit ce1b8e6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/report_summaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,7 @@ def key_saver(self, sample_name, keys):
return_values = []
for k in keys:
if k.startswith(sample_name):
sample_name_len = len(sample_name)
if sample_name.endswith(self.__key_delimiter):
# Need to remove the next delimiter as well if the sample
# ends with one. Or else we end up with an empty string inserted
sample_name_len += 1
sample_name_len = len(sample_name) + 1# adding one to the list to get the trailing delimiter that is left behind
split_string = k[sample_name_len:]
sample_keys = [sample_name, *[i for i in split_string.split(self.__key_delimiter)]]
return_values.append(sample_keys)
Expand Down

0 comments on commit ce1b8e6

Please sign in to comment.