After generating the set of causal effects at each SNP, use an LD correlation matrix to transform the effects to reflect the correlation structure at the SNPs. Note if running many repeats, only need to generate the LD-modified params once and then can repeatedly re-sample using generate_gwas_ss
generate_gwas_ss(
params,
nid,
vy = 1,
minmaf = 0.001,
ld = NULL,
ldobj = NULL,
ldobjlist = NULL,
ldobjfiles = NULL,
ldobjdir = NULL,
gwasglue2 = FALSE,
nthreads = 1
)
Output from generate_gwas_params
sample size
Variance of trait
minimum allowed maf. default=0.01 to prevent instability
LD correlation matrix. Must be same dimension as params
LD objects (e.g. see test_ldobj)
List of LD objects
Array of filenames containing LD object files (e.g. see generate_ldobj
)
Directory containing output from generate_ldobj
Logical, creates a gwasglue2 SummarySet when @param ldobj is not NULL (default FALSE).
Number of threads (can be slow for complete GWAS and large LD regions)
Updated params