extract.MicroarrayData: Gets a subset of data specified by fields, slides and/or spot...

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

Description

Gets a subset of data specified by fields, slides and/or spot indices. Returns the specified subset of the microarray data as data frame with a first column specifying the slide. If the fields argument is not specified, all fields are considered. If the slides argument is not specified, all slides are considered. All data elements returned matches by field (name or index) AND by slide number AND by spot index.

Usage

1
2
## S3 method for class 'MicroarrayData'
extract(this, fields=NULL, slides=NULL, index=NULL, ...)

Arguments

fields

The field names or indices to be returned. If NULL, all fields are included.

slides

The slides that should be included. If NULL, all slides are included.

index

The spot indices that should be included. If NULL, all spots are included.

Any of the above arguments are optional.

Details

This method was formerly named get(), but since this is a insecure name of a method it was renamed. In addition to the fields as of getFieldNames(), there are also three special fields: 1) slide, 2) spot and 3) gene. These fields are not accessable fields per se, but they are calculated on request. The field gene is only returned if there are within-slide replicates defined (see class Layout). For instance, as.data.frame() asks for these fields internally.

Value

Returns a data.frame.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

*as.data.frame(). For more information see MicroarrayData.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
  SMA$loadData("mouse.data")
  layout <- Layout$read("MouseArray.Layout.dat", path=system.file("data-ex", package="aroma"))
  raw <- RawData(mouse.data, layout=layout)
  ma <- getSignal(raw)

  # Get the log ratios (M) for spots 4-7 in the slide 2,3 and 4.
  extract(ma, c("slide", "M"), slides=2:4, index=4:7)
  # Gives:
  #      slide           M
  #   1      2 -0.41129383
  #   2      2 -0.44570800
  #   3      2 -0.16409736
  #   4      2 -0.22462037
  #   5      3 -0.51599488
  #   6      3 -0.30718292
  #   7      3 -0.54794073
  #   8      3 -0.42497673
  #   9      4  0.51019368
  #   10     4  0.31210389
  #   11     4  0.08827923
  #   12     4 -0.12370050

HenrikBengtsson/aroma documentation built on May 7, 2019, 12:56 a.m.