Description Usage Details Author(s) Examples
The CTSS
class represents CAGE transcription start sites (CTSS) at
single-nucleotide resolution, using GenomicRanges::UnstitchedGPos
as base
class. It is used by CAGEr for type safety.
The CTSS
constructor takes the same arguments as GenomicRanges::GPos
,
plus bsgenomeName
, and minuse stitch
, which is hardcoded to FALSE
.
The CTSS.chr
class represents a CTSS
object that is
guaranteed to be only on a single chromosome. It is used internally by
CAGEr for type-safe polymorphic dispatch.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## S4 method for signature 'CTSS'
initialize(.Object, ..., bsgenomeName = NULL)
CTSS(
seqnames = NULL,
pos = NULL,
strand = NULL,
...,
seqinfo = NULL,
seqlengths = NULL,
bsgenomeName = NULL
)
## S4 method for signature 'CTSS,GRanges'
coerce(from, to = "GRanges", strict = TRUE)
## S4 method for signature 'GRanges,CTSS'
coerce(from, to = "CTSS", strict = TRUE)
|
The genomeName
element of the metadata
slot is used to store the
name of the BSgenome package used when constructing the CAGEr
object.
Coercion from GRanges
to CTSS
loses information, but it seems
to be fine, since other coercions like as(1.2, "integer")
do the same.
Charles Plessy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Convert an UnstitchedGPos object using the new() constructor.
gp <- GPos("chr1:2:-", stitch = FALSE)
ctss <- new("CTSS", gp, bsgenomeName = "BSgenome.Drerio.UCSC.danRer7")
genomeName(ctss)
# Create a new object using the CTSS() constructor.
CTSS("chr1", 2, "-", bsgenomeName = "BSgenome.Drerio.UCSC.danRer7")
# Coerce CTSS to GRanges
as(ctss, "GRanges")
# Coerce a GRanges object to CTSS using the as() method.
gr <- GRanges("chr1:1-10:-")
gr$seq <- "AAAAAAAAAA"
seqlengths(gr) <- 100
genome(gr) <- "foo"
as(gr, "CTSS")
identical(seqinfo(gr), seqinfo(as(gr, "CTSS")))
as(as(gr, "CTSS"), "CTSS") # Make sure it works twice in a row
# (internal use) Transform CTSS to CTSS.chr object
ctss.chr <- as(CTSScoordinatesGR(exampleCAGEexp), "CTSS.chr")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.