plink_glm | R Documentation |
plink2 --glm
and returns table of association statistics.A wrapper for running plink2's genetic association test followed by reading of the results by read_plink_glm()
.
The --glm
option is run with the modifiers omit-ref
and hide-covar
, which simplifies outputs.
plink_glm(
name,
name_phen = name,
name_out = name,
file_covar = NULL,
vif = NA,
max_corr = NA,
plink_bin = "plink2",
threads = 0,
ver_older = FALSE,
verbose = TRUE
)
name |
The shared name of the input plink BED/BIM/FAM files without extensions. |
name_phen |
The base name of the phenotype file without PHEN extension (default same as input |
name_out |
The base name of the output statistics file (default same as input |
file_covar |
Optional file path of fixed covariates for GLM. Pass the EIGENVEC file (with extension) to control for population structure using principal components. |
vif |
Maximum variance inflation factor (VIF).
Plink applies a value of 50 by default to check for multicollinearity of the covariates, stopping with an error if any covariates have a VIF exceeding the maximum allowed.
Here, |
max_corr |
Maximum covariate correlation.
Plink applies a value of 0.999 by default to check for multicollinearity of the covariates, stopping with an error if any covariates have a correlation exceeding the maximum allowed.
Here, |
plink_bin |
The path to the binary executable.
Default assumes |
threads |
The number of threads to use.
The values 0 (default), NA, or NULL use all threads available (the output of |
ver_older |
Handles the case of missing covariates appropriately for older plink2 versions.
In the newer versions we must include |
verbose |
If |
The table of genetic association statistics, as a tibble
, read with read_plink_glm()
(see that for more info).
read_plink_glm()
for parsing the output of plink2 --glm
.
delete_files_plink_glm()
, delete_files_log()
for deleting the output of plink2 --glm
.
system3()
, used (with ret = FALSE
) for executing plink2
and error handling.
## Not run:
data <- plink_glm( name, name_out = name_out )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.