Skip to main content
31 votes
Accepted

How to compute RPKM in R?

First off, Don’t use RPKMs. They are truly deprecated because they’re confusing once it comes to paired-end reads. If anything, use FPKMs, which are mathematically the same but use a more correct ...
Konrad Rudolph's user avatar
8 votes

How to compute RPKM in R?

RPKM is defined as: RPKM = numberOfReads / ( geneLength/1000 * totalNumReads/1,000,000 ) As you can see, you need to have gene lengths for every gene. Let's say ...
Iakov Davydov's user avatar
7 votes

How can I calculate gene_length for RPKM calculation from counts data?

Here you can find some example R code to compute the gene length given a GTF file (it computes GC content too, which you don't need). This uses one of a number of ways of computing gene length, in ...
Devon Ryan's user avatar
  • 19.8k
5 votes

Why use "robust" FPKMs?

FPKM are inherently experiment specific and can not be used to compare across samples. Let's consider the following two sequencing runs. Let $E1$ and $E2$ be the true, underlying expression in two ...
Bastian Schiffthaler's user avatar
5 votes
Accepted

How to deal with duplicate genes having different expression values?

I assume you're familiar with the various issues surrounding FPKMs, so I'll not expound upon them. As a general rule, you should be using gene IDs rather than gene names, since the former are unique ...
Devon Ryan's user avatar
  • 19.8k
4 votes

How to convert featureCounts to FPKM?

I have seen many posts regarding counts to RPKM and TPM. There’s your answer then: FPKM = RPKM. It’s simply a more accurate name. Speaking of RPKM for paired-end data is discouraged because the ...
Konrad Rudolph's user avatar
4 votes
Accepted

Spearman correlation between two genes

Since Spearman is a rank-based test, it relies on you being able to accurately decide on the ranking of your observations by some metric (usually the magnitude of the numbers). If two observations ...
sjcockell's user avatar
  • 861
3 votes

How to deal with duplicate genes having different expression values?

The best way to deal with this is to use unique gene IDs, for example ensembl accession numbers. So use the ensemble gtf annotation when quantifying the read counts and not the gene symbols. Just to ...
benn's user avatar
  • 3,591
2 votes

Expression of a gene in different groups

You should never use RPKM. It’s simply obsolete in the age of paired-end sequencing, and has been replaced by FPKM (which is, strictly speaking, a synonym). The linked blog post explains more ...
Konrad Rudolph's user avatar
2 votes

How to convert featureCounts to FPKM?

You can use countToFPKM package. This package provides an easy to use function to convert the read count matrix into FPKM matrix; following the equation in The ...
Ahmed Alhendi's user avatar
2 votes

What RNA-Seq expression value would be closest to Microarray equivalent?

I did a comparison of cDNA count data against microarray data that was published a few years ago: For comparisons to published data (Fig. S2; Miller et al., 2012), a generalized linear model was ...
gringer's user avatar
  • 14.9k
2 votes

What RNA-Seq expression value would be closest to Microarray equivalent?

I think it is very hard to say which are the closest because they are not really comparable. But since you are using Spearman correlation, I guess RPKM, FPKM, and TPM do not change the order of gene ...
Phoenix Mu's user avatar
2 votes
Accepted

Different results of spearman correlation between TPM and FPKM

This shouldn't be surprising that you see different correlations between gene expression data when expressed in different units. To see why, let's look at how these units are defined. Let's denote the ...
James Hawley's user avatar
  • 1,394
1 vote

Within and between sample count normalization

The approach you are describing seems very strange. Crucially, the Vignette for DESeq2 states that the model only works correctly with unnormalized counts as input: It is important to provide count ...
PPK's user avatar
  • 886
1 vote

In-sample and across samples normalized expression

Yes, this is a standard way of obtaining RPKM/FPKM/CPM values for plotting. Not that you do not need to use a for loop for any of the computations in R. You have a ...
Devon Ryan's user avatar
  • 19.8k
1 vote

Why is FPKM still used for gene expression studies?

Is it ever meaningful to use FPKM values for analyzing across samples? One should never use FPKMs for anything important. They can occasionally be useful for plotting, but even in that case one needs ...
Devon Ryan's user avatar
  • 19.8k
1 vote

Expression of a gene in different groups

For visualization purposes, using log(cpm) is fine. But plot don't check if differences are significant or not, statistical tests do. You can certainly add the results of a proper statistical test to ...
h.mon's user avatar
  • 323
1 vote

How can I calculate gene_length for RPKM calculation from counts data?

I assume you are mapping against the genome rather the transcriptome, since for the later the length would be trivial. Assuming the first, I think not only the coding sections should be included but ...
Sebastian Müller's user avatar
1 vote

How to compute RPKM in R?

If you are planning to do a differential expression analysis, you will probably don't need the RPKM calculation. RPK= No.of Mapped reads/ length of transcript in kb (transcript length/1000) RPKM = ...
arup's user avatar
  • 604

Only top scored, non community-wiki answers of a minimum length are eligible