calculateMappingBiasVcf: Calculate Mapping Bias

View source: R/calculateMappingBiasVcf.R

calculateMappingBiasVcfR Documentation

Calculate Mapping Bias

Description

Function calculate mapping bias for each variant in the provided panel of normals VCF.

Usage

calculateMappingBiasVcf(
  normal.panel.vcf.file,
  min.normals = 1,
  min.normals.betafit = 7,
  min.normals.assign.betafit = 3,
  min.normals.position.specific.fit = 10,
  min.median.coverage.betafit = 5,
  num.betafit.clusters = 9,
  min.betafit.rho = 1e-04,
  max.betafit.rho = 0.2,
  yieldSize = 50000,
  genome
)

Arguments

normal.panel.vcf.file

character(1) Combined VCF file of a panel of normals, reference and alt counts as AD genotype field. Needs to be compressed and indexed with bgzip and tabix, respectively.

min.normals

Minimum number of normals with heterozygous SNP for calculating position-specific mapping bias.

min.normals.betafit

Minimum number of normals with heterozygous SNP fitting a beta binomial distribution

min.normals.assign.betafit

Minimum number of normals with heterozygous SNPs to assign to a beta binomal fit cluster

min.normals.position.specific.fit

Minimum normals to use position-specific beta-binomial fits. Otherwise only clustered fits are used.

min.median.coverage.betafit

Minimum median coverage of normals with heterozygous SNP for fitting a beta binomial distribution

num.betafit.clusters

Maximum number of beta binomial fit clusters

min.betafit.rho

Minimum dispersion factor rho

max.betafit.rho

Maximum dispersion factor rho

yieldSize

See TabixFile

genome

See readVcf

Value

A GRanges object with mapping bias and number of normal samples with this variant.

Author(s)

Markus Riester

Examples


normal.panel.vcf <- system.file("extdata", "normalpanel.vcf.gz",
    package = "PureCN")
bias <- calculateMappingBiasVcf(normal.panel.vcf, genome = "h19")
saveRDS(bias, "mapping_bias.rds")


lima1/PureCN documentation built on Sept. 17, 2024, 5:48 a.m.