TCA-class {TCseq} | R Documentation |
TCA
is a S4 class for storing input data, results of
differential binding and clustering analysis. A TCA
object
can be created by the constructor function from a table of sample
information, a table genomic coordinates of features, read
counts(optional).
TCA(design, counts = matrix(0L, 0L, 0L), genomicFeature, zero.based = TRUE) TCAFromSummarizedExperiment(se, genomicFeature = NULL)
design |
a data frame containing information about
samples/libraries, For time course analysis, design should contain
at least three columns (case insensitive): |
counts |
an integer matrix containing read counts. Rows correspond to genomic features and columns to samples/libraries. |
genomicFeature |
a data frame or a GRanges object containing
genomic coordinates of features of interest (e.g. genes in RNA-seq,
binding regions in ChIP-seq). If genomicFeature is a data frame,
four columns are required in |
zero.based |
Logical. If TRUE, the start positions of the
genomic ranges in the returned |
se |
A SummarizedExperiment or a RangedSummarizedExperiment
object. The object might contain multiple assays (count table)
in the assay list, only the first one will be taken to construct
TCA object. For SummarizedExperiment object, |
A TCA object can be created without providing read counts,
read counts can be provided by counts
or generated by
countReads
, the number of rows should equal to that in
genomicFeature
and the number of columns should equal to number
of rows in design
. Input data and analysis results in a TCA
object can be accessed by using corresponding accessors and functions.
The TCA objects also have a show method printing a compact summary of
their contents see counts
, TCA.accessors
,
DBresult
, tcTable
, timeclust
.
clust
A TCA object
Mengjun Wu
Mengjun Wu
counts
, TCA.accessors
,
DBresult
, timeclust
, clust
#create data frame of experiment design: 4 time points and 2 replicates for each time point. d <- data.frame(sampleID = 1:8, group = rep(c(1, 2, 3, 4), 2), timepoint = rep(c('0h', '24h', '48h', '72h'), 2)) #create data frame of genomic intervals of interest gf <- data.frame(chr = c(rep('chr1', 3), rep('chr2', 2), rep('chr4', 2)), start = seq(100, 2000, by = 300), end = seq(100, 2000, by = 300) + 150, id = paste0('peak', 1:7)) tca <- TCA(design = d, genomicFeature = gf) genomicFeature(tca) #if count table is available c <- matrix(sample(1000, 56), nrow = 7, dimnames = list(paste0('peak', 1:7), 1:8)) tca <- TCA(design = d, counts = c, genomicFeature = gf) # replace the count table of a \code{TCA} object c2 <- matrix(sample(500, 56), nrow = 7, dimnames = list(paste0('peak', 1:7), 1:8)) counts(tca) <- c2