Sliding_Window_Info: Functionally annotate rare variants in a genetic region

View source: R/Sliding_Window_Info.R

Sliding_Window_InfoR Documentation

Functionally annotate rare variants in a genetic region

Description

The Sliding_Window_Info function takes in the location of a genetic region to functionally annotate the rare variants in the region.

Usage

Sliding_Window_Info(
  chr,
  genofile,
  obj_nullmodel,
  start_loc,
  end_loc,
  known_loci = NULL,
  rare_maf_cutoff = 0.01,
  method_cond = c("optimal", "naive"),
  QC_label = "annotation/filter",
  variant_type = c("SNV", "Indel", "variant"),
  geno_missing_imputation = c("mean", "minor"),
  Annotation_dir = "annotation/info/FunctionalAnnotation",
  Annotation_name_catalog,
  Annotation_name
)

Arguments

chr

chromosome.

genofile

an object of opened annotated GDS (aGDS) file.

obj_nullmodel

an object from fitting the null model, which is either the output from fit_nullmodel function in the STAARpipeline package, or the output from fitNullModel function in the GENESIS package and transformed using the genesis2staar_nullmodel function in the STAARpipeline package.

start_loc

starting location (position) of the genetic region to be annotated.

end_loc

ending location (position) of the genetic region to be annotated.

known_loci

the data frame of variants to be adjusted for in conditional analysis and should contain 4 columns in the following order: chromosome (CHR), position (POS), reference allele (REF), and alternative allele (ALT) (default = NULL).

rare_maf_cutoff

the cutoff of maximum minor allele frequency in defining rare variants (default = 0.01).

method_cond

a character value indicating the method for conditional analysis. optimal refers to regressing residuals from the null model on known_loci as well as all covariates used in fitting the null model (fully adjusted) and taking the residuals; naive refers to regressing residuals from the null model on known_loci and taking the residuals (default = optimal).

QC_label

channel name of the QC label in the GDS/aGDS file (default = "annotation/filter").

variant_type

variants include in the conditional analysis. Choices include "variant", "SNV", or "Indel" (default = "SNV").

geno_missing_imputation

method of handling missing genotypes. Either "mean" or "minor" (default = "mean").

Annotation_dir

channel name of the annotations in the aGDS file
(default = "annotation/info/FunctionalAnnotation").

Annotation_name_catalog

a data frame containing the name and the corresponding channel name in the aGDS file.

Annotation_name

a vector of qualitative/quantitative annotation names user wants to extract.

Value

A data frame containing the basic information (chromosome, position, reference allele and alternative allele), unconditional and conditional the score test p-values, and annotation scores for the input variants.

References

Li, Z., Li, X., et al. (2022). A framework for detecting noncoding rare-variant associations of large-scale whole-genome sequencing studies. Nature Methods, 19(12), 1599-1611. (pub)


xihaoli/STAARpipelineSummary documentation built on July 27, 2024, 4:30 p.m.