Bug: MACS3 ZeroDivisionError: float division
bsunbo opened this issue · 2 comments
Hi All,
I am having issue with peak calling for my ATACseq data. Really appreciate for your help!
#macs3 callpeak -f BAMPE -t ATAC_50K_2.sorted_openRegions.bam_openRegions.bam -g hs -n test -B -q 0.01
INFO @ 07 Aug 2023 13:49:10: [52 MB]
Command line: callpeak -f BAMPE -t ATAC_50K_2.sorted_openRegions.bam_openRegions.bam -g hs -n test -B -q 0.01
ARGUMENTS LIST:
name = test
format = BAMPE
ChIP-seq file = ['ATAC_50K_2.sorted_openRegions.bam_openRegions.bam']
control file = None
effective genome size = 2.91e+09
band width = 300
model fold = [5, 50]
qvalue cutoff = 1.00e-02
The maximum gap between significant sites is assigned as the read length/tag size.
The minimum length of peaks is assigned as the predicted fragment length "d".
Larger dataset will be scaled towards smaller dataset.
Range for calculating regional lambda is: 10000 bps
Broad region calling is off
Paired-End mode is on
INFO @ 07 Aug 2023 13:49:10: [52 MB] #1 read fragment files...
INFO @ 07 Aug 2023 13:49:10: [52 MB] #1 read treatment fragments...
INFO @ 07 Aug 2023 13:49:10: [71 MB] 0 fragments have been read.
Traceback (most recent call last):
File "/usr/local/bin/macs3", line 1010, in
main()
File "/usr/local/bin/macs3", line 49, in main
run( args )
File "/home/adduser/.local/lib/python3.10/site-packages/MACS3/Commands/callpeak_cmd.py", line 68, in run
(treat, control) = load_frag_files_options (options)
File "/home/adduser/.local/lib/python3.10/site-packages/MACS3/Commands/callpeak_cmd.py", line 325, in load_frag_files_options
treat = tp.build_petrack()
File "MACS3/IO/Parser.pyx", line 1304, in MACS3.IO.Parser.BAMPEParser.build_petrack
File "MACS3/IO/Parser.pyx", line 1348, in MACS3.IO.Parser.BAMPEParser.build_petrack
ZeroDivisionError: float division
Here is my .bam file info
#samtools flagstat ATAC_50K_2.sorted_openRegions.bam_openRegions.bam
209664 + 0 in total (QC-passed reads + QC-failed reads)
209664 + 0 primary
0 + 0 secondary
0 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
209664 + 0 mapped (100.00% : N/A)
209664 + 0 primary mapped (100.00% : N/A)
209664 + 0 paired in sequencing
104832 + 0 read1
104832 + 0 read2
0 + 0 properly paired (0.00% : N/A)
209664 + 0 with itself and mate mapped
0 + 0 singletons (0.00% : N/A)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)
System (please complete the following information):
- OS: [e.g. Linux, Mac OSX] Linux
- Python version [e.g. 3.7.1] 3.10
- Numpy version [e.g. 1.17.0]1.25.2
- MACS Version [e.g. 2.2.4]3.0.0b3
Additional context
Add any other context about the problem here.
It seems that MACS can't find any 'properly paired reads' since "0 + 0 properly paired (0.00% : N/A)" according to samtools flagstat
.
Thank you. I changed to the other .bam file. And it works.