countData class is used to define summaries of count data
and establishing prior and posterior parameters on distributions
defined upon the count data.
Objects of these class contain the following components:
||Count data (matrix).|
||The replicate structure of the data. Stored as a factor, but can be given in any form.|
||Group (model) structure to test on the data (list).|
||Annotation data for each count (data.frame).|
|| Character string describing the type of prior
information available in slot
|| Prior parameter information. Calculated by the
functions described in
|| Estimated (log)-posterior likelihoods for each group
(matrix). Calculated by the functions described in
|| Estimated proportion of tags belonging to each
group (numeric). Calculated by the functions described in
||If calculated, the posterior likelihoods for the data having no true expression of any kind.|
|| Lengths of segments containing the counts
seglens slot describes, for each row of the
object, the length of the 'segment' that contains the number of counts
described by that row. For example, if we are looking at the number of
hits matching genes, the
seglens object would consist of
transcript lengths. Exceptionally, we may want to use different segment
lengths for different samples and so the slot takes the form of a
matrix. If the matrix has only one column, it is duplicated for all
samples. Otherwise, it should have the same number of columns as the
'@data' slot. If the slot is the empty matrix, then it is assumed that
all segments have the same length.
The standard methods 'new', 'dim', '[', 'show', 'rbind' and 'c' have been defined for these classes. The methods 'groups', 'groups<-', 'replicates', 'replicates<-', 'libsizes' and 'libsizes<-' have also been defined in order to access and modify these slots, and their use is recommended. The method 'flatten' can be used to produce a data.frame object containing much of the basic data in a member of this class.
Thomas J. Hardcastle
1 2 3 4 5 6 7 8 9 10 11 12 13
#load test data data(simData) # Create a 'countData' object from test data. replicates <- c("simA", "simA", "simA", "simA", "simA", "simB", "simB", "simB", "simB", "simB") groups <- list(NDE = c(1,1,1,1,1,1,1,1,1,1), DE = c(1,1,1,1,1,2,2,2,2,2)) CD <- new("countData", data = simData, replicates = replicates, groups = groups) #estimate library sizes for countData object libsizes(CD) <- getLibsizes(CD) CD[1:10,] dim(CD)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.