I tried but it need 2 bam files which is not the case. I don't want to compare, I just want a read count of each exon for each transcript. I think it quite arbitrary as it quite hard to distinguished which read mapped to which isoform. How do you think?
Hi
How can I get a read count per exon per transcript in a particular gene from BAM file? I tried using htseq-count with id_attr=transcript_id but this approach does not give me the read count per exon per transcript. I tried using DEXSeq to get the read count, but it does not get what I want. Is there any way to get the read count? I only got one gene of interest to analyse which TPM1. This gene has more than 40 isoforms, so it is possible to get each of the isoforms their read count for each exon. Thanks!
2 answers
There are many choices and tools for that. How about using coveragebed from bedtools?
bedtools coveragebed -s -abam bamFile -b exons.bed > yourResultFile
-s: only if you have stranded RNA-seq data.
To compare the expression level of exons, divide by tag-per-million and also normalize by length (to take varying exon length into account)
Paste your exact command, so we can probably see where you might have wrong.
bedtools multicov
Your first step is to get a bed file in place which defines coordinates for each exon of each transcript.
If you do not have that file, consider using DEXSeq. It has python scripts to modify standard gtf file to make exon level counts.
Log in to answer this question.