assay,RangedRaggedAssay,missing-method {MultiAssayExperiment} | R Documentation |
This function can take a GRanges argument and use each range to check for
overlaps with any of the current ranges in the first argument and return a
score value from the corresponding metadata. This function will only operate
on fully disjoint ranges (see isDisjoint
for details). It can only
work if metadata is present and there is a "score" column in the metadata.
Please see example on how to add metadata to a
RangedRaggedAssay or GRangesList class. This function
uses the overlapsAny function from the GenomicRanges
package.
## S4 method for signature 'RangedRaggedAssay,missing' assay(x, i, mcolname = "score", background = NA, make.names = FALSE, ranges = NULL, type = "any", ...)
x |
A RangedRaggedAssay or GRangesList class |
i |
Argument set to missing (not used) |
mcolname |
A single string indicating the metadata column to use for the values in the resulting assay matrix |
background |
A default background value for the resulting assay matrix (default NA). This works for non-matching sample and range pairs in the data and will be imputed in the matrix (e.g., 2 for diploid genomes) |
make.names |
logical (default FALSE) whether to create character format
ranges for the rows of the matrix (either from the |
ranges |
An optional GRanges object for comparing accross all sample ranges and for superseding the rows for the resulting matrix (default NULL) |
type |
The type argument from overlapsAny |
... |
Unused argument |
A matrix
of values from the score column of the metadata.