Description Usage Arguments Value Examples
With combineIntoModstrings
and separate
the construction and
deconstruction of ModString Objects from an interacive session avoiding
problematic encoding issues. In addition, modification information can be
transfered from/to tabular data with these functions.
combineIntoModstrings
expects seqnames(gr)
or names(gr)
to match the available names(x)
. Only information with strand
information *
and +
are used.
separate
when used with a GRanges
/GRangesList
object
will return an object of the same type, but with modifications seperated. For
example an element with mod = "m1Am"
will be returned as two elements
with mod = c("Am","m1A")
. The reverse operation is available via
combineModifications()
.
removeIncompatibleModifications
filters incompatible modification from
a GRanges
or GRangesList
. incompatibleModifications()
returns the logical vector used for this operation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | separate(x, nc.type = "short")
combineIntoModstrings(
x,
gr,
with.qualities = FALSE,
quality.type = "Phred",
stop.on.error = TRUE,
verbose = FALSE,
...
)
combineModifications(gr, ...)
incompatibleModifications(gr, x, ...)
removeIncompatibleModifications(gr, x, ...)
## S4 method for signature 'ModString'
separate(x, nc.type = c("short", "nc"))
## S4 method for signature 'ModStringSet'
separate(x, nc.type = c("short", "nc"))
## S4 method for signature 'GRanges'
separate(x)
## S4 method for signature 'GRangesList'
separate(x)
## S4 method for signature 'XString,GRanges'
combineIntoModstrings(
x,
gr,
with.qualities = FALSE,
quality.type = "Phred",
stop.on.error = TRUE,
verbose = FALSE,
...
)
## S4 method for signature 'XStringSet,GRangesList'
combineIntoModstrings(
x,
gr,
with.qualities = FALSE,
quality.type = "Phred",
stop.on.error = TRUE,
verbose = FALSE,
...
)
## S4 method for signature 'XStringSet,GRanges'
combineIntoModstrings(
x,
gr,
with.qualities = FALSE,
quality.type = "Phred",
stop.on.error = TRUE,
verbose = FALSE,
...
)
## S4 method for signature 'GRanges'
combineModifications(gr)
## S4 method for signature 'GRangesList'
combineModifications(gr)
## S4 method for signature 'GRanges,XString'
incompatibleModifications(gr, x)
## S4 method for signature 'GRanges,XStringSet'
incompatibleModifications(gr, x)
## S4 method for signature 'GRangesList,XStringSet'
incompatibleModifications(gr, x)
## S4 method for signature 'GRanges,XString'
removeIncompatibleModifications(gr, x)
## S4 method for signature 'GRanges,XStringSet'
removeIncompatibleModifications(gr, x)
## S4 method for signature 'GRangesList,XStringSet'
removeIncompatibleModifications(gr, x)
|
x |
For For |
nc.type |
the type of nomenclature to be used. Either "short" or "nc".
"Short" for m3C would be "m3C", "nc" for m3C would be "3C". (
|
gr |
a GRanges object |
with.qualities |
|
quality.type |
the type of |
stop.on.error |
For |
verbose |
For |
... |
|
for separate
a GRanges
object and for
combineIntoModstrings
a ModString*
object or a
QualityScaledModStringSet
, if with.qualities = TRUE
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(GenomicRanges)
# ModDNAString
seq <- ModDNAString(paste(alphabet(ModDNAString()), collapse = ""))
seq
gr <- separate(seq)
gr
seq2 <- combineIntoModstrings(as(seq,"DNAString"),gr)
seq2
seq == seq2
# ModRNAString
seq <- ModRNAString(paste(alphabet(ModRNAString()), collapse = ""))
seq
gr <- separate(seq)
gr
# Separating RNA modifications
gr <- gr[1]
separate(gr)
# ... and combine them again (both operations work only on a subset of
# modifications)
combineModifications(separate(gr))
# handling incompatible modifications
seq <- RNAString("AGCU")
gr <- GRanges(c("chr1:1:+","chr1:2:+"),mod="m1A")
incompatibleModifications(gr,seq)
#
removeIncompatibleModifications(gr,seq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.