Biostar Beta. Not for public use.
Question: y-axis on Volcano plot
0
Entering edit mode

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.

ADD COMMENTlink 9 months ago jtehmsen • 10 • updated 9 months ago manuel.belmadani • 830
1
Entering edit mode

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 9 months ago manuel.belmadani • 830
Entering edit mode
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 9 months ago
jtehmsen
• 10

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0