Skip to content

Commit

Permalink
fields bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jluebeck committed Mar 21, 2024
1 parent 978f3f9 commit 7c35e26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ampclasslib/amplicon_similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def buildLCDatabase(mappabilityFile):
with open(mappabilityFile) as infile:
for line in infile:
fields = line.rstrip().rsplit()
if not fields:
continue
chrom, s, e = fields[0], int(fields[1]), int(fields[2])
if e - s > 7500:
lcD[chrom].addi(s, e)
Expand Down Expand Up @@ -328,6 +330,8 @@ def bed_to_interval_dict(bedf, add_chr_tag):
with open(bedf) as infile:
for line in infile:
fields = line.rstrip().rsplit()
if not fields:
continue
if add_chr_tag and not fields[0].startswith('chr'):
fields[0] = 'chr' + fields[0]

Expand Down

0 comments on commit 7c35e26

Please sign in to comment.