Error in DESeq2 plotMA from object subset
1
0
Entering edit mode
rbronste ▴ 60
@rbronste-12189
Last seen 23 months ago

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!

 

deseq2 maplot subset • 959 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 11 hours ago
United States

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 COMMENT

Login before adding your answer.

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