R/AllGenerics.R
, R/Modifier-class.R
, R/ModifierSet-class.R
Modifier-functions.Rd
For the Modifier
and ModifierSet
classes a number of functions
are implemented to access the data stored by the object.
The validAggregate
and validModification
functions check if
settings
have been modified, after the data was
loaded. This potentially invalidates them. To update the data, run the
aggregate
or the modify
function.
bamfiles(x)
mainScore(x)
modifierType(x)
modType(x)
dataType(x)
sequenceData(x)
sequences(x, ...)
validAggregate(x)
validModification(x)
# S4 method for class 'Modifier'
show(object)
# S4 method for class 'Modifier'
bamfiles(x)
# S4 method for class 'Modifier'
conditions(object)
# S4 method for class 'Modifier'
mainScore(x)
# S4 method for class 'Modifier'
modifierType(x)
# S4 method for class 'Modifier'
modType(x)
# S4 method for class 'Modifier'
dataType(x)
# S4 method for class 'Modifier'
names(x)
# S4 method for class 'Modifier'
ranges(x)
# S4 method for class 'Modifier'
replicates(x)
# S4 method for class 'Modifier'
seqinfo(x)
# S4 method for class 'Modifier'
seqtype(x)
# S4 method for class 'Modifier'
sequenceData(x)
# S4 method for class 'Modifier'
sequences(x, modified = FALSE)
# S4 method for class 'Modifier'
validAggregate(x)
# S4 method for class 'Modifier'
validModification(x)
# S4 method for class 'ModifierSet'
show(object)
# S4 method for class 'ModifierSet'
bamfiles(x)
# S4 method for class 'ModifierSet'
conditions(object)
# S4 method for class 'ModifierSet'
mainScore(x)
# S4 method for class 'ModifierSet'
modifications(x, perTranscript = FALSE)
# S4 method for class 'ModifierSet'
modifierType(x)
# S4 method for class 'ModifierSet'
modType(x)
# S4 method for class 'ModifierSet'
dataType(x)
# S4 method for class 'ModifierSet'
ranges(x)
# S4 method for class 'ModifierSet'
replicates(x)
# S4 method for class 'ModifierSet'
seqinfo(x)
# S4 method for class 'ModifierSet'
seqtype(x)
# S4 method for class 'ModifierSet'
sequences(x, modified = FALSE)
a Modifier
or ModifierSet
class
Additional arguments.
For sequences
: TRUE
or FALSE
: Should
the sequences be returned as a ModRNAString
/ModDNAString
with
the found modifications added on top of the RNAString
/
DNAString
? See
combineIntoModstrings
.
TRUE
or FALSE
: Should the positions shown
per transcript? (default: perTranscript = FALSE
)
modifierType
: a character vector with the appropriate class
Name of a Modifier
.
modType
: a character vector with the modifications detected by
the Modifier
class.
seqtype
: a single character value defining if either
"RNA" or "DNA" modifications are detected by the Modifier
class.
mainScore
: a character vector.
sequenceData
: a SequenceData
object.
modifications
: a GRanges
or GRangesList
object
describing the found modifications.
seqinfo
: a Seqinfo
object.
sequences
: a RNAStingSet
object.
ranges
: a GRangesList
object with each element per
transcript.
bamfiles
: a BamFileList
object.
validAggregate
: TRUE
or FALSE
. Checks if current
settings are the same for which the data was aggregate
validModification
: TRUE
or FALSE
. Checks if
current settings are the same for which modification were found
data(msi,package="RNAmodR")
mi <- msi[[1]]
modifierType(mi) # The class name of the Modifier object
#> [1] "ModInosine"
modifierType(msi)
#> [1] "ModInosine"
seqtype(mi)
#> [1] "RNA"
modType(mi)
#> [1] "I"
mainScore(mi)
#> [1] "score"
sequenceData(mi)
#> PileupSequenceData with 11 elements containing 15 data columns and 3 metadata columns
#> - Data columns:
#> pileup.treated.1.- pileup.treated.1.G pileup.treated.1.A pileup.treated.1.T
#> <integer> <integer> <integer> <integer>
#> pileup.treated.1.C pileup.treated.2.- pileup.treated.2.G pileup.treated.2.A
#> <integer> <integer> <integer> <integer>
#> pileup.treated.2.T pileup.treated.2.C pileup.treated.3.- pileup.treated.3.G
#> <integer> <integer> <integer> <integer>
#> pileup.treated.3.A pileup.treated.3.T pileup.treated.3.C
#> <integer> <integer> <integer>
#> - Seqinfo object with 11 sequences from an unspecified genome; no seqlengths:
modifications(mi)
#> GRanges object with 6 ranges and 5 metadata columns:
#> seqnames ranges strand | mod source type score
#> <Rle> <IRanges> <Rle> | <character> <character> <character> <numeric>
#> [1] chr2 34 + | I RNAmodR RNAMOD 0.900932
#> [2] chr4 35 + | I RNAmodR RNAMOD 0.899622
#> [3] chr6 34 + | I RNAmodR RNAMOD 0.984035
#> [4] chr7 67 + | I RNAmodR RNAMOD 0.934553
#> [5] chr9 7 + | I RNAmodR RNAMOD 0.709758
#> [6] chr11 35 + | I RNAmodR RNAMOD 0.874027
#> Parent
#> <character>
#> [1] 2
#> [2] 4
#> [3] 6
#> [4] 7
#> [5] 9
#> [6] 11
#> -------
#> seqinfo: 11 sequences from an unspecified genome; no seqlengths
# general accessors
seqinfo(mi)
#> Seqinfo object with 11 sequences from an unspecified genome; no seqlengths:
#> seqnames seqlengths isCircular genome
#> chr1 NA NA <NA>
#> chr2 NA NA <NA>
#> chr3 NA NA <NA>
#> chr4 NA NA <NA>
#> chr5 NA NA <NA>
#> chr6 NA NA <NA>
#> chr7 NA NA <NA>
#> chr8 NA NA <NA>
#> chr9 NA NA <NA>
#> chr10 NA NA <NA>
#> chr11 NA NA <NA>
sequences(mi)
#> RNAStringSet object of length 11:
#> width seq names
#> [1] 1800 UAUCUGGUUGAUCCUGCCAGUAG...UGAACCUGCGGAAGGAUCAUUA 1
#> [2] 85 GGCAACUUGGCCGAGUGGUUAAG...UCGAGUCCUGCAGUUGUCGCCA 2
#> [3] 76 GCGGAUUUAGCUCAGUUGGGAGA...UCGAUCCACAGAAUUCGCACCA 3
#> [4] 77 GGUCUCUUGGCCCAGUUGGUUAA...UCGAUCCCGCUAGAGACCACCA 4
#> [5] 74 GCGCAAGUGGUUUAGUGGUAAAA...UCGAUUCCGGGCUUGCGCACCA 5
#> ... ... ...
#> [7] 75 GGUUUUAUAGUGUAGUGGUUAUC...UCGAAUCCGGGUAAGACCUCCA 7
#> [8] 75 GCUCGUAUGGCGCAGUGGUAGCG...UCGAUCCUGAGUGCGAGCUCCA 8
#> [9] 75 UCCGAUAUAGUGUAACGGCUAUC...UCGACUCCCCGUAUCGGAGCCA 9
#> [10] 85 GGCACUAUGGCCGAGUGGUUAAG...UCAAAUCCUGCUGGUGUCGCCA 10
#> [11] 77 GGUUUCGUGGUCUAGUCGGUUAU...UCGAUCCUGGGCGAAAUCACCA 11
ranges(mi)
#> GRangesList object of length 11:
#> $`1`
#> GRanges object with 1 range and 3 metadata columns:
#> seqnames ranges strand | exon_id exon_name exon_rank
#> <Rle> <IRanges> <Rle> | <integer> <character> <integer>
#> [1] chr1 1-1800 + | 1 RDN18-1 1
#> -------
#> seqinfo: 11 sequences from an unspecified genome; no seqlengths
#>
#> $`2`
#> GRanges object with 1 range and 3 metadata columns:
#> seqnames ranges strand | exon_id exon_name exon_rank
#> <Rle> <IRanges> <Rle> | <integer> <character> <integer>
#> [1] chr2 1-85 + | 2 tS(AGA)A 1
#> -------
#> seqinfo: 11 sequences from an unspecified genome; no seqlengths
#>
#> $`3`
#> GRanges object with 1 range and 3 metadata columns:
#> seqnames ranges strand | exon_id exon_name exon_rank
#> <Rle> <IRanges> <Rle> | <integer> <character> <integer>
#> [1] chr3 1-76 + | 3 tF(GAA)B 1
#> -------
#> seqinfo: 11 sequences from an unspecified genome; no seqlengths
#>
#> ...
#> <8 more elements>
bamfiles(mi)
#> BamFileList of length 3
#> names(3): treated treated treated