Description Usage Arguments Value Examples
View source: R/diff_dss_test.R
This function is a wrapper for DSS::DMLtest.multiFactor
with the added feature of reporting methylation rates alongside the test results via the methylation_group_column
and methylation_groups
parameters. See documentation below.
1 2 3 4 5 6 7 | diff_dss_test(
bs,
diff_fit,
contrast,
methylation_group_column = NA,
methylation_groups = NA
)
|
bs |
a |
diff_fit |
a |
contrast |
a contrast matrix for hypothesis testing. The number of rows should match the number of columns |
methylation_group_column |
Optionally, a column from |
methylation_groups |
Optionally, a named |
A GRanges
object containing the following mcols
:
The test statistic.
The p-value.
The Benjamini-Hochberg adjusted p-values using p.adjust(method = 'BH')
.
If methylation_group_column
is specified, also the following mcols
:
Methylation estimate for case.
Methylation estimate for control.
The difference meth_case - meth_control
.
The group for which the locus is hyper-methylated. Note, this is not subject to significance thresholds.
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 | data(BS.cancer.ex, package = 'bsseqData')
bs = filter_loci_by_group_coverage(
bs = BS.cancer.ex,
group_column = 'Type',
c('cancer' = 2, 'normal' = 2))
small_test = bs[1:50]
diff_fit = diff_dss_fit(
bs = small_test,
design = bsseq::pData(bs),
formula = '~ Type')
result = diff_dss_test(
bs = small_test,
diff_fit = diff_fit,
contrast = matrix(c(0,1), ncol = 1)
)
result_with_meth = diff_dss_test(
bs = small_test,
diff_fit = diff_fit,
contrast = matrix(c(0,1), ncol = 1),
methylation_group_column = 'Type',
methylation_groups = c('case' = 'cancer', 'control' = 'normal')
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.