Error in plotMA while using limma package
1
0
Entering edit mode
2.9 years ago
mrinsmrids • 0

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 :

enter image description here

limma • 606 views
ADD COMMENT
1
Entering edit mode
2.9 years ago

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)

ADD COMMENT

Login before adding your answer.

Traffic: 1608 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