Hi, I want to calculate RPKM values. I did DESeq and i got the results. My next step is i have to identify RPKM values for each gene. My pipeline is Bowtie>tophat>HTSeq>DESeq .plesase guide me through right path.
Hi, I want to calculate RPKM values. I did DESeq and i got the results. My next step is i have to identify RPKM values for each gene. My pipeline is Bowtie>tophat>HTSeq>DESeq .plesase guide me through right path.
You can compute rpkm from a DESeqDataSet
in the way indicated in @igor's answer. However, RPKMs should only be used for downstream analysis and not for testing differential expression. This is explicitly mentioned in the documentation of DEseq2.
In order to test for differential expression, we operate on raw counts and use discrete distributions as described in the previous Section 1.4. However for other downstream analyses – e.g. for visualization or clustering – it might be useful to work with transformed versions of the count data.
Same is said in the documentation for the older package DEseq:
The count values must be raw counts of sequencing reads. This is important for DESeq’s statistical model to hold, as only the actual counts allow assessing the measurement precision correctly. Hence, please do do not supply other quantities, such as (rounded) normalized counts, or counts of covered base pairs – this will only lead to nonsensical results.
Other relevant discussion:
Answer by Gordon Smyth about the use of RPKMs with voom, edgeR and DEseq2.
If you are using DESeq2, there is an fpkm()
function to get RPKM/FPKM.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
barrypraveen : I had asked you previously to provide titles that made sense for questions you are asking. Please do not include entire error message as the title of the post (I have removed it).
If you don't change the title of this post to something suitable we may close this question.
sorry for the inconvenience.
That looks like code I wrote to determine the GC content and length of each gene. That's completely and totally unrelated to what you're trying to do. Also, you need alignments or reads or something along those lines to get RPKMs, you can't somehow generate that from an annotation. Please post what your actual goals are (the answer should have absolutely nothing to do with RPKMs).
Okay. Thanks for your answer. yes, you are right i copied from Seqanswers. Sorry for the inconvenience.
Also, as someone has pointed out before, you shouldn't use RPKMs with DEseq. You need raw counts. Maybe you don't mean to use the RPKMs for DEseq analysis?
The problem is i have to cross check. That is why i need RPKM Values. I have been following two pipelines. First one is Bowtie>tophat>cufflinks>cuffmerge>cuffqunat>cuffdiff (sometimes i use hisat instead of Bowtie and Tophat). In this pipeline i can get RPKM values from cufflinks. But recently i am using another pipeline Bowtie>tophat>HTSeq>DESeq. I am very new of R programming that is why i am asking. Please do share your comments on that. If i did anything wrong.
No you don't.
If you want to compare two pipelines, use both correctly. Don't mess with the input of DESeq2. There is no good reason to use FPKM here.