GWAS_QT: GWAS_QT function

View source: R/GWAS_QT.R

GWAS_QTR Documentation

GWAS_QT function

Description

Performs genome-wide association study (GWAS) using plink2 linear model and outputs the GWAS summary statistics with additive SNP effects (beta) and standard errors (se)

Usage

GWAS_QT(plink_path, b_file, discovery_pheno, discovery_cov, thread = 20)

Arguments

plink_path

Path to the PLINK executable application

b_file

Prefix of the binary files, where all .fam, .bed and .bim files have a common prefix

discovery_pheno

Name (with file extension) of the phenotype file containing family ID, individual ID and phenotype of the discovery dataset as columns, without heading

discovery_cov

Name (with file extension) of the covariate file containing family ID, individual ID, and covariate(s) of the discovery dataset as columns, without heading. If no covariate is used, have a constant column (e.g. vector of 1s)

thread

Number of threads used (default = 20)

Details

The function uses linear regression to regress the quantitative phenotype on each SNP separately using plink 2. Then the estimated effects and standard errors are adjusted for standardization. The phenotype is standardized prior to analysis. It is optional to employ covariates in the model. If no covariate is used, create your covariate file with a constant in the 3rd column (e.g. vector of 1s).

Value

A data frame with two columns:

beta

Estimated effect size from linear regression.

se

Standard error of the effect size estimate.

Examples

## Not run: 
  results <- GWAS_QT(
    plink_path = "./plink2",
    b_file = "./binary_file_prefix",
    discovery_pheno = "./discovery_phenotype_file",
    discovery_cov = "./discovery_covariate_file",
    thread = 48
  )
  head(results)

## End(Not run)


iPRSue documentation built on Sept. 10, 2025, 10:39 a.m.

Related to GWAS_QT in iPRSue...