HI Michael, Thank you so much! That worked!!! Now I am just trying to increase the size of text of SNP and GENE on plot
I tried this: a$newname <- paste(a$SNP,"\n", a$GENE) manhattan(a, chr="CHR", bp="BP", snp="newname", p="P",cex = 0.5,annotatePval = 0.0001) but I am getting this error: Error in textxy(topSNPs$pos, -log10(topSNPs$P), offset = 0.625, labs = topSNPs$SNP, : formal argument "cex" matched by multiple actual arguments Do you by any chance know how to do this? Cheers Ana On Wed, May 20, 2020 at 4:12 AM Michael Dewey <li...@dewey.myzen.co.uk> wrote: > > a$newname <- paste(a$SNP, a$GENE) > manhattan(a, chr="CHR", bp="BP", snp="newname", p="P",annotatePval = 0.0001) > > However note that I do not use manhattan() so you may need to alter the > parameters as I am assuming a is where it finds the remaining parameters. > > You may also need to play with the sep =, and collapse = parameters to > paste() to get the precise layout you want. > > Michael > > On 19/05/2020 17:21, Ana Marija wrote: > > Hi Michael, > > > > can you please send me code how that would be done? > > > > Thanks > > Ana > > > > On Tue, May 19, 2020 at 11:18 AM Michael Dewey <li...@dewey.myzen.co.uk> > > wrote: > >> > >> Dear Ana > >> > >> Perhaps paste together SNP and GENE using paste() and then supply that > >> as the snp parameter. > >> > >> Michael > >> > >> On 19/05/2020 17:12, Ana Marija wrote: > >>> Hello, > >>> > >>> I am making manhattan plot with: > >>> library(qqman) > >>> manhattan(a, chr="CHR", bp="BP", snp="SNP", p="P",annotatePval = 0.0001) > >>> > >>> and I would like to annotate these two SNPs which are above the > >>> threshold so that they have GENE name beside them: > >>> > >>>> a[a$SNP=="rs4081570",] > >>> SNP P CHR BP GENE > >>> 1 rs4081570 6.564447e-05 19 15918647 UCA1 > >>>> a[a$SNP=="rs11867934",] > >>> SNP P CHR BP GENE > >>> 1021 rs11867934 6.738066e-06 17 16933404 FLCN > >>> > >>> Right now my plot only has SNP name for those 2, how to add GENE names > >>> (FLCN and UCA1 as well) > >>> > >>> Please advise > >>> Ana > >>> > >>> > >>> > >>> ______________________________________________ > >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > >>> https://stat.ethz.ch/mailman/listinfo/r-help > >>> PLEASE do read the posting guide > >>> http://www.R-project.org/posting-guide.html > >>> and provide commented, minimal, self-contained, reproducible code. > >>> > >> > >> -- > >> Michael > >> http://www.dewey.myzen.co.uk/home.html > > > > -- > Michael > http://www.dewey.myzen.co.uk/home.html ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.