Hello,
I have been using qualimap to generate stats of the bam files I got, including coverage. Recently, I am getting crashes because there is not enough memory, even if I use the memory parameter --java-mem-size=20000M.
Is there another way to calculate the mean coverage of a bam file? I have tried with bedtools genomecov -bga FILE.bam > FILE.coverage.bed but I got a usage error (ERROR: Unrecognized parameter: the input file and ERROR: Need both a BED and a genome file). I am trying with samtools depth -a file.bam | awk '{c++; if($3>0) total+=1}END{print (total/c)*100}'. Is this one good or is there a fastest way?
Thanks
mosdepth .