This is a test version of Biostars. For the public version, visit https://www.biostars.org.
manually calculate log2 fold change and compare

Hi everybody,

I am struggling trying to calculate log2FC manually with an RNA-seq experiment that has no replicates. I know this question has been posted but hadn't been able to transfer the answers to my data.

So I have 3 conditions, let's say HpA, SpA and Empty. I would like to look at the fold change values in the genes since I can't do a DEG using the function's that need replicates to fit a model (what's logical).

Here's my code:

group <- as.factor(c(1,2,3))
rawc <- DGEList(rawcounts2, group = group)

I remove low counts

 keep <- filterByExpr(rawc)
filt.count <- rawc[keep, , keep.lib.sizes=F]

Normalize taking account for the library size

norm.count <- calcNormFactors(filt.count)
norm.count$samples

Calculate CPM which are log2 transformed

logcpm <- cpm(norm.count,log=TRUE)

And here's where I'm stuck. Whilst my data is already log2 transformed, I thought that just doing the ratio between the conditions I want to compare should be ok.

logFC_HpAEmpty <- (logcpm[,1]/logcpm[,3])
logFC_SpAEmpty <- logcpm[,2]/logcpm[,3] 

I don't know if I am right and what's next. I will appreciate your advise and help as I have never done this type of analysis manually and I think it's a good exercise to further understand the fold changes in expression values.

I thank you in advance for your time.

Lea

edger log2foldchange rna-seq

1 answer

Check section 2.12 in https://bioconductor.org/packages/release/bioc/vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf on a workflow without replicates. Not reliable, but better than these manual approaches you try. On log scale a simple fold change is obtained by subtraction, not division by the way. Still, that will only give similar fold changes to edgeR for genes with decent counts and without much variability.

Hi,

First, thank you for your advise. I read the edgeR's vignette and that's why I was wondering to do a descriptive analysis that includes an analysis of fold changes, as said in section 2.12. I thought I was going this way. I am maybe misunderstanding the log fold change concept? Are my logFC (obtained by subtraction) results correct? If it is, should I compare them in a plot or can I retrieve a table?

Lea

Log in to answer this question.