This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to count novel and known splice junction reads from BAM

Hi,

I have BAM file from TopHat 2 alignment with RefSeq genes annotation. Is there any way to count separately the exon junction reads coming from RefSeq transcripts and novel junctions (not from RefSeq).

Could somebody help me out?

rna-seq

1 answer

I have never tried this. But may be you can use bamtobed tool to convert the regions in bam to bed format. And then find common regions between this bed file and the gtf file.

You can may be try the following steps.

Step1: Convert bam to bed
bedtools bamtobed -i reads.bam > reads.bed

Step2: Convert gtf to bed
gtf2bed < refseq.gtf > refseq.bed

Step3: Compare the common regions between the two bed files
bedops --everything reads.bed refseq.bed

Log in to answer this question.