Hello,
I'm trying to create some bigwig files from a set of bams using bamCoverage. These bams were generated using Rsubread, in a paired end setting, (from RNA-seq) with a mapping rate of about 75% on average. Whenever I try to run bamCoverage on any of them I get this error, with the following traceback:
WARNING! 'P45F2H_S93_L003.fastq.gz.subread.BAM' does not have any mapped reads. Please check that the file is properly indexed and that it contains mapped reads.
WARNING! 'P45F2H_S93_L003.fastq.gz.subread.BAM' does not have any mapped reads. Please check that the file is properly indexed and that it contains mapped reads.
Traceback (most recent call last):
File "/usr/bin/bamCoverage", line 12, in <module>
main(args)
File "/usr/lib/python3/dist-packages/deeptools/bamCoverage.py", line 256, in main
wr.run(writeBedGraph.scaleCoverage, func_args, args.outFileName,
File "/usr/lib/python3/dist-packages/deeptools/writeBedGraph.py", line 131, in run
genome_chunk_length = getGenomeChunkLength(bam_handles, self.binLength, self.mappedList)
File "/usr/lib/python3/dist-packages/deeptools/writeBedGraph.py", line 337, in getGenomeChunkLength
genomeChunkLength = int(min(5e6, int(2e6 / (max_reads_per_bp * len(bamHandles)))))
ZeroDivisionError: float division by zero
I noticed the warning prior to the error, however, these bams contain mapped reads as I've used them in downstream differential expression analysis. Additionally, all indexed .bai files are in the same folder and follow the .bam.bai convention. Really confused here, any help is appreciated.
Thanks