Bedtools - Errors in coveragedBed
1
1
Entering edit mode
9.3 years ago
mangfu100 ▴ 800

Hi all.

I was running coverageBed with my exome bam file but it takes too long time and it hasn't returned output value.

Is it right that coverageBed takes much time to finish?

my bed file was very tiny so I thought that something might go in a wrong way.

below is my command and my bed file.

coverageBed -abam /DATA1/dmcb/TAR22_WES/TAR22S_sequence_readgroup_sort_dup_remove_realigned_recal.bam -b fgfr.bed -d > TAR22.cov.del.b36

10   123239372       123239472
next-gen sequencing sequence • 2.6k views
ADD COMMENT
1
Entering edit mode

Related question: is there a tool that will do the same thing more quickly, possibly using an index for the bam file? After all, IGV can plot the coverage for a small region very quickly even for a large BAM file.

ADD REPLY
1
Entering edit mode

coverageBed does not only report coverage, but bins of coverage. if per base coverage is needed, samtools depth input.bam can be used, and it's fairly fast (uplimited to 8000x though).

ADD REPLY
0
Entering edit mode

How big is your bam file??

ADD REPLY
0
Entering edit mode

my bam file size is approximately 20G.

I thought that file B size was small that I expected it will take just less than 10 minutes.. but it is my mistake

ADD REPLY
1
Entering edit mode

therefore, how big is your fgfr.bed file? may it be restricting your output to that single region?

sharing a samtools view input.bam | head plus a head fgfr.bed outputs would help.

ADD REPLY
2
Entering edit mode
9.3 years ago

You might try this:

samtools view -u -L fgfr.bed myaln.bam \
| coverageBed -abam - -b fgfr.bed -d > out.bed

Which means: First get the reads overlapping your bed file, then do the counting.

With 20GB of bam file I'm not surprised coverageBed takes more then 10 min.

(By the way, the title of your post is misleading as there is no error reported in your question)

ADD COMMENT

Login before adding your answer.

Traffic: 1867 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6