y-axis on Volcano plot
1
0
Entering edit mode
5.5 years ago
jtehmsen ▴ 20

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 • 3.3k views
ADD COMMENT
1
Entering edit mode
5.5 years ago

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 COMMENT
1
Entering edit mode

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 REPLY

Login before adding your answer.

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