Search
Question: Error in DESeq2 plotMA from object subset
0
gravatar for rbronste
27 days ago by
rbronste50
rbronste50 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?

Thanks!

 

ADD COMMENTlink modified 27 days ago by Michael Love16k • written 27 days ago by rbronste50
2
gravatar for Michael Love
27 days ago by
Michael Love16k
United States
Michael Love16k 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 27 days ago by Michael Love16k
Please log in to add an answer.

Help
Access

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