Okay, so even if the tutorial gives a code like
logCPM <- cpm(dge, log=TRUE, prior.count=3)
It should still be fine to just put in my tpm file where CPM should go? (Note here that they use a cpm function, but there isn't a tpm function, to my knowledge.)
And as for the second part of what I asked, here is what I have so far:
dge <- DGEList(matchedgeneTPM)
dge <- calcNormFactors(dge)
dge$samples
fnames <- colnames(females)
mnames <- colnames(males)
group <- interaction(fnames, mnames)
fnames <- colnames(females)
mnames <- colnames(males)
group <- interaction(fnames, mnames)
plotMDS(dge, col = as.numeric(group))
mm <- model.matrix(~0 + group)
fit <- lmFit(dge, mm)
"matchedgeneTPM" is the table of TPM's I have (I already converted to log2(TPM+1) beforehand) and "females" and "males" are the list of female and male sample ID's I also constructed beforehand. Everything works fine until the last line, which gives the error "Error in getEAWP(object) : data object isn't of a recognized data class". Would you be able to explain how to fix this error, please?