pvdiv_fbm_qq.Rd
This function takes GWAS results from the dive_ functions of snpdiver that create FBM of univariate GWAS effects. It uses ggplot2 to plot these distributions against one another for comparison purposes.
pvdiv_fbm_qq(
effects,
metadata,
e_row = 1,
o_row = 2:nrow(metadata),
thr = 5,
suffix = NA,
outputdir = "."
)
GWAS output saved as an FBM with an .rds and .bk file generated by dive_phe2effects or dive_phe2mash functions of snpdiver. Load this into the R environment using bigstatsr::big_attach.
The metadata associated with GWAS output generated by dive_phe2effects or dive_phe2mash functions of snpdiver. Eventually this and gwas should be rolled into a new object type for R, but not yet.
Integer. The row number of gwas_meta that corresponds to the expected GWAS. This will be plotted on the x-axis for all comparisons.
Integer vector. The rownumbers of gwas_meta that are the observed GWAS. These will be compared to the expected GWAS in e_row.
Numeric. -log10p threshold. Only SNPs with an expected -log10p value above this threshold will be plotted.
Optional character vector to give saved files a unique search string/name.
String or file.path() to the output directory. Default is the working directory.
Plots saved to disk in a "analysis/gwas_comps" folder comparing the expected distribution, e_row, to all observed gwas distributions, o_row.