Last data update: 2014.03.03

R: Retrieve heterozygous SNPs
heterozygousSNPsR Documentation

Retrieve heterozygous SNPs

Description

Heterozygous SNPs are determined based on quality score criteria

Usage

  heterozygousSNPs(object, threshold=0.9, useQuality=TRUE, relative=TRUE, 
                   percentile=FALSE)

Arguments

object

class SnpSetIllumina

threshold

numeric (0:1) minimum quality score to be called heterozygous

useQuality

logical, use quality score

relative

logical, use quality score relative to GTS, see details

percentile

logical, use percentage of probes above threshold

Details

This function presumes that the specificity for determining heterozygity is more important than the sensitivity, and will therefore only call probes heterozygous if that can be done with high certainty.
The Illumina genotyping software calculates two quality measures: gen train score (GTS) and gen call score (GCS). The GTS is a measure for how well clusters can be recognized in a training set. This value is probe specific, and the same for all samples in an experiment. The GCS is a probe-specific, sample specific value that measures how close a probe in a sample is to the clusters determined in the training step. This value is always lower than the GTS for a probe.
read.SnpSetIllumina will put GCS into the callProbability element of the assaydata slot and the GTS into the featureData slot. The function uses these locations to retrieve the necessary information.
If relative is FALSE then the raw GCS values are compared to the threshold. In this case a threshold of around 0.5 should be used. If relative is TRUE then GCS/GTS is compared to the threshold and threshold should be around 0.9.
With percentile=TRUE the threshold quantile is calculated for each sample, and only probes with higher scores can be called heterozygous. A threshold of around 0.2 seems to work fine usually.

Value

This function returns a logical matrix with same dimensions as object.

Note

The purpose of the function is to separate heterozygous probes from non-heterozygous probes. In tumor samples the determination of the genotype can be difficult, because of aneuploidy and the fact that a sample is often a mixture of normal and tumor cells.

Author(s)

Jan Oosting

See Also

SnpSetIllumina-class

Examples

  data(chr17.260)
  plot(heterozygosity(heterozygousSNPs(chr17.260[,"514TV"])),col="red",pch="x")
  points(heterozygosity(exprs(chr17.260)[,"514TV"]))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(beadarraySNP)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: quantsmooth
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/beadarraySNP/heterozygousSNPs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: heterozygousSNPs
> ### Title: Retrieve heterozygous SNPs
> ### Aliases: heterozygousSNPs
> ### Keywords: manip
> 
> ### ** Examples
> 
>   data(chr17.260)
>   plot(heterozygosity(heterozygousSNPs(chr17.260[,"514TV"])),col="red",pch="x")
>   points(heterozygosity(exprs(chr17.260)[,"514TV"]))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>