{"action":"created","issue":{"url":"https://api.github.com/repos/stephenturner/qqman/issues/38","repository_url":"https://api.github.com/repos/stephenturner/qqman","labels_url":"https://api.github.com/repos/stephenturner/qqman/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/stephenturner/qqman/issues/38/comments","events_url":"https://api.github.com/repos/stephenturner/qqman/issues/38/events","html_url":"https://github.com/stephenturner/qqman/issues/38","id":146923582,"number":38,"title":"Highlight multiple different vectors and colour them differently?","user":{"login":"evad80","id":18349105,"avatar_url":"https://avatars.githubusercontent.com/u/18349105?v=3","gravatar_id":"","url":"https://api.github.com/users/evad80","html_url":"https://github.com/evad80","followers_url":"https://api.github.com/users/evad80/followers","following_url":"https://api.github.com/users/evad80/following{/other_user}","gists_url":"https://api.github.com/users/evad80/gists{/gist_id}","starred_url":"https://api.github.com/users/evad80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evad80/subscriptions","organizations_url":"https://api.github.com/users/evad80/orgs","repos_url":"https://api.github.com/users/evad80/repos","events_url":"https://api.github.com/users/evad80/events{/privacy}","received_events_url":"https://api.github.com/users/evad80/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-08T13:01:14Z","updated_at":"2016-04-08T13:36:22Z","closed_at":null,"body":"Hi, I'm not sure if this is the right place to post this type of question.\r\n\r\nI am a biologist. I ran an association analysis, and I got back a set of SNPs of interest (called sig_snps). However, some of these SNPs are associated with body size (called sig_snps_but_assoc_with_body_size), and I want to show the difference between the set of SNPs that are significant, and the set of SNPs that are also significant with body size (if they are also associated with body size, they are less interesting).\r\n\r\nOn my manhattan plot zoomed in one on chromosome, I want to have three sets of coloured points: the non-associated SNPs, the SNPs associated with the trait, and the SNPs associated with the trait, but also associated with body size.\r\n\r\nI wrote this code:\r\n```\r\nlibrary(\"qqman\")\r\ntable <-read.table(\"Original.linear\",header=T)\r\ndata <-as.data.frame(table)\r\nsig_snps <-scan(\"SigSNPsAfterBodySize.snps\",\"\")\r\nsig_snps_but_assoc_with_body_size <-scan(\"SigSNPsButAssocWithBodySize\",\"\")\r\npdf(\"Test.pdf\")\r\nmanhattan(subset(data,CHR == 1),highlight = c(sig_snps_after_body_size,sig_snps_but_assoc_with_body_size), main = \"Chromosome 1\", cex= 2.5, ylab = expression(paste(\"Association with Cancer Mortality (-\",log[10],\"[P])\")),cex.lab = 1.2, cex.axis=1.5, cex.main = 1.2,suggestiveline=F,genomewideline=F)\r\n```\r\n\r\nAs you can see, to achieve this, I tried to make a vector for the two sets of SNPs that I wanted coloured (sig SNPs, and sig SNPs but associated with body size). As you can see from the output attached:\r\n[Test.pdf](https://github.com/stephenturner/qqman/files/210160/Test.pdf)\r\n\r\nThe command ran without error, but didn't work.\r\nSo I have two questions:\r\n\r\n1. Is what I'm doing possible,if the SNP is in the \"sig_snps\" object colour it red. If the SNP is in the \"sig_snps_but_assoc_with_body_size\", colour it blue. Else, colour it black. \r\n\r\n2. I saw that I can change the source code colours here: \"If you'd like to change the color of the highlight or the suggestive/genomewide lines, you'll need to modify the source code. Search for col=\"blue\", col=\"red\", or col=\"green3\" to modify the suggestive line, genomewide line, and highlight colors, respectively.\"\r\n\r\nMy problem is: I'm not a programmer, and also I'm not sure how I would change them to include two different colours for my above problem.\r\n\r\nIf someone could help with this code I would appreciate it!\r\n\r\nThanks\r\nEva\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/stephenturner/qqman/issues/comments/207434397","html_url":"https://github.com/stephenturner/qqman/issues/38#issuecomment-207434397","issue_url":"https://api.github.com/repos/stephenturner/qqman/issues/38","id":207434397,"user":{"login":"evad80","id":18349105,"avatar_url":"https://avatars.githubusercontent.com/u/18349105?v=3","gravatar_id":"","url":"https://api.github.com/users/evad80","html_url":"https://github.com/evad80","followers_url":"https://api.github.com/users/evad80/followers","following_url":"https://api.github.com/users/evad80/following{/other_user}","gists_url":"https://api.github.com/users/evad80/gists{/gist_id}","starred_url":"https://api.github.com/users/evad80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evad80/subscriptions","organizations_url":"https://api.github.com/users/evad80/orgs","repos_url":"https://api.github.com/users/evad80/repos","events_url":"https://api.github.com/users/evad80/events{/privacy}","received_events_url":"https://api.github.com/users/evad80/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T13:36:22Z","updated_at":"2016-04-08T13:36:22Z","body":"Thanks for the quick reply! I would love to but unfortunately it would be over my head. But I really appreciate the response; at least now I know it's not something that I'm just not doing properly with the existing code."}}