save_sestats | R Documentation |
Save SE contrast stats output
save_sestats(
sestats,
file = NULL,
assay_names = NULL,
contrast_names = NULL,
cutoff_names = NULL,
type = c("xlsx", "list"),
data_content = c("data", "hits"),
hits_use_lfc = FALSE,
max_nchar_sheetname = 31,
abbreviate = FALSE,
review_output = TRUE,
sheet_prefix = NULL,
use_assay_suffix = TRUE,
width_factor = 1,
max_rows = NULL,
colorSub = NULL,
rename_contrasts = TRUE,
se = NULL,
rowData_colnames = NULL,
row_type = "gene_name",
hitRule = c(-1, 0, 1),
hitFormat = "#,##0",
freezePaneColumn = 2,
verbose = FALSE,
...
)
sestats |
|
file |
|
assay_names |
|
contrast_names |
|
type |
|
data_content |
|
hits_use_lfc |
|
max_nchar_sheetname |
|
abbreviate |
|
review_output |
|
sheet_prefix |
|
use_assay_suffix |
|
width_factor |
|
colorSub |
|
rename_contrasts |
|
se |
|
rowData_colnames |
|
row_type |
|
hitRule , hitFormat , freezePaneColumn |
arguments passed to
|
verbose |
|
... |
additional arguments are passed to |
This function is intended as a convenient method to export a series of statistical tables into organized, formatted Excel worksheets.
The output will generally contain two types of worksheets:
Each contrast in its own worksheet.
This is option is enabled by including "contrasts"
in
argument data_content
, which is default.
If there are multiple "Signals" (e.g. multiple assay_name
)
then each contrast/signal combination will be saved to its
own worksheet.
One table will be created with one column for each contrast,
using values c(1, 0, -1)
to indicate whether the row met the
statistical criteria.
This is option is enabled by including "hits"
in
argument data_content
, which is default.
If there are multiple "Signals" (e.g. multiple assay_name
)
then one table for each signal will be saved to its
own worksheet.
list
To output a list
of data.frame
objects, use:
type="list", review_output=FALSE
Because the xlsx
worksheet name is limited to 31 characters, the
contrast names are abbreviated by default. The output of this
function is a data.frame
which includes the relationship of
the contrast and signal, to the abbreviated worksheet name.
data.frame
when type="xlsx"
or list
when type="list"
.
Other jamses stats:
ebayes2dfs()
,
format_hits()
,
handle_na_values()
,
hit_array_to_list()
,
process_sestats_to_hitim()
,
run_limma_replicate()
,
se_contrast_stats()
,
sestats_to_dfs()
,
sestats_to_df()
,
voom_jam()
se <- make_se_test();
# create SEDesign
sedesign <- groups_to_sedesign(se, group_colnames="group")
# limma contrasts
sestats <- se_contrast_stats(se=se,
sedesign=sedesign,
assay_names="counts")
# review_output=TRUE
info_df <- save_sestats(sestats, review_output=TRUE)
info_df
# review_output=FALSE
stat_dfs1 <- save_sestats(sestats, review_output=FALSE, type="list")
head(stat_dfs1[[1]])
# review_output=FALSE, hits_use_lfc=TRUE
stat_dfs <- save_sestats(sestats, review_output=FALSE, type="list", hits_use_lfc=TRUE)
head(stat_dfs[[1]])
set.seed(12)
heatmap_se(se, sestats=sestats)
set.seed(12)
heatmap_se(stat_dfs[[2]], column_names_rot=80,
column_cex=0.2, row_cex=0.5) +
heatmap_se(se, sestats=sestats, rows=rownames(se))
set.seed(12)
heatmap_se(stat_dfs[[2]], column_names_rot=80,
column_cex=0.2, row_cex=0.5) +
heatmap_se(stat_dfs1[[2]], column_names_rot=80,
column_cex=0.2, row_cex=0.5) +
heatmap_se(se, sestats=sestats, rows=rownames(se))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.