subsetByLoci: Subset an RGChannelset by CpG loci.

View source: R/RGChannelSet-class.R

subsetByLociR Documentation

Subset an RGChannelset by CpG loci.

Description

Subset an RGChannelSet by CpG loci.

Usage

subsetByLoci(rgSet, includeLoci = NULL, excludeLoci = NULL,
             keepControls = TRUE, keepSnps = TRUE)

Arguments

rgSet

An object of class RGChannelSet (or RGChannelSetExtended).

includeLoci

A character vector of CpG identifiers which should be kept.

excludeLoci

A character vector of CpG identifiers which should be excluded.

keepControls

Should control probes be kept?

keepSnps

Should SNP probes be kept?

Details

This task is non-trivial because an RGChannelSet is indexed by probe position on the array, not by loci name.

Value

An object of class RGChannelSet, which some probes removed.

Examples

if(require(minfiData)) {
  loci <- c("cg00050873", "cg00212031", "cg00213748", "cg00214611")
  subsetByLoci(RGsetEx.sub, includeLoci = loci)
  subsetByLoci(RGsetEx.sub, excludeLoci = loci)
}

hansenlab/minfi documentation built on May 3, 2024, 3:49 p.m.