getInput: SNP selection and clumping based on GWAS summary statistics

Description Usage Arguments Value

Description

SNP selection and clumping based on GWAS summary statistics

Usage

1
2
3
getInput(sel.files, exp.files, out.file, plink_exe, plink_refdat,
  p.thres = 0.01, clump.directly = F, clump_r2 = 0.001,
  keep.pval0.snps = F)

Arguments

sel.files

A vector of length k of the GWAS summary statistics file names of the k risk factors SNP selection. Each GWAS file is an ".rda" or ".rData" file containing an R object of name "dat". The "dat" object is a data frame that at least has a column "SNP" for the SNP ids, "pval" for the p-values.

exp.files

A vector of length k of the GWAS summary statistics file names of the k risk factors for getting the effect sizes and standard deviations. Each GWAS file should have a column "SNP" for the SNP ids, "beta" for the effect sizes, "se" for the standard deviation, "effect_allele" for the effect allele of the SNP (capitalized letters) and "other_allele" for the other allele of the SNP (capitalized letters).

out.file

The GWAS summary statistics file name for the outcome data. Each GWAS file should have a column "SNP" for the SNP ids, "beta" for the effect sizes, "se" for the standard deviation, "effect_allele" for the effect allele of the SNP (capitalized letters) and "other_allele" for the other allele of the SNP (capitalized letters).

plink_exe

The excutable file of PLINK

plink_refdat

The reference files (.bed, .bim, .fam) for PLINK

p.thres

The upper threshold of the selection p-values for a SNP to be selected before clumping. It only requires that at least one of the p-values of the risk factors of the SNPs to be below the threshold.

clump.directly

Whether the clump is done directly on the union of selection files SNPs, or the intersection of the SNPs in any of the selection files, the SNPs in any of the exposure files and the SNPs in the outcome GWAS data file. Default is FALSE

clump_r2

The clumping r2 threshold in PLINK. Default is set to 0.001 for selection of independent SNPs, and can be set to a higher value when select candidate SNPs for the marker SNPs.

keep.pval0.snp

Whether keep all the SNPs whose minimum selection p-values is 0. Useful for selection of marker SNPs when set to TRUE. Default is FALSE

Value

A list of selected summary statistics


jingshuw/GRAPPLE-beta- documentation built on June 7, 2019, 2:37 p.m.