calcErrorRate: Calculate effective error rate

Description Usage Arguments Value Examples

View source: R/calculate.R

Description

Calculate effective error rate from sequencing, alignment, and other potential error sources

Usage

1
calcErrorRate(type, snpsCov, snpsRef, snpsAlt, cnvs = NULL, n = 0.1)

Arguments

type

Type of SNPs provided in snpsCov, snpsRef, and snpsAlt used to estimate effective error. This should be (an unambiguous abbreviation of) one of 'homo_ref', 'homo_alt', or 'het'.

snpsCov

A matrix of snp positions as rows and cells as columns with each value corresponding to the total read count at the corresponding snp position in the corresponding cell

snpsRef

A matrix of snp positions as rows and cells as columns with each value corresponding to the reference read count at the corresponding snp position in the corresponding cell. Should have the same snp positions and cells as in snpsCov

snpsAlt

A matrix of snp positions as rows and cells as columns with each value corresponding to the alternative read count at the corresponding snp position in the corresponding cell. Should have the same snp positions and cells as in snpsCov

cnvs

A vector of copy number variation regions or other regions with entry as a string in format 'chromosome:start:end'. Optional. Default = NULL

n

Minimum fraction of cell in which we must have coverage at a snp position. Useful for eliminating false positives. Default = 0.1

Value

Effective error rate

Examples

1
2
3
4
5
6
## Not run: 
deletion.region <- data.frame('chr'=2, start=0, end=1e9)
calcErrorRate('het', snpsCov, snpsRef, snpsAlt, cnvs=deletion.region) # ignore regions imapcted by deletion
calcErrorRate('het', snpsCov, snpsRef, snpsAlt) # use all regions

## End(Not run)

JEFworks/badger documentation built on May 7, 2019, 7:40 a.m.