This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to fix plotMA() error?

Hi all,

I run Step 5.6 in this paper and got:

plotMA(res, ylim=c(−5,5), alpha = 0.01)

Error: unexpected input in "plotMA(res, ylim=c(−"

res <- results(dds, contrast=c(“condition”, “MT”, “WT”))

Would you please tell me how to fix the error below? I almost don't change anything in the paper. I notice that my output is slightly different from the paper such as in Figure 2 a: PC1 85% vs 84%.

Thank you so much!

deseq2

1 answer

My guess is that this just a formatting error with the negative sign introduced by copying from the paper:

plotMA(res, ylim=c(−5,5)...

Change to:

plotMA(res, ylim=c(-5,5)...

+1

so in other words, remove the - and retype it manually

Thanks Dave Carlson and ATpoint! It is a little tricky to recognize the length of 2 minus symbols is different.

A follow up question is I almost don't change anything, but I got Ensembl gene ID on plots instead of gene symbol in the paper. Would you please tell me why?

I have not read the paper, but the authors may have converted Ensembl IDs to gene symbols without specifically explaining it. There are existing tools/libraries to handle this and many discussion on how to do it for example:

Converting Ensembl gene id to Gene symbol

Log in to answer this question.