Description Usage Arguments Details Value Methods (by generic)
.atrack
is an S4 generic method that converts an object into
an annotation track object.
It provides a general and flexible annotation framework that is used
by aheatmap
to annotates heatmap rows and columns.
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 | .atrack(object, ...)
is.atrack(x)
adata(x, value, ...)
amargin(x, value)
anames(x, default.margin)
alength(x, default.margin)
## S4 method for signature 'ANY'
.atrack(object, data = NULL, ...)
## S4 method for signature 'character'
.atrack(object, ...)
## S4 method for signature 'matrix'
.atrack(object, ...)
## S4 method for signature 'data.frame'
.atrack(object, ...)
atrack(
...,
order = NULL,
enforceNames = FALSE,
.SPECIAL = NA,
.DATA = NULL,
.CACHE = NULL
)
annotationTrack(x = list())
|
object |
an object from which is extracted annotation tracks |
... |
extra arguments to allow extensions and passed to the next method
call.
For |
x |
an R object |
value |
replacement value for the complete annotation data list |
default.margin |
margin to use if no margin data is stored in the
|
data |
object used to extend the annotation track within a given data
context.
It is typically a matrix-like object, against which annotation specifications
are matched using |
order |
an integer vector that indicates the order of the annotation tracks in the result list |
enforceNames |
logical that indicates if missing track names should
be generated as |
.SPECIAL |
an optional list of functions (with no arguments) that are
called to generate special annotation tracks defined by codes of the form
If |
.DATA |
data used to match and extend annotation specifications.
It is passed to argument |
.CACHE |
an |
Methods for .atrack
exist for common type of objects, which
should provide enough options for new methods to define how annotation
track are extracted from more complex objects, by coercing/filtering
them into a supported type.
atrack
returns a list, decorated with class
'annotationTrack'
, where each element contains the description
of an annotation track.
.atrack(object = ANY)
: The default method converts character or integer vectors into factors.
Numeric vectors, factors, a single NA or annotationTrack
objects are
returned unchanged (except from reordering by argument order
).
Data frames are not changed either, but class 'annotationTrack' is appended
to their original class set.
.atrack(object = character)
: Adds annotation tracks resolving special track codes that are those elements that start with ":"
.atrack(object = matrix)
: Shorcut for .atrack(as.data.frame(object), ...)
.atrack(object = data.frame)
: Considers each column as an annotation variable.
Equivalent to .atrack(as.list(object), ...)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.