Question: bedtools multicov and fraction overlap flag
0
gravatar for fitziano
4.2 years ago by
fitziano40
Switzerland
fitziano40 wrote:

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 • 1.9k views
ADD COMMENTlink modified 4.2 years ago • written 4.2 years ago by fitziano40

Do chromosomes match?

ADD REPLYlink written 4.2 years ago by PoGibas4.8k

Yes.

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

ADD REPLYlink written 4.2 years ago by fitziano40
3
gravatar for fitziano
4.2 years ago by
fitziano40
Switzerland
fitziano40 wrote:

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 COMMENTlink modified 4.2 years ago • written 4.2 years ago by fitziano40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1529 users visited in the last hour