Question: Colour doesn't change in Manhanttan plot.
1
gravatar for greyman
5 days ago by
greyman80
greyman80 wrote:

Below is my R scripts for the manhanttan plot, many similar forums has used the same codes for their manhattan plot, but it seems doesnt work for me. Also, the default colour supposed to be black/grey but it turned green in my plot, may i know what mistakes i have made?

manhattan(out, chr="CHR", bp="BP", p="P", snp="SNP", highlight=out$SNP,
          col=c("blue4","orange"),
          genomewideline = F, suggestiveline=-log10(1e-5))

manhattan

gwas manhattanplot qqman R • 120 views
ADD COMMENTlink modified 5 days ago by zx87546.2k • written 5 days ago by greyman80

Please see How to add images to a Biostars post to embed images properly and please use the format bar to highlight code. This improves the readability and makes your post visually more appealing, motivating people to help you. I've done the changes for you this time.

As for your question, please show a few lines of the data. This is not strictly bioinformatics, but rather a general R question, so I cannot guarantee you that the question is not going to be closed by any of the other moderators.

enter image description here

ADD REPLYlink modified 5 days ago • written 5 days ago by ATpoint12k
1

thank you, as i have just figured out the answer, should i close this question?

ADD REPLYlink written 5 days ago by greyman80

As jrj.healey, it would be helpful for others if you provide an explanation what the issue was and how you solved it.

ADD REPLYlink written 5 days ago by ATpoint12k
3
gravatar for greyman
5 days ago by
greyman80
greyman80 wrote:

I have figured out the answer. Made a mistakes by using out$SNP for highlighting the SNP.

Below means highlight all the SNPs form out dataframe input, not what I needed:

highlight = out$SNP

And should be just a character vector of SNPs that need highlighting, for example.:

highlight = myVectorOfHitSNPs
ADD COMMENTlink modified 5 days ago by zx87546.2k • written 5 days ago by greyman80

It's fine to answer your own question, but please make the answer more extensive so future users that find the thread may benefit. For instance, post the code that finally worked, and ideally an explanation of the issue/resolution.

To 'close' the question you can accept your own answer.

ADD REPLYlink written 5 days ago by jrj.healey9.7k
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: 1103 users visited in the last hour