Learn R Programming

VanillaICE (version 1.34.0)

isHeterozygous: Assess whether genotype is heterozygous based on BAFs

Description

Assess whether genotype is heterozygous based on BAFs

Usage

isHeterozygous(object, cutoff)
"isHeterozygous"(object, cutoff)
"isHeterozygous"(object, cutoff)
"isHeterozygous"(object, cutoff)
"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

Run this code
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)
}

Run the code above in your browser using DataLab