Skip to content

Commit

Permalink
catching errors during normalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
explodecomputer committed Feb 9, 2021
1 parent f974475 commit f439369
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gwas.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ def read_from_file(

# left align and trim variants
if len(ref) > 1 and len(alt) > 1:
result.normalise(fasta)
try:
result.normalise(fasta)
except Exception as e:
logging.debug("Could not normalise {}: {}".format(s, e))
metadata['VariantsNotHarmonised'] += 1
continue
metadata['NormalisedVariants'] += 1

# add or update dbSNP identifier
Expand Down

0 comments on commit f439369

Please sign in to comment.