CPM function in EDGER
0
0
Entering edit mode
francesca3 • 0
@francesca3-23121
Last seen 3.4 years ago
Italy

Hi, I have some doubts on cpm function in edgeR package. Given this initial part of the code:

> library(edgeR)
> data_clean<- read.table("unito.txt", header = TRUE)
> 
> group<-factor(c("A", "A", B","B"))
> 
> y <- DGEList(counts=data_clean,group=group)
> 
> y <- calcNormFactors(y)

I obtain different values if I calculate cpm in this way

> cpm <- cpm(y, log = FALSE, normalized.lib.sizes=TRUE)

Or in this one

> cpm <- cpm(y$counts, log = FALSE, normalized.lib.sizes=TRUE)

Why are them different? What does it change? What is the correct way to calculate them? I noticed that if I calculate them with the standard formula "by hand", I obtain the same values as the second formula (y$counts). In the edge manual it seems just to use the y argument.

Thank you, Francesca

edger cpm rnaseq • 3.7k views
ADD COMMENT
0
Entering edit mode

Cross-posted and answered on biostars: https://www.biostars.org/p/458178/

ADD REPLY
0
Entering edit mode

Please do not cross-post. This community here is driven by the developers of the tools and therefore intended for specific technical advise towards the packages. The "standard" questions are more suited for Biostars. No need to bother the developers who already invest a lot of time maintaining their tools with non-technical questions. Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 615 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6