Closed stephenturner closed 11 years ago
Commented this line out until it's fixed. I'm not sure I follow the logic why it's not working.
Looking into it now! Sorry for the long delay in getting to this. I have been traveling a lot this summer. Back to normal schedule now though
On Thu, Aug 29, 2013 at 11:48 AM, Stephen Turner notifications@github.comwrote:
Commented this line out until it's fixed. I'm not sure I follow the logic why it's not working.
— Reply to this email directly or view it on GitHubhttps://github.com/stephenturner/qqman/issues/5#issuecomment-23514105 .
I found the problem. The first line of manhattan() was:
d = na.omit(dataframe)
This is too general because it filters out some rows with NAs in non-essential columns (e.g., CHISQ, OR). This was filtering out some of the SNPs that you indicated to highlight with "snps_to_highlight". I modified the line to:
d = dataframe d = d [(!is.na(d$CHR) & !is.na(d$BP) & !is.na(d$P)), ]
But even with this more specific filtering, some of the "snps_to_highlight" are filtered out because of missing data.
"snps_to_highlight" should not be SNPs that have NA for CHR, BP, or P (such SNPs get filtered out of the results dataframe because they can't be plotted). I attached an updated version of code-from-blog-post.r that works by filtering "snps_to_highlight" before plotting. I am not committing these changes... I'll let you modify code-from-blog-post.r as you want, and then commit.
I will commit the changes to qqman.r
We can modify the error message and/or handling of this scenario if you want.
Best, Dan
On Thu, Aug 29, 2013 at 3:30 PM, Dan Capurso dancapurso1@gmail.com wrote:
Looking into it now! Sorry for the long delay in getting to this. I have been traveling a lot this summer. Back to normal schedule now though
On Thu, Aug 29, 2013 at 11:48 AM, Stephen Turner <notifications@github.com
wrote:
Commented this line out until it's fixed. I'm not sure I follow the logic why it's not working.
— Reply to this email directly or view it on GitHubhttps://github.com/stephenturner/qqman/issues/5#issuecomment-23514105 .
I can't see an attachment here. Hm, I think the best way to handle this situation - if they user wishes to highlight SNPs that aren't in the results (or have missing chr/bp/P-values), best to still plot the remaining snps, but issue a warning that the specific SNP wasn't in the results.
Here is the attachment. I will modify the handling of this as you indicated and commit shortly.
On Fri, Aug 30, 2013 at 5:52 AM, Stephen Turner notifications@github.comwrote:
I can't see an attachment here. Hm, I think the best way to handle this situation - if they user wishes to highlight SNPs that aren't in the results (or have missing chr/bp/P-values), best to still plot the remaining snps, but issue a warning that the specific SNP wasn't in the results.
— Reply to this email directly or view it on GitHubhttps://github.com/stephenturner/qqman/issues/5#issuecomment-23558811 .
Committed changes to qqman.r
On Fri, Aug 30, 2013 at 10:07 AM, Dan Capurso dancapurso1@gmail.com wrote:
Here is the attachment. I will modify the handling of this as you indicated and commit shortly.
On Fri, Aug 30, 2013 at 5:52 AM, Stephen Turner notifications@github.comwrote:
I can't see an attachment here. Hm, I think the best way to handle this situation - if they user wishes to highlight SNPs that aren't in the results (or have missing chr/bp/P-values), best to still plot the remaining snps, but issue a warning that the specific SNP wasn't in the results.
— Reply to this email directly or view it on GitHubhttps://github.com/stephenturner/qqman/issues/5#issuecomment-23558811 .
Looks good, thanks!
working on code-from-blog-post.r, getting error at line 19:
D'oh! Highlight vector/list must be a subset of the SNP column.
. This happens even though it appears all the SNPs are in my dataset: