File: MultiAssayExperiment-class.Rd

package info (click to toggle)
r-bioc-multiassayexperiment 1.16.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 924 kB
  • sloc: sh: 13; makefile: 2
file content (231 lines) | stat: -rw-r--r-- 7,501 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MultiAssayExperiment-class.R,
%   R/MultiAssayExperiment-methods.R, R/assay-methods.R
\docType{class}
\name{MultiAssayExperiment-class}
\alias{MultiAssayExperiment-class}
\alias{show,MultiAssayExperiment-method}
\alias{length,MultiAssayExperiment-method}
\alias{names,MultiAssayExperiment-method}
\alias{updateObject,MultiAssayExperiment-method}
\alias{coerce-MultiAssayExperiment}
\alias{coerce,list,MultiAssayExperiment-method}
\alias{coerce,List,MultiAssayExperiment-method}
\alias{dimnames,MultiAssayExperiment-method}
\alias{c,MultiAssayExperiment-method}
\alias{exportClass,MultiAssayExperiment-method}
\alias{exportClass}
\alias{assays,MultiAssayExperiment-method}
\alias{assay,MultiAssayExperiment,missing-method}
\alias{assay,MultiAssayExperiment,numeric-method}
\alias{assay,MultiAssayExperiment,character-method}
\title{MultiAssayExperiment - An integrative multi-assay class for experiment data}
\usage{
\S4method{show}{MultiAssayExperiment}(object)

\S4method{length}{MultiAssayExperiment}(x)

\S4method{names}{MultiAssayExperiment}(x)

\S4method{updateObject}{MultiAssayExperiment}(object, ..., verbose = FALSE)

\S4method{dimnames}{MultiAssayExperiment}(x)

\S4method{c}{MultiAssayExperiment}(x, ..., sampleMap = NULL, mapFrom = NULL)

\S4method{exportClass}{MultiAssayExperiment}(
  object,
  dir = tempdir(),
  fmt,
  ext,
  match = FALSE,
  verbose = TRUE,
  ...
)

\S4method{assays}{MultiAssayExperiment}(x, withDimnames = TRUE, ...)

\S4method{assay}{MultiAssayExperiment,missing}(x, i, withDimnames = TRUE, ...)

\S4method{assay}{MultiAssayExperiment,numeric}(x, i, withDimnames = TRUE, ...)

\S4method{assay}{MultiAssayExperiment,character}(x, i, withDimnames = TRUE, ...)
}
\arguments{
\item{object, x}{A \code{MultiAssayExperiment} object}

\item{...}{Additional arguments for supporting functions. See details.}

\item{verbose}{logical(1) Whether to print additional information (default
TRUE)}

\item{sampleMap}{\code{c} method: a \code{sampleMap} \code{list} or
\code{DataFrame} to guide merge}

\item{mapFrom}{Either a \code{logical}, \code{character}, or \code{integer}
vector indicating the experiment(s) that have an identical colname order as
the experiment input(s)}

\item{dir}{character(1) A directory for saving exported data (default:
`tempdir()`)}

\item{fmt}{character(1) or function() Either a format character atomic as
supported by `write.table` either ('csv', or 'tsv') or a function whose
first two arguments are 'object to save' and 'file location'}

\item{ext}{character(1) A file extension supported by the format argument}

\item{match}{logical(1) Whether to coerce the current object to a
'MatchedAssayExperiment' object (default: FALSE)}

\item{withDimnames}{logical (default TRUE) whether to return dimension names
included in the object}

\item{i}{An integer or character scalar indicating the assay to return}
}
\value{
A \code{MultiAssayExperiment} object
}
\description{
The \code{MultiAssayExperiment} class can be used to manage results of
diverse assays on a collection of specimen. Currently,  the class can handle
assays that are organized instances of
\code{\linkS4class{SummarizedExperiment}},
\code{\linkS4class{ExpressionSet}}, \code{matrix},
\code{\link[RaggedExperiment:RaggedExperiment-class]{RaggedExperiment}}
(inherits from \code{\linkS4class{GRangesList}}), and \code{RangedVcfStack}.
Create new \code{MultiAssayExperiment} instances with the homonymous
constructor, minimally with the argument \code{\link{ExperimentList}},
potentially also with the arguments \code{colData} (see section below) and
\code{\link{sampleMap}}.
}
\details{
The dots (\code{\ldots}) argument allows the user to specify additional
arguments in several instances.
\itemize{
\item subsetting \strong{[}: additional arguments sent to
    \link[GenomicRanges:findOverlaps-methods]{findOverlaps}.
\item mergeReplicates: used to specify arguments for the \code{simplify}
    functional argument
\item assay: may contain withDimnames, which is forwarded to assays
\item combining \strong{c}: compatible \code{MultiAssayExperiment} classes
    passed on to the \linkS4class{ExperimentList} constructor, can be a
    \code{list}, \linkS4class{List}, or a series of named arguments. See
    the examples below.
}
}
\section{Methods (by generic)}{
\itemize{
\item \code{show}: Show method for a
\code{MultiAssayExperiment}

\item \code{length}: Get the length of ExperimentList

\item \code{names}: Get the names of the ExperimentList

\item \code{updateObject}: Update old serialized MultiAssayExperiment
objects to new API

\item \code{dimnames}: Get the dimension names
for a \code{MultiAssayExperiment} object

\item \code{c}: Add a supported data class to the
\code{ExperimentList}

\item \code{exportClass}: Export data from class to a series
of text files

\item \code{assays}: Obtain a \code{\link{SimpleList}} of assay
data for all available experiments in the object

\item \code{assay}: Convenience function for extracting the
assay of the first element (default) in the \code{ExperimentList}. A
\code{numeric} or \code{character} index can also be provided
}}

\section{Slots}{

\describe{
\item{\code{ExperimentList}}{A \code{\link{ExperimentList}} class object for
each assay dataset}

\item{\code{colData}}{A \code{DataFrame} of all clinical/specimen data available
across experiments}

\item{\code{sampleMap}}{A \code{DataFrame} of translatable identifiers
of samples and participants}

\item{\code{metadata}}{Additional data describing the
\code{MultiAssayExperiment} object}

\item{\code{drops}}{A metadata \code{list} of dropped information}
}}

\section{colData}{

The \code{colData} slot is a collection of primary specimen data valid
across all experiments. This slot is strictly of class
\code{\linkS4class{DataFrame}} but arguments for the constructor function
allow arguments to be of class \code{data.frame} and subsequently coerced.
}

\section{ExperimentList}{

The \code{\link{ExperimentList}} slot is designed to contain results from
each experiment/assay. It contains a \linkS4class{SimpleList}.
}

\section{sampleMap}{

The \code{\link{sampleMap}} contains a \code{DataFrame} of translatable
identifiers of samples and participants or biological units. Standard column
names of the sampleMap are "assay", "primary", and "colname".
}

\section{coercion}{

Convert a \code{list} or S4 \code{List} to a MultiAssayExperiment object using the
\link[methods]{as} function.

In the following example, \code{x} is either a \code{list} or \linkS4class{List}:\preformatted{`as(x, "MultiAssayExperiment")`
}
}

\examples{
example("MultiAssayExperiment")

## Subsetting
# Rows (i) Rows/Features in each experiment
mae[1, , ]
mae[c(TRUE, FALSE), , ]

# Columns (j) Rows in colData
mae[, rownames(colData(mae))[3:2],  ]

# Assays (k)
mae[, , "Affy"]

## Complete cases (returns logical vector)
completes <- complete.cases(mae)
compMAE <- mae[, completes, ]
compMAE
colData(compMAE)

example("MultiAssayExperiment")

## Add an experiment
test1 <- mae[[1L]]
colnames(test1) <- rownames(colData(mae))

## Combine current MultiAssayExperiment with additional experiment
## (no sampleMap)
c(mae, newExperiment = test1)

test2 <- mae[[3L]]
c(mae, newExp = test2, mapFrom = 3L)

}
\seealso{
\link{MultiAssayExperiment-methods} for slot modifying methods
    \href{https://github.com/waldronlab/MultiAssayExperiment/wiki/MultiAssayExperiment-API}{MultiAssayExperiment API}
}