removeIndex: A function to remove probes in an environment

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/removeIndex.R

Description

A function to remove probes in an environment, given their index.

Usage

1
removeIndex(x, i, simplify = TRUE, verbose = FALSE)

Arguments

x

An instance of CdfEnvAffy-class

i

A vector of indexes (integers !).

simplify

Simply the resulting CdfEnvAffy (see details).

verbose

verbose output or not.

Details

The probes to be removed are set to NA in the CdfEnvAffy. When simplify is set to TRUE the probe sets are simplified whenever possible. For example, if both pm and mm for the same probe pair are set to NA, then the probe pair is removed from the probe set.

Value

An instance of CdfEnvAffy-class is returned.

Author(s)

Laurent Gautier

See Also

CdfEnvAffy-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## use plasmodiumanopheles chip as an example
if (require(plasmodiumanophelescdf)) {

  ## wrap in a (convenient) CdfEnvAffy object
  planocdf <- wrapCdfEnvAffy(plasmodiumanophelescdf, 712, 712, "plasmodiumanophelescdf")
  print(planocdf)

  ## ask for the probe indexed '10759' to be removed
  ## (note: if one wishes to remove from X/Y coordinates,
  ## the function xy2index can be of help).
  planocdfCustom <- removeIndex(planocdf, as.integer(10759))

  ## let see what happened (we made this example knowing in which
  ## probe set the probe indexed '10759' is found).
  indexProbes(planocdf, "pm", "200000_s_at")
  indexProbes(planocdfCustom, "pm", "200000_s_at")
  ## The 'second' pm probe (indexed '10579') in the probe set is now set
  ## to NA.
}

altcdfenvs documentation built on Nov. 8, 2020, 7:12 p.m.