isHeterozygous: Assess whether genotype is heterozygous based on BAFs

Description Usage Arguments Examples

Description

Assess whether genotype is heterozygous based on BAFs

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
isHeterozygous(object, cutoff)

## S4 method for signature 'ArrayViews'
isHeterozygous(object, cutoff)

## S4 method for signature 'SnpArrayExperiment'
isHeterozygous(object, cutoff)

## S4 method for signature 'numeric'
isHeterozygous(object, cutoff)

## S4 method for signature 'matrix'
isHeterozygous(object, cutoff)

Arguments

object

a SnpArrayExperiment or ArrayViews object containing BAFs, a matrix of BAFs, or a numeric vector of BAFs. vector of BAFs

cutoff

a length-two numeric vector providing the range of BAFs consistent with allelic heterozygosity

Examples

1
2
3
4
5
6
if(require("BSgenome.Hsapiens.UCSC.hg18")){
  bsgenome <- BSgenome.Hsapiens.UCSC.hg18
  snp_exp <- getExampleSnpExperiment(bsgenome)
  is_het <- isHeterozygous(snp_exp[, 1], c(0.4, 0.6))
  table(is_het)
}

rscharpf/VanillaICE documentation built on May 15, 2019, 5:51 p.m.