1
$\begingroup$

Both DESeq2 and edgeR have an FPKM/RPKM function that by default uses normalized library sizes ("robust" option in DESeq2). FPKMs have their own issues, but I thought the main benefit was to have comparable units across independent experiments. If you are adding an experiment-specific normalization factor, then why even use FPKMs?

$\endgroup$
4
$\begingroup$

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 samples of genes 1-6. Let $S1$ and $S2$ be the observed expression in our sequencing.

$$ \begin{matrix} Gene & E1 & S1 & E2 & S2 \\ G1 & 100 & 10 & 100 & 20 \\ G2 & 100 & 10 & 100 & 20 \\ G3 & 100 & 10 & 100 & 20 \\ G4 & 100 & 10 & 0 & 0 \\ G5 & 100 & 10 & 0 & 0 \\ G6 & 100 & 10 & 0 & 0 \\ \end{matrix} $$

Our totals are 60 counts for $S1$ and 60 for $S2$. We sequenced both libraries to the same depth, but as there are fewer genes expressed in $E2$, we just naturally capture the genes that are expressed more often. For simplicity's sake, let's assume the genes all have the same length of 1, so we ignore the "K" in FPKM. Let's also forget the scaling by a million, since that's just to make nice numbers:

$$ \begin{matrix} Gene & E1 & S1 & E2 & S2 \\ G1 & 100 & 0.167 & 100 & 0.333 \\ G2 & 100 & 0.167 & 100 & 0.333 \\ G3 & 100 & 0.167 & 100 & 0.333 \\ G4 & 100 & 0.167 & 0 & 0 \\ G5 & 100 & 0.167 & 0 & 0 \\ G6 & 100 & 0.167 & 0 & 0 \\ \end{matrix} $$

Now let's calculate size factors. In DESeq2, we create a pseudo-sample which is the geometric mean of all counts of each gene, so $\sqrt{10 \cdot 20} = 14.14$ for genes 1-3 and genes 3-6 are ignored as they have a member with 0-valued counts. The size factor for each library is the median ratio for each library compared to that pseudo-sample:

$$ med([\frac{10}{14.14}, \frac{10}{14.14}, \frac{10}{14.14}) = 0.71 $$

$$ med([\frac{20}{14.14}, \frac{20}{14.14}, \frac{20}{14.14}]) = 1.41 $$

So where do we end up if we divide by the size factors?

$$ \begin{matrix} Gene & E1 & S1 & E2 & S2 \\ G1 & 100 & 141 & 100 & 142 \\ G2 & 100 & 141 & 100 & 142 \\ G3 & 100 & 141 & 100 & 142 \\ G4 & 100 & 141 & 0 & 0 \\ G5 & 100 & 141 & 0 & 0 \\ G6 & 100 & 141 & 0 & 0 \\ \end{matrix} $$

So in this simple example, size factors produce a better estimate than FPKM or TPM to compare values across experiments, hence the "robustness". Please note that this is still not great for any statistical testing, and in general should be used with caution anywhere.

Finally, I'll leave some more reading material concerning FPKMs and cross-sample comparisons here:

| improve this answer | |
$\endgroup$
  • $\begingroup$ Great explanation. Those would be normalized counts and I get why they make sense. But this does not really answer the question of why mix normalization and FPKMs. $\endgroup$ – burger Oct 28 at 2:03
  • $\begingroup$ Right, maybe the point I was trying to make wasn't exactly clear. The "M" in FPKM is attempting to correct for library size, but simply taking the column sums is too naive of an approach. Using size factors as a library size estimate is a more robust way to calculate that (hence the name of the option). It's not really mixed, it just replaces what's used as the library size term in the formula, since the default is inadequate in many respects. $\endgroup$ – Bastian Schiffthaler Oct 28 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.