DBresult | R Documentation |
This function is a wrapper for glmLRT
in edgeR package.
It performs likelihood ratio tests for given coefficinets contrasts
after fitting read counts to a negative binomial glm by
DBanalysis
. DBresult
also extracts the
diffential analysis results of given contrasts at a chosen significance level.
DBresult.cluster
returns similar results but only
contain genomic features belong to a given cluster.
DBresult(
object,
group1 = NULL,
group2 = NULL,
contrasts = NULL,
p.adjust = "fdr",
top.sig = FALSE,
pvalue = "paj",
pvalue.threshold = 0.05,
abs.fold = 2,
direction = "both",
result.type = "GRangesList"
)
DBresult.cluster(
object,
group1 = NULL,
group2 = NULL,
contrasts = NULL,
p.adjust = "fdr",
top.sig = FALSE,
pvalue = "paj",
pvalue.threshold = 0.05,
abs.fold = 2,
direction = "both",
cluster,
cmthreshold = NULL,
result.type = "GRangesList"
)
object |
a |
group1 |
character string giving the group to be compared with,
i.e., the denominator in the fold changes. group1 can be set NULL and
will be ignored if the comparisons are passed to |
group2 |
a character vetor giving the other groups to
compare with |
contrasts |
a character vector, each string in the vector gives a contrast of two groups with the format "group2vsgroup1", group1 is the denominator level in the fold changes and group2 is the numerator level in the fold changes. |
p.adjust |
character string specifying a correction method
for p-values. Options are " |
top.sig |
logical if TRUE, only genomic regions with
given log2-fold changes and significance levels (p-value)
will be returned. Log2-fold changes are defined by |
pvalue |
character string specify the type of p-values
used for defining the significance level( |
pvalue.threshold |
a numeric value giving threshold of selected p-value, Significant changes have lower (adjusted) p-values than the threshold. |
abs.fold |
a numeric value, the minimum absolute log2-fold
changes. The returned genomic regions have changes
with absolute log2-fold changes exceeding |
direction |
character string specify the direction of fold
changes. " |
result.type |
character string giving the data type of return value. Options are "GRangesList" and "list". |
cluster |
an integer giving the number of cluster from which genomic features are extracted. |
cmthreshold |
a numeric value, this argument is applicable
only if |
This function uses glmLRT
from edgeR which
perform likelihood ratio tests for the significance of changes.
For more deatils,
see glmLRT
A list or a GRangesList.
If result.type
is "GRangesList", a GRangesList is returned containing
the differential analysis results for all provided contrasts. Each GRanges
object of the list is one contrast, the analysis results are contained in 4
metadata columns:
logFC
log2-fold changes between two groups.
PValue
p-values.
paj
adjusted p-values
id
name of genomic features
If result.type
is "list", a list of data frames is returned.
Each data frame contains one contrast with the following columns:
logFC
log2-fold changes between two groups.
PValue
p-values.
paj
adjusted p-values
chr
name of chromosomes
start
starting positions of features in the
chromosomes
end
ending postitions of features in the chromosomes
id
name of genomic features
If not NULL group1
, group2
and contrasts
,
result tables are extracted from comparisons in constrasts
.
Mengjun Wu, Lei Gu
glmLRT
data(tca_ATAC)
tca_ATAC <- DBanalysis(tca_ATAC)
### extract differntial analysis of 24h, 72h to 0h
# set the contrasts using the 'group1' and 'group2' paramters
res1 <- DBresult(tca_ATAC, group1 = '0h', group2 = c('24h', '72h'))
# one can get the same result by setting the contrasts using hte 'contrasts' parameter
res2 <- DBresult(tca_ATAC, contrasts = c('24hvs0h', '72hvs0h'))
# extract significant diffential events
res.sig <- DBresult(tca_ATAC, contrasts = c('24hvs0h', '72hvs0h'),
top.sig = TRUE)
# extract differntial analysis of 24h, 72h to 0h of a given cluster
tca_ATAC <- timecourseTable(tca_ATAC, filter = TRUE)
tca_ATAC <- timeclust(tca_ATAC, algo = 'cm', k = 6)
res_cluster1 <- DBresult.cluster(tca_ATAC, group1 = '0h',
group2 = c('24h', '72h'),
cluster = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.