MRCIEU / godmc

GoDMC analysis pipeline
12 stars 2 forks source link

Step 04f crashes when trying to generate GWAS results plots #16

Open DukeOmicsAnalysis opened 7 years ago

DukeOmicsAnalysis commented 7 years ago

In Step 4f, plink is called to generate the file "positive_control_pcadjusted_cg07959070.qassoc" file. If that file contains 'NA's in the 'P' column it will crash resources/genetics/plot_gwas.R (line 37).

any(a[, pval_column] == 0) will return NA if there is an 'NA' in the p-value column, and therefore crash with the error: missing value where TRUE/FALSE needed

Possible solution is to add na.rm=TRUE to all of the any() calls.