SequenceData, SequenceDataSet, SequenceDataList, Modifier or ModifierSet object.R/AllGenerics.R, R/Modifier-subset.R, R/SequenceData-subset.R
subsetByCoord.RdWith the subsetByCoord function data from a SequenceData,
SequenceDataSet, SequenceDataList, Modifier or
ModifierSet object can be subset to positions as defined in
coord.
If coord contains a column mod and x is a
Modifier object, it will be filtered to identifiers matching the
modType of x. To disable this
behaviour remove the column mod from coord or set type =
NA
labelByCoord functions similarly. It will return a
SplitDataFrameList, which matches the dimensions of the aggregated
data plus the labels column, which contains logical values to indicate
selected positions.
subsetByCoord(x, coord, ...)
labelByCoord(x, coord, ...)
# S4 method for class 'Modifier,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'Modifier,GRangesList'
subsetByCoord(x, coord, ...)
# S4 method for class 'ModifierSet'
subset(x, name, pos = 1L, ...)
# S4 method for class 'ModifierSet,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'ModifierSet,GRangesList'
subsetByCoord(x, coord, ...)
# S4 method for class 'Modifier,GRanges'
labelByCoord(x, coord, ...)
# S4 method for class 'Modifier,GRangesList'
labelByCoord(x, coord, ...)
# S4 method for class 'ModifierSet,GRanges'
labelByCoord(x, coord, ...)
# S4 method for class 'ModifierSet,GRangesList'
labelByCoord(x, coord, ...)
# S4 method for class 'SplitDataFrameList,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceData'
subset(x, name, pos = 1L, ...)
# S4 method for class 'SequenceData,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceData,GRangesList'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceDataSet'
subset(x, name, pos = 1L, ...)
# S4 method for class 'SequenceDataSet,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceDataSet,GRangesList'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceDataList'
subset(x, name, pos = 1L, ...)
# S4 method for class 'SequenceDataList,GRanges'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceDataList,GRangesList'
subsetByCoord(x, coord, ...)
# S4 method for class 'SequenceData,GRanges'
labelByCoord(x, coord, ...)
# S4 method for class 'SequenceData,GRangesList'
labelByCoord(x, coord, ...)
# S4 method for class 'SequenceDataSet,GRanges'
labelByCoord(x, coord, ...)
# S4 method for class 'SequenceDataSet,GRangesList'
labelByCoord(x, coord, ...)
# S4 method for class 'SequenceDataList,GRanges'
labelByCoord(x, coord, ...)
# S4 method for class 'SequenceDataList,GRangesList'
labelByCoord(x, coord, ...)a SequenceData, SequenceDataSet,
SequenceDataList, Modifier or ModifierSet object.
coordinates of position to subset to. Either a GRanges or
a GRangesList object. For both types the 'Parent' column is expected to
match the transcript name.
Optional parameters:
type: the modification type used for subsetting. By default
this is derived from the modType(x), but it can be overwritten using
type. It must be a valid shortName for a modification according to
shortName(ModRNAString()) or shortName(ModDNAString())
(depending on the type of Modifier class) and of course be present in
metadata column mod of coord. To disable subsetting based on
type, set type = NA.
flanking: a single integer value to select how many flanking
position should be included in the subset (default: flanking = 0L).
merge: TRUE or FALSE: Should the
overlapping selections be merged? This is particular important, if flanking
value != 0L are set. (default: merge = TRUE).
perTranscript: TRUE or FALSE: Should the
positions labeled per transcript and not per chromosome?
(default: perTranscript = FALSE).
Optional: Limit results to one specific transcript.
Optional: Limit results to a specific position.
If 'x' is a
SequenceData or
Modifier: a SplitDataFrameList
with elments per transcript.
SequenceDataSet,
SequenceDataList or
ModifierSet: a SimpleList of
SplitDataFrameList with elments per transcript.
data(msi,package="RNAmodR")
mod <- modifications(msi)
coord <- unique(unlist(mod))
coord$score <- NULL
coord$sd <- NULL
subsetByCoord(msi,coord)
#> $SampleSet1
#> SplitDataFrameList of length 6
#> $`2`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.900932
#>
#> $`4`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.899622
#>
#> $`6`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.984035
#>
#> $`7`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 67 0.934553
#>
#> $`9`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 7 0.709758
#>
#> $`11`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.874027
#>
#>
#> $SampleSet2
#> SplitDataFrameList of length 6
#> $`2`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.998134
#>
#> $`4`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.856241
#>
#> $`6`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.992012
#>
#> $`7`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 67 0.942905
#>
#> $`9`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 7 0.766484
#>
#> $`11`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.971474
#>
#>
#> $SampleSet3
#> SplitDataFrameList of length 6
#> $`2`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.953651
#>
#> $`4`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.976928
#>
#> $`6`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 34 0.993128
#>
#> $`7`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 67 0.943773
#>
#> $`9`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 7 0.681451
#>
#> $`11`
#> DataFrame with 1 row and 1 column
#> score
#> <numeric>
#> 35 0.954782
#>
#>