recal_Geno: Recalibrate genotypes for samples of mixed population

View source: R/recalibrate_genotypes.R

recal_GenoR Documentation

Recalibrate genotypes for samples of mixed population

Description

Recalibrate genotypes for samples of mixed population

Usage

recal_Geno(
  genotypes,
  type,
  indAF,
  platform = "EPIC",
  GP_cutoff = 0.9,
  outlier_cutoff = "max",
  missing_cutoff = 0.1,
  R2_cutoff_up = 1.1,
  R2_cutoff_down = 0.75,
  MAF_cutoff = 0.01,
  HWE_cutoff = 1e-06
)

Arguments

genotypes

A list returned by either callGeno_snp, callGeno_typeI, or callGeno_typeII function.

type

One of snp_probe, typeI_probe, and typeII_probe.

indAF

A matrix of individual-specific AFs. Provide SNPs as rows and samples as columns.

platform

EPIC or 450K.

GP_cutoff

When calculating missing rate, genotypes with the highest genotype probability < GP_cutoff will be treated as missing.

outlier_cutoff

"max" or a number ranging from 0 to 1. If outlier_cutoff="max", genotypes with outlier probability larger than all of the three genotype probabilities will be set as missing. If outlier_cutoff is a number, genotypes with outlier probability > outlier_cutoff will be set as missing.

missing_cutoff

Missing rate cutoff to filter variants. Note that for VCF output, variants with missing rate above the cutoff will be marked in the FILTER column. For the returned dosage matrix, variants with missing rate above the cutoff will be removed.

R2_cutoff_up, R2_cutoff_down

R-square cutoffs to filter variants (Variants with R-square > R2_cutoff_up or < R2_cutoff_down should be removed). Note that for VCF output, variants with R-square outside this range will be marked in the FILTER column. For the returned dosage matrix, variants with R-square outside this range will be removed.

MAF_cutoff

A MAF cutoff to filter variants. Note that for VCF output, variants with MAF below the cutoff will be marked in the FILTER column. For the returned dosage matrix, variants with MAF below the cutoff will be removed.

HWE_cutoff

HWE p value cutoff to filter variants. Note that for VCF output, variants with HWE p value below the cutoff will be marked in the FILTER column. For the returned dosage matrix, variants with HWE p value below the cutoff will be removed.

Value

A list of recalibrated genotypes containing

dosage

A matrix of genotype calls. Variants with R2s, HWE p values, MAFs, or missing rates beyond the cutoffs are removed.

genotypes

A list containing RAI, shapes of the mixed beta distributions, prior probabilities that the RAI values belong to one of the three genotypes, proportion of RAI values being outlier (U), and genotype probability (GP)

indAF

A matrix of individual-specific AFs.


Yi-Jiang/MethyGenotyper documentation built on Sept. 4, 2024, 12:47 p.m.