Hi Brian,
I’m hoping to use the R script from the Trinity pipeline in performing DESeq2 in Rstudio (modified to include batch in the design formula). Before doing so, I tried to replicate the said R script but I encountered the following error in this particular line:
rnaseqMatrix = rnaseqMatrix[rowSums(cpm(rnaseqMatrix) > 1) >= 2,]
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'rowSums': could not find function "cpm"
If I understand correctly, this is a filtering step to remove low counts (i.e. only keep genes with at least 1 CPM, in at least 2 samples)? I was not able to get the same results when I skipped this line. May I ask where I can find the function "cpm"?
Thank you in advance!
Best regards,
Aileen