bedtools multicov and fraction overlap flag
1
0
Entering edit mode
9.0 years ago
fitziano ▴ 40

I am trying to use bedtools multicov to count the reads that map to introns. For this I have constructed a bed6 file containing the intronic regions.

The problem is that I want to keep only reads that completely map to intronic regions (no splice junctions/ no exonic reads).

For this I run bedtools in the following way:

bedtools multicov -bams file1.bam file2.bam file3.bam -bed introns.bed -D -s -f 1

The thing is that the -f 1 option (Minimum overlap required as a fraction of each A) doesn't seem to work properly, as it does not report any reads.

RNA-Seq bedtools • 3.4k views
ADD COMMENT
0
Entering edit mode

Do chromosomes match?

ADD REPLY
0
Entering edit mode

Yes.

If I don't use the -f flag, reads are reported. But I get also reads that occur between exons and introns.

ADD REPLY
3
Entering edit mode
9.0 years ago
fitziano ▴ 40

At the end, what I found out is that the -f flag in bedtools multicov refers to the bed file.

So the solution to this is to first filter the alignment files with bedtools intersect:

bedtools intersect -f 1 -s -abam file1.bam -b introns.bed > filter1.bam

and then run the bedtools multicov like this:

bedtools multicov -D -s -bams filter1.bam filter2.bam filter3.bam -bed introns.bed

ADD COMMENT

Login before adding your answer.

Traffic: 2451 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