Skip to content

Commit

Permalink
Raise exception for poorly formatted CRISPRessoPooled input files
Browse files Browse the repository at this point in the history
  • Loading branch information
kclem authored Nov 7, 2024
1 parent fd56e6f commit 94db5fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CRISPResso2/CRISPRessoPooledCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ def main():
with open(args.amplicons_file, 'r') as amplicons_fin:

head_line = amplicons_fin.readline().strip()
if head_line == "":
raise CRISPRessoShared.BadParameterException('Cannot parse header from amplicon file ' + args.amplicons_file)
while head_line[0] == "#": # read past comments
while head_line and head_line[0] == "#": # read past comments
head_line = amplicons_fin.readline()
if not head_line:
raise CRISPRessoShared.BadParameterException('Cannot parse header from amplicon file ' + args.amplicons_file)
header_els = head_line.split('\t')

head_lookup = CRISPRessoShared.get_crispresso_options_lookup("Core") # dict of qwc -> quantification_window_coordinates
Expand Down

0 comments on commit 94db5fc

Please sign in to comment.