MetaSTAAR_worker_sumstat: Generating summary statistics file using MetaSTAARWorker

View source: R/MetaSTAAR_worker_sumstat.R

MetaSTAAR_worker_sumstatR Documentation

Generating summary statistics file using MetaSTAARWorker

Description

The MetaSTAAR_worker_sumstat function takes in genotype, the object from fitting the null model, and variant information (unique identifier) to generate the summary statistics file for the given variant-set.

Usage

MetaSTAAR_worker_sumstat(
  genotype,
  obj_nullmodel,
  variant_info,
  qc_label = NULL
)

Arguments

genotype

an n*p genotype matrix (dosage matrix) of the target sequence, where n is the sample size and p is the number of genetic variants.

obj_nullmodel

an object from fitting the null model, which is the output from either fit_null_glm function for unrelated samples or fit_null_glmmkin function for related samples in the STAAR package.

variant_info

a data frame or matrix of variant information (unique identifier) with p rows (listed in the same order as the columns of genotype) and should contain the following 4 columns: chromosome (chr), position (pos), reference allele (ref), and alternative allele (alt).

qc_label

a vector of quality control status for each variant in variant_info, where a pass variant is labeled as "PASS". If qc_label is NULL, it is assumed that all variants are pass variants in the study (default = NULL).

Value

sumstat: the data frame of all variants in the variant-set (the summary statistics file), including the following information: chromosome (chr), position (pos), reference allele (ref), alternative allele (alt), quality control status (qc_label, optional), alternative allele count (alt_AC), minor allele count (MAC), minor allele frequency (MAF), study sample size (N), score statistic (U), variance (V), and the (low-rank decomposed) dense component of the covariance file.

References

Li, X., et al. (2023). Powerful, scalable and resource-efficient meta-analysis of rare variant associations in large whole genome sequencing studies. Nature Genetics, 55(1), 154-164. (pub)


xihaoli/MetaSTAAR documentation built on Nov. 10, 2024, 5:26 a.m.