ebayes2dfs | R Documentation |
Convert limma eBayes fit to data.frame with annotated hits
ebayes2dfs(
lmFit3 = NULL,
lmFit1 = NULL,
lmFit4 = NULL,
define_hits = TRUE,
adjp_cutoff = 0.05,
p_cutoff = NULL,
fold_cutoff = 1.5,
int_adjp_cutoff = adjp_cutoff,
int_p_cutoff = p_cutoff,
int_fold_cutoff = fold_cutoff,
mgm_cutoff = NULL,
ave_cutoff = NULL,
confint = FALSE,
use_cutoff_colnames = TRUE,
rename_headers = TRUE,
return_fold = TRUE,
merge_df = FALSE,
include_ave_expr = FALSE,
include_group_means = TRUE,
transform_means = c("none", "exp2signed", "10^"),
rowData_df = NULL,
collapse_by_gene = FALSE,
rename_contrasts = FALSE,
sep = " ",
int_grep = "[(].+-.+-.+[)]|-.+-",
trim_colnames = c("t", "B", "F", "sca.t"),
posthoc_test = c("none", "DEqMS"),
verbose = FALSE,
...
)
lmFit3 |
object returned by |
lmFit1 |
object returned by |
lmFit4 |
object returned by |
define_hits |
|
adjp_cutoff , p_cutoff , fold_cutoff , mgm_cutoff , ave_cutoff |
|
int_adjp_cutoff , int_p_cutoff , int_fold_cutoff |
|
confint |
|
use_cutoff_colnames |
|
rename_headers |
|
return_fold |
|
merge_df |
|
include_ave_expr |
|
include_group_means |
|
rowData_df |
|
collapse_by_gene |
|
rename_contrasts |
|
sep |
|
int_grep |
|
verbose |
|
This function is called by run_limma_replicate()
as
an extension to limma::topTable()
, that differs in that
it is performed for each contrast in the input lmFit3
object.
By default the columns include the contrast, so that each data.frame
is self-described.
When define_hits=TRUE
, then statistical thresholds are applied
to define a set of statistical hits. The thresholds available include:
adjp_cutoff
- applied to "adj.P.Val"
for adjusted P-value.
p_cutoff
- applied to "P.Value"
for raw, unadjusted P-value.
fold_cutoff
- normal space fold change, applied to "logFC"
by using log2(fold_cutoff)
.
mgm_cutoff
- max group mean, applied to the highest group mean
value involved in each specific contrast.
ave_cutoff
- applied to "AveExpr"
which represents the mean
value across all sample groups.
Note that mgm_cutoff
requires input lmFit1
which stores the
group mean values used in the limma workflow.
Note also there are optional arguments specific to interaction
contrasts, which in this context is assumed to be a
"fold change of fold changes" style of contrast, for example:
(groupA-groupB)-(groupC-groupD)
. The purpose is distinct interaction
thresholds is to enable reasonable data mining, sometimes with
somewhat more lenient thresholds for interaction contrasts.
For example, one may use adjp_cutoff=0.01
and int_adjp_cutoff=0.05
,
or fold_cutoff=2
and int_fold_cutoff=1.5
.
By default, rename_headers=TRUE
causes colnames to include the
contrast, for example renaming colname "logFC"
to "logFC contrastA"
.
This change helps reinforce the source of the statistical results,
and allows the data.frame
results to be merged together using
base::merge()
.
Indeed, merge_df=TRUE
will cause all data.frame
results to be
merged into one large data.frame
, using jamba::mergeAllXY()
.
list
with one data.frame
per contrast defined in
the input lmFit3
object. When define_hits=TRUE
there
will be one column per statistical threshold, named "hit"
followed by an abbreviation of the statistical thresholds
which were applied.
When merge_df=TRUE
the returned data will be one
data.frame
object.
Other jamses stats:
format_hits()
,
handle_na_values()
,
hit_array_to_list()
,
process_sestats_to_hitim()
,
run_limma_replicate()
,
save_sestats()
,
se_contrast_stats()
,
sestats_to_dfs()
,
sestats_to_df()
,
voom_jam()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.