Question: y-axis on Volcano plot
0
gravatar for jtehmsen
12 months ago by
jtehmsen20
jtehmsen20 wrote:

Hello,

I'm trying to generate a series of Volcano plots and would like the y-axes to be identical, but I keep getting the following message:

Error in UseMethod("limits") : 
  no applicable method for 'limits' applied to an object of class "NULL"

I am using the following code:

g <- ggplot(data=Complete_geneList_voom_limma, aes(x=logFC_KO.3.CTL_vs_WT.3.CTL, y=-log10(FDR_pVal_KO.3.CTL_vs_WT.3.CTL), colour=threshold)) + geom_point(alpha=0.4, size=1.75) + xlim(c(-6,6)) + ylim(c(0,15) + theme_bw() + theme(legend.position = "none") + scale_colour_manual(values=c("firebrick","navy")) + geom_vline(xintercept=1.5, linetype="dashed") + geom_vline(xintercept=-1.5, linetype="dashed") + geom_hline(yintercept=1.3, linetype="dashed")

Can anyone please help? Thank you.

rna-seq • 534 views
ADD COMMENTlink modified 12 months ago by manuel.belmadani1.2k • written 12 months ago by jtehmsen20
1
gravatar for manuel.belmadani
12 months ago by
Canada
manuel.belmadani1.2k wrote:

Your ylim parenthesis needs to be closed after the vector.

You have

 ylim(
    c(0, 15) + theme_bw( ...

Try:

 ylim(
    c(0, 15)) + theme_bw( ...
ADD COMMENTlink written 12 months ago by manuel.belmadani1.2k
1

Thanks so much - sorry I missed that! I didn't relate the error message to a coding error. Thank you very much for your help.

ADD REPLYlink written 12 months ago by jtehmsen20
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.3.0
Traffic: 1651 users visited in the last hour