Search
Question: Error in DESeq2 plotMA from object subset
0
8 months ago by
rbronste60
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?

Thanks!

modified 8 months ago by Michael Love19k • written 8 months ago by rbronste60
2
8 months ago by
Michael Love19k
United States
Michael Love19k 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).

Content
Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.