Error in running DESeq2 R script from Trinity pipeline: rowSums cpm

270 views
Skip to first unread message

aileen

unread,
Apr 3, 2021, 11:48:54 AM4/3/21
to trinityrnaseq-users
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


Ken Field

unread,
Apr 3, 2021, 7:07:54 PM4/3/21
to trinityrnaseq-users
The cpm function is part of the edgeR package. You must have had an error loading that package.
-Ken

--
You received this message because you are subscribed to the Google Groups "trinityrnaseq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trinityrnaseq-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trinityrnaseq-users/48055cda-82d4-4ce7-a863-9b938b347912n%40googlegroups.com.

aileen

unread,
Apr 3, 2021, 10:25:24 PM4/3/21
to trinityrnaseq-users
Hi Ken,

Thank you for the reply! I'm sorry for the basic question; this means I still run edgeR/this function even if I am performing DESeq2?  

Thank you very much!

Best, 
Aileen 

Ken Field

unread,
Apr 4, 2021, 9:49:21 AM4/4/21
to aileen, trinityrnaseq-users
Yes. There is no equivalent function in the DESeq2 package so Trinity uses the edgeR function. It is still using DESeq2 for the differential expression analysis.
Ken

aileen

unread,
Apr 4, 2021, 11:16:32 PM4/4/21
to trinityrnaseq-users
Understood, thank you so much!

Best,
Aileen

Brian Haas

unread,
Apr 5, 2021, 7:42:11 AM4/5/21
to aileen, trinityrnaseq-users
Thanks, Ken!!

~b



--
--
Brian J. Haas
The Broad Institute
http://broadinstitute.org/~bhaas

 

aileen

unread,
Apr 6, 2021, 9:50:08 AM4/6/21
to trinityrnaseq-users
Hi Brian/Ken,

In the R script from the same step run_DE_analysis.pl, may I ask where I can find the R script for the MA and Volcano plots?
"/usr/local/bin/trinityrnaseq/Analysis/DifferentialExpression/R/rnaseq_plot_funcs.R"

Thank you!

Best regards,
Aileen
Reply all
Reply to author
Forward
0 new messages