I would like to use bedtools as it seems to have much more options for the input/output file. However, it seems that bedtools is way slower than the samtools.
I have: multiple bed files (sorted and indexed) and multiple regions and I want a coverage per base.
gene_coord_red.bed has only one region. I ran
bedtools coverageBed following:
time coverageBed -a gene_coord_red.bed -b reads.sort.bam -d > bedtools.txt real 2m17.861s user 1m57.572s sys 0m19.926s
time samtools mpileup -Q 0 -l gene_coord_red.bed reads.sort.bam > mpileup.txt real 0m23.595s user 0m22.808s sys 0m0.301s
Why is the bedtools running so slow? Can I accelerate it somehow?