Question: Rpkm Calculation
gravatar for Varun Gupta
8.7 years ago by
Varun Gupta1.2k
United States
Varun Gupta1.2k wrote:

Hi Everyone

I am interested in finding the rpkm values for my genes(exons). The basic definition of RPKM given is :

link text

Now My question is i have in begining a fastq file from which i did my analysis and got sam files or bam files and count the reads.

In the formula for RPKM it's written in the denominator that mapped reads(millions). How can we get this mapped read number.

If i get this from fastq file then i dont think it would be the correct mapped reads , because not all the reads match to the ref genome,or is it.

Hope to hear from you guys soon

Thanks Regards

rpkm • 9.6k views
ADD COMMENTlink modified 3.1 years ago by Biostar ♦♦ 20 • written 8.7 years ago by Varun Gupta1.2k

get the samtools flag stats to know the mapped reads information

ADD REPLYlink written 8.7 years ago by Rm8.0k
gravatar for dli
8.6 years ago by
dli230 wrote:

you can found answer in this link:

I have a c code:

double cal_rpkm (unsigned int reads_count, unsigned int total_length, unsigned int mapped_reads_num) {
    return reads_count / (mapped_reads_num * 1e-9 * total_length);

Hope it works for you.

ADD COMMENTlink modified 8.5 years ago • written 8.6 years ago by dli230
gravatar for Gireesh K. Bogu
8.7 years ago by
Gireesh K. Bogu100 wrote:

As @RM mentioned before you can flag stats to count the number of mapped reads.

There are many tools to calculate RPKM. You can use ERANGE for example. However FPKM is an improved version of RPKM that remove biases more efficiently. For this you can use Cufflinks.

ADD COMMENTlink written 8.7 years ago by Gireesh K. Bogu100

FPKM and RPKM are the same thing. FPKM is simply a more literal way of referring to a DNA fragment as the source of the "read" information (as opposed to "R" for read, which merely implies the fragment based on one read). There are no "biases" that are removed by simply changing the name of something. By the way, why did @RM put the answer in a comment, rather than in an answer?

ADD REPLYlink written 8.6 years ago by seidel7.1k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 794 users visited in the last hour