Skip to content

Commit

Permalink
Report error if no fragments (proper pair) can be read from input BAM…
Browse files Browse the repository at this point in the history
…PE file. #584
  • Loading branch information
taoliu committed Aug 14, 2023
1 parent 429f8f8 commit c21e1dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MACS3/IO/Parser.pyx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cython: language_level=3
# cython: profile=True
# cython: linetrace=True
# Time-stamp: <2023-08-02 14:49:59 Tao Liu>
# Time-stamp: <2023-08-14 11:06:50 Tao Liu>

"""Module for all MACS Parser classes for input. Please note that the
parsers are for reading the alignment files ONLY.
Expand Down Expand Up @@ -1344,7 +1344,7 @@ cdef class BAMPEParser(BAMParser):
info( "%d fragments have been read." % i )
#debug( f" {e1} Can't identify the length of entry, it may be the end of file, stop looping..." )
#debug( f" {e2} Chromosome name can't be found which means this entry is skipped ..." )
#assert i > 0, "Something went wrong, no fragment has been read! Check input file!"
assert i > 0, "Something went wrong, no fragment has been read! Check your input files!"
self.d = m / i
self.n = i
#assert self.d >= 0, "Something went wrong (mean fragment size was negative: %d = %d / %d)" % (self.d, m, i)
Expand Down

0 comments on commit c21e1dd

Please sign in to comment.