callGeno_typeII: Call genotypes for Type II probes

View source: R/typeII_probe.R

callGeno_typeIIR Documentation

Call genotypes for Type II probes

Description

Call genotypes for Type II probes

Usage

callGeno_typeII(
  inData,
  input = "raw",
  plotRAI = FALSE,
  vcf = FALSE,
  vcfName = "genotypes.typeII_probe.vcf",
  bw = 0.04,
  minDens = 0.001,
  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,
  cpu = 1,
  pop = "EAS",
  maxiter = 50,
  bayesian = FALSE,
  platform = "EPIC",
  verbose = 1
)

Arguments

inData

If input="raw", provide rgData here (Noob and dye-bias corrected signals produced by using correct_noob_dye). Otherwise, provide beta or M-value matrix here.

input

Input data types. One of "raw", "beta", and "mval". If input is "beta" or "mval", please use probes as rows and samples as columns.

plotRAI

If TRUE, plot distribution of RAIs.

vcf

If TRUE, will write a VCF file in the current directory.

vcfName

VCF file name. Only effective when vcf=TRUE.

bw

band width.

minDens

A parameter for mode test. Minimum density for a valid peak.

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.

cpu

Number of CPU cores.

pop

Population. One of EAS, AMR, AFR, EUR, SAS, and ALL. Only probes with MAF of matching population > 0.01 will be kept.

maxiter

Maximal number of iterations for the EM algorithm.

bayesian

Use the Bayesian approach to calculate posterior genotype probabilities.

platform

EPIC or 450K.

verbose

Verbose mode: 0/1/2.

Value

A list 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).

methyl_recalc

Re-calculated methylation levels on reference alleles. A list containing shapes of the mixed beta distributions and true methylation level (pM) for each probe.


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