Use user-provided list of genetic variants with weights for a trait to create a polygenic score
Usage
create_pgs(
in_file,
out_file = "tmp",
pgs_name = "pgs",
source = "imputed",
overwrite = FALSE,
progress = FALSE,
verbose = FALSE,
very_verbose = FALSE
)
Arguments
- in_file
A data frame or file path. Must contain rsid, chr, pos, effect_allele, other_allele, beta. For imputed genos pos is build 37. For DRAGEN pos is build 38. Other columns are ignored.
- out_file
A string. Prefix for output files (optional)
default="tmp"
- pgs_name
A string. Variable name for created PGS (optional)
default="pgs"
- source
A string. Either "imputed" or "dragen" - indicating whether the variants should be from "UKB imputation from genotype" (field 22828) or "DRAGEN population level WGS variants, pVCF format [500k release]" (field 24310)
default="imputed"
- overwrite
Logical. Overwrite output BED files? (If out_file is left as 'tmp' overwrite is set to TRUE),
default=FALSE
- progress
Logical. Show progress through each individual file,
default=FALSE
- verbose
Logical. Be verbose (show individual steps),
default=FALSE
- very_verbose
Logical. Be very verbose (show individual steps & show terminal output from Plink etc),
default=FALSE
Examples
liver_pgs <- create_pgs(in_file=system.file("files", "pgs_liver_cirrhosis.txt", package="ukbrapR"), out_file="liver_cirrhosis.imputed.pgs", pgs_name="liver_cirrhosis_pgs")