I am new in RNA-seq. I would like to know how calculate the number (%) of aligned reads in exons, introns in a bam file.
Welcome to Biostars!
Please check previous questions: Extracting Read Count For Each Gene/Exon From Rna-Seq Bam Files
You could try http://rseqc.sourceforge.net/#read-distribution-py also have a look at the other programs from this suite.
Thank you so much for the help. I will check those suites. Do you think using samtools in this way will work?
samtools view -b -F exons.bed aligned.bam > aligned.exons.bam
Thank you again.
You don't need to explicitly use samtools for CollectRNASeqMetrics from Picard (http://picard.sourceforge.net/command-line-overview.shtml#CollectRnaSeqMetrics)
the command line should be following (after downloading and unpacking Picard tools):
java -Xmx4G -jar picard/CollectRnaSeqMetrics.jar REF_FLAT=exome.refFlat INPUT=aligned.bam CHART_OUTPUT=rnaSeqCoverage.pdf OUTPUT=rnaSeqMetrics.txt
the exome.refFlat file for H. Sapiens could be downloaded from here.
for other species check http://hgdownload.cse.ucsc.edu/downloads.html
PS. To reply to a specific answer please further use "comment" option
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy