Error in plotMA while using limma package
I have been experiencing an error while using the limma package in R to plot the top gene but unfortunately, I have been getting an error stating I do not have two columns The piece of code looks like this:
limma::plotMA(c(resSig$log2FoldChange,resSig$pvalue),alpha = 0.05, colNonSig = "grey",ylim = c(-5,5))
The error I am getting is :
Error in plotMA.default(c(resSig$log2FoldChange, resSig$pvalue), alpha = 0.05, : Need at least two columns.
My resSig contains the following :
• 1,030 views
•
link
1 answer
without data and with data images, it is not easy to troubleshoot the query. I would suggest to try:
$ limma::plotMA(cbind(resSig$log2FoldChange,resSig$pvalue),alpha = 0.05, colNonSig = "grey",ylim = c(-5,5))
or
$ limma::plotMA(matrix(c(resSig$log2FoldChange,resSig$pvalue), ncol=2),alpha = 0.05, colNonSig = "grey",ylim = c(-5,5))
If resSig is one of the following objects, you can use maplot function directly on them: an RGList, MAList, EList, ExpressionSet or MArrayLM object. (copy/pasted from the manual)
• 0 views
•
link
Log in to answer this question.