Skip to content

Commit

Permalink
Fix issue when floating point numbers are present in batch
Browse files Browse the repository at this point in the history
  • Loading branch information
pbashyal-nmdp committed Jan 15, 2025
1 parent c977d06 commit 70b99c4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/pyard-reduce-csv
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ def redux(allele, locus, column_name):
if ":" in allele:
locus_allele = f"{locus}*{allele}"
else:
locus_allele = f"{locus}{allele}" # serology
if allele.isnumeric():
# Serology alleles are all numeric
locus_allele = f"{locus}{allele}" # serology
else:
# Watch out, we may get floats when exported from Excel.
message = f"Failed reducing '{allele}' in column {column_name}"
print(message)
failed_to_reduce_alleles.append((column_name, allele))
return allele

# Check the config if this allele should be reduced
if should_be_reduced(allele, locus_allele):
Expand Down

0 comments on commit 70b99c4

Please sign in to comment.