Skip to content

Commit

Permalink
Drop leading zeroes of participant ids.
Browse files Browse the repository at this point in the history
  • Loading branch information
donkirkby committed May 17, 2021
1 parent bc67780 commit 4067c08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gene_splicer/study_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ def load_outcome(self, outcome_summary_csv: typing.TextIO):
if participant_id is None:
participant_id = participant_id_guess
self.unmapped_samples.append(sample_key)
participant_counts = self.participant_counts[participant_id]
participant_key = participant_id
try:
# Some participant ids have leading zeroes (sometimes).
participant_key = str(int(participant_id))
except ValueError:
pass
participant_counts = self.participant_counts[participant_key]

for counts in (run_counts, participant_counts):
counts['samples'] += 1
Expand Down Expand Up @@ -251,6 +257,7 @@ def main():
print()
dots_printed = False
print('Missing denovo results:', run_path)
continue
else:
run_gene_splicer(run_path, outcome_path.parent)
assert outcome_path.exists(), outcome_path
Expand Down

0 comments on commit 4067c08

Please sign in to comment.