trackSet-class {rtracklayer} | R Documentation |
An object representing a genome annotation track. Based on
eSet
, with feature information
(chrom, start, end, strand, ...) stored in the featureData
and
data values from experimental measurements stored in the assayData
.
Objects of the class are generally created in two different ways,
depending on how the experimental data are provided. The first way is to
pass an instance of AssayData
as the
dataVals
parameter in
new("trackSet", assayData,
phenoData = annotatedDataFrameFrom(assayData, byrow=FALSE),
featureData = annotatedDataFrameFrom(assayData, byrow=TRUE),
experimentData = new("MIAME"),
annotation = character(), genome = "hg18")
.
The AssayData
object must contain a matrix or data.frame named
dataVals
, which should contain the experimental
measurements. Alternatively, the experimental measurements may be
passed as the dataVals
parameter in
new("trackSet",
phenoData = annotatedDataFrameFrom(assayData, byrow=FALSE),
featureData = annotatedDataFrameFrom(assayData, byrow=TRUE),
experimentData = new("MIAME"),
annotation = character(), dataVals = matrix(), genome = "hg18")
.
genome
:"character"
identifying
the genome to which this track pertains. Should be specified
according to the conventions of the UCSC browser (e.g. "hg18"),
if possible.assayData
:"AssayData"
holding
the experimental measurements. phenoData
:"AnnotatedDataFrame"
holding the experimental design matrix. featureData
:"AnnotatedDataFrame"
holding the feature information,
generally including columns chrom
(chromosome name),
start
(numeric start position),
end
(numeric end position)
and strand
(DNA strand: "+", "-" or NA
). Note that
the intervals are closed, i.e. the selected region is [start,stop].experimentData
:"MIAME"
with
experimental metadata. annotation
:"character"
identifying the annotation resource. .__classVersion__
:"Versions"
specifying the version of the class.
Class "eSet"
, directly.
Class "VersionedBiobase"
, by class "eSet", distance 2.
Class "Versioned"
, by class "eSet", distance 3.
object[i, j]
i
is an feature index, feature
name or chrid
for selecting features and
j
is a sample index or name for selecting samples from
the experimental data.chrid(object)
chrid
, which is a vector with
an element representing the chromosome for each feature in this track. dataVals(object)
chrom(object)
start(x)
end(x)
strand(object)
NA
) of the features. genomeSegment(object)
trackData(object)
data.frame
. The result is
the column-wise combination of the featureData
slot with the
dataVals
matrix. The function also adds a seqMid
column, which holds the mid-point of the segment of each
feature. This is useful for e.g. plotting.
genome(object)
genome
slot.trackData
above.trackSets(object)
trackSets
instance initially containing only
this track. export.bed(object, con, wig = FALSE)
export.gff(object, con,
version = c("1", "2", "3"), source = "rtracklayer")
export.ucsc(object, con, subformat = c("gff", "wig"),
name = deparse(substitute(object)), ...)
export.wig(object, con,
dataFormat = c("bed", "variableStep", "fixedStep"))
Michael Lawrence
layTrack
for loading a track into a genome browser.
import
to create a trackSet
from a file,
export
to write a trackSet
to a file.