get_tstats | R Documentation |
This function calculates a moderated t-Statistic per site or tuple using
limma
's lmFit
and eBayes
functions. It
then smoothes the obtained t-Statistics using bumphunter
's
smoother
function.
get_tstats(
sa,
design,
contrast = NULL,
method = "ls",
trend = FALSE,
smooth = FALSE,
maxGap = 20,
coef = 2,
verbose = TRUE,
filter = TRUE,
...
)
sa |
A SummarizedExperiment containing ASM values where each row and column correspond to a tuple/site and sample respectively. |
design |
a design matrix created with |
contrast |
a contrast matrix, generated with
|
method |
The method to be used in limma's |
trend |
Passed to |
smooth |
Whether smoothing should be applied to the t-Statistics. Default = FALSE. If TRUE, wherever smoothing is not possible, the un-smoothed t-stat is used instead. |
maxGap |
The maximum allowed gap between genomic positions for clustering of genomic regions to be used in smoothing. Default = 20. |
coef |
Column in model.matrix specifying the parameter to estimate.
Default = 2. If |
verbose |
Set verbose. Default = TRUE. |
filter |
Remove empty tstats. Default = TRUE. |
... |
Arguments passed to |
The smoothing is done on genomic clusters consisting of CpGs that are close
to each other. In the case of tuples, the midpoint of the two genomic
positions in each tuple is used as the genomic position of that tuple, to
perform the smoothing.The function takes a RangedSummarizedExperiment
generated by calc_derivedasm
or calc_asm
containing ASM across samples, and the index of control and treatment
samples.
A vector of t-Statistics within the
RangedSummarizedExperiment
.
data(readtuples_output)
ASM <- calc_asm(readtuples_output)
grp <- factor(c(rep('CRC',3),rep('NORM',2)), levels = c('NORM', 'CRC'))
mod <- model.matrix(~grp)
tstats <- get_tstats(ASM, mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.