Skip to content

Commit

Permalink
better error with missing fasta on bed.gz files
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Feb 2, 2021
1 parent 5681ed6 commit 91d92de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/seqcoverpkg/typeenum.nim
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ proc chromosomes*(c:var Cover, fai:Fai): OrderedTableRef[string, uint32] =
result = c.d4.chromosomes
of CoverType.BED:
result = newOrderedTable[string, uint32]()
if fai == nil:
raise newException(OSError, "--fasta index required when .bed.gz files are given")
for i in 0..<fai.len:
var cname = fai[i]
result[cname] = fai.chrom_len(cname).uint32
Expand Down

0 comments on commit 91d92de

Please sign in to comment.