glmDataSet | R Documentation |
This function is used to build a object suitable to be used
with Methyl-IT countTest2
function.
glmDataSet(GR = NULL, counts = NULL, colData = NULL)
GR |
A |
counts |
Count matrix of DMPs with minimal dimensions 1 (row) x 4 (columns). Column names must corresponds to the rownames from parameter colData. |
colData |
A data frame with one column named 'condition', which must be a factor with exactly two levels. The rownames of colData individual samples. The row names of colData must correspond to th column names of the count matrix. |
Data set constructor for class glmDataSet also validate the object
An object from 'RangedGlmDataSet' class containing these attributes: 'GR': the GRanges of the object, 'counts': the counts for each sample at that genomic position, 'colData': the condition of each sample, treatment or control, 'sampleNames': the names of the samples, 'levels': the values (perhaps TT and CT for treatment and control) permitted in the colData attribute, optionData: additional metadata or NULL
Robersy Sanchez
set.seed(133) # Set a seed
## A GRanges object with the count matrix in the metacolumns is created
countData <- matrix(sample.int(200, 500, replace = TRUE), ncol = 4)
colnames(countData) <- c('A1','A2','B1','B2')
start <- seq(1, 25e4, 2000)
end <- start + 1000
chr <- c(rep('chr1', 70), rep('chr2', 55))
GR <- GRanges(seqnames = chr, IRanges(start = start, end = end))
mcols(GR) <- countData
## Gene IDs
names(GR) <- paste0('gene', 1:length(GR))
## An experiment design is set.
colData <- data.frame(condition = factor(c('A','A','B','B')),
c('A1','A2','B1','B2'), row.names = 2)
## A RangedGlmDataSet is created
glmDataSet(GR = GR, colData = colData)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.