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.
1 answer
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
Log in to answer this question.
Do chromosomes match?
Yes.
If I don't use the -f flag, reads are reported. But I get also reads that occur between exons and introns.