| GenomeData-class {BSgenome} | R Documentation |
WARNING: Starting with BioC 3.1, GenomeData and GenomeDataList objects are defunct. Note that the GenomeData/GenomeDataList containers predate the GRanges/GRangesList containers and, most of the times, the latters can be used instead of the formers. Please let us know on the bioc-devel mailing list (http://bioconductor.org/help/mailing-list/) if you have a use case where you think there are significant benefits in using GenomeData/GenomeDataList over GRanges/GRangesList, or if you have questions or concerns about this.
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, object and x are
GenomeData objects.
organism(object):
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
The GRanges and GRangesList classes defined and documented in the GenomicRanges package.
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.
## Not run:
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
## End(Not run)