Description Details Slots See Also Examples
The CAGEr class is a MultiAssayExperiment object containing all data
and metadata about a set of CAGE libraries. It is a replacement for the
CAGEset class. The main difference is that the expression data is stored
in DataFrame objects of Rle-encoded expression values, instead of plain
data.frames. With large datasets, this saves considerable amounts of memory.
If genomeName is NULL, checks of chromosome names will be
disabled and G-correction will not be possible. See
https://support.bioconductor.org/p/86437/ for an example on how to create a
BSgenome package.
Sample labels must be syntactically valid in the sense of the make.names()
function, because they will be used as column names in some tables.
metadataA list that must at least contain a genomeName member.
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 | pathsToInputFiles <- list.files( system.file("extdata", package = "CAGEr")
, "ctss$"
, full.names = TRUE)
sampleLabels <- sub( ".chr17.ctss", "", basename(pathsToInputFiles))
# The CAGEexp object can be created using specific constructor commands
exampleCAGEexp <-
CAGEexp( genomeName = "BSgenome.Drerio.UCSC.danRer7"
, inputFiles = pathsToInputFiles
, inputFilesType = "ctss"
, sampleLabels = sub( ".chr17.ctss", "", basename(pathsToInputFiles)))
# Alternatively, it can be created just like another MultiAssayExperiment.
# This is useful when providing pre-existing colData with many columns.
exampleCAGEexp <-
CAGEexp( metadata = list(genomeName = "BSgenome.Drerio.UCSC.danRer7")
, colData = DataFrame( inputFiles = pathsToInputFiles
, sampleLabels = sampleLabels
, inputFilesType = "ctss"
, row.names = sampleLabels))
# Expression data is loaded by the getCTSS() function, that also calculates
# library sizes and store them in the object's column data.
getCTSS(exampleCAGEexp)
librarySizes(exampleCAGEexp)
colData(exampleCAGEexp)
# CTSS data is stored internally as a SummarizedExperiemnt that can be retreived
# as a whole, or as GRanges, or as an expression DataFrame.
CTSStagCountSE(exampleCAGEexp)
CTSScoordinatesGR(exampleCAGEexp)
CTSStagCountDF(exampleCAGEexp)
# Columns of the "colData" table are accessible directly via the "$" operator.
exampleCAGEexp$l1 <- colSums(CTSStagCountDf(exampleCAGEexp) > 0)
exampleCAGEexp$l1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.