Description Details Accessor methods Constructor Coercion Author(s) See Also Examples
GenomeData formally represents genomic data as a
list, with one element per chromosome in the genome.
This class facilitates storing data on the genome by formalizing a set of metadata fields for storing the organism (e.g. Mmusculus), genome build provider (e.g. UCSC), and genome build version (e.g. mm9).
The data is represented as a list, with one element per chromosome (or really any sequence, like a gene). There are no constraints as to the data type of the elements.
Note that as a SimpleList, it is possible to store
chromosome-level data (e.g. the lengths) in the elementMetadata
slot. The organism, provider and providerVersion
are all stored in the SimpleList metadata, so they may be
retrieved in list form by calling metadata(x).
In the code snippets below, x is a GenomeData object.
organism(x):
Get the single string indicating the
organism, if specified, otherwise NULL.
provider(x):
Get the single string indicating the
genome build provider, if specified, otherwise NULL.
providerVersion(x):
Get the single string indicating the
genome build version, if specified, otherwise NULL.
GenomeData(listData = list(),
providerVersion = metadata[["providerVersion"]],
organism = metadata[["organism"]],
provider = metadata[["provider"]],
metadata = list(),
elementMetadata = NULL, ...):
Creates a GenomeData with the elements from the
listData parameter, a list. The other arguments correspond to
the metadata fields, and, with the exception of elementMetadata,
should all be either single strings or NULL (unspecified).
Additional global metadata elements may be
passed in metadata, in list-form, and via .... The
elements in metadata are always overridden by the explicit
arguments, like organism and those in ....
elementMetadata should be an DataTable
or NULL.
as(from, "data.frame"): Coerces each subelement to a
data frame, and binds them into a single data frame with an
additional column indicating chromosome
as(from, "RangesList"): Coerces each subelement to a
Ranges and combines them into a
RangesList with the same names. The
“universe” metadata property is set to the
providerVersion of from.
as(from, "RangedData"): Coerces each subelement to a
RangedData and combines them into a single
RangedData with the same names. The
“universe” metadata property is set to the
providerVersion of from.
Michael Lawrence
GenomeDataList-class, a container for storing a list of GenomeData objects and useful e.g. for storing data on multiple samples.
SimpleList-class, the base of this class.
gdapply for applying a function to elements of a
GenomeData object.
gdReduce for successively combining GenomeData objects
into a single GenomeData objects.
1 2 3 4 5 6 7 | gd <- GenomeData(list(chr1 = IRanges(1, 10), chrX = IRanges(2, 5)),
organism = "Mmusculus", provider = "UCSC",
providerVersion = "mm9")
organism(gd)
providerVersion(gd)
provider(gd)
gd[["chr1"]] # get data for chromsome 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.