Dear Biostars
Does any one how to overlap stand-specific paired-end RNA-Seq reads (BAM) with known protein coding genes (BED) ?
I tried the following but I think it is not the correct way ? Would appreciate your help!
bamTobed -i ES.bam > ES.bed
intersectBed -a ES.bed -b Ensembl_mm9.bed -wa -s |awk '!a[$4]++' |wc -l
Why don't you just make your life easier and use featureCounts or htseq-counts? BTW, intersectBed can take a BAM file as input (use
-abam
instead of-a
).I think both packages that you mentioned take gff format but not BED.
Exactly, just download the GTF or GFF file for mm9 (or the Ensembl annotation, since it's unclear which you're using) instead of making a BED file out of things.
but i have my own BED files that custom made like novel transcripts.