Question: Error in DESeq2 plotMA from object subset
gravatar for rbronste
12 months ago by
rbronste60 wrote:

I am having a bit of trouble getting an MAplot from a result subset (though ?plotMA says this is possible) of a DESeq2 dataset. I am doing the following and getting this error:

> plotMA(BN_group_female_padj.01, alpha = .01, contrast=c("group", "femaleBB", "femalevehicle") ,ylim=c(-10,10))
Error in plotMA(BN_group_female_padj.01, alpha = 0.01, contrast = c("group",  : 
  Error from the generic function 'plotMA' defined in package 'BiocGenerics': no S4 method definition for argument 'BNST_group_female_padj.01' of class 'GRanges' was found. Did you perhaps mean calling the function 'plotMA' from another package, e.g. 'limma'? In that case, please use the syntax 'limma::plotMA'.

I can plot it from the entirety of the DEseqDataSet however I can't seem to find a way to only plot sites below a specific padj?



deseq2 subset maplot • 237 views
ADD COMMENTlink modified 12 months ago by Michael Love21k • written 12 months ago by rbronste60
Answer: Error in DESeq2 plotMA from object subset
gravatar for Michael Love
12 months ago by
Michael Love21k
United States
Michael Love21k wrote:

plotMA is designed for data.frame-like objects, but here you have a GRanges.

You can get the relevant three columns from the GRanges object using `$`:

df <- data.frame(gr$baseMean, gr$log2FoldChange, gr$padj < 0.1)

Check help("plotMA","geneplotter"):

  object: A ‘data.frame’ with (at least) three columns, the first
          containing the mean expression values (for the x-axis), the
          second the logarithmic fold change (for the-y axis) and the
          third a logical vector indicating significance (for the
          colouring of the dots).
ADD COMMENTlink written 12 months ago by Michael Love21k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 141 users visited in the last hour