View source: R/04_flowgraph_plots.R
fg_save_plots | R Documentation |
Saves numerous plots for all summary statistics in a given flowGraph object to a user specified folder.
fg_save_plots(
fg,
plot_path,
plot_types = "node",
interactive = FALSE,
adjust_custom = "byLayer",
label_max = 10,
box_no = 20,
paired = FALSE,
logged = FALSE,
filter_adjust0 = 1,
filter_es = 0,
filter_btwn_tpthres = 1,
filter_btwn_es = 0,
overwrite = TRUE,
node_labels = "NONE",
...
)
fg |
flowGraph object. |
plot_path |
A string indicating the folder path to where the function should save the plots. |
plot_types |
A string or a vector of strings indicating what feature types and their summaries the function should plot for: 'node' or 'edge'. |
interactive |
A logical indicating whether the QQ plot, p-value vs
difference plot, and the
cell hierarchy plots should be interactive; see functions
|
adjust_custom |
A function or a string indicating the
test adjustment method to use.
If a string is provided, it should be one of
|
label_max |
An integer indicating how many labels should be shown
in the functions |
box_no |
An integer indicating the maximum number of boxplots to save;
used in function |
paired |
A logical indicating whether the summary is paired; used in
function |
logged |
A logical indicating whether or not to log the summary statistic p value in the qq plots. |
filter_adjust0 |
A numeric variable indicating what percentage of SpecEnr values compared (minimum) should be not close to 0. Set to 1 to not conduct filtering. This parameter is used for the QQ and the pVSdifference plots. |
filter_es |
A numeric variable between 0 and 1 indicating what the Cohen's D value of the nodes/edges in question must be greater or equal to, to be significant. |
filter_btwn_tpthres |
A numeric variable between 0 and 1 indicating the
unadjusted T-test p-value threshold used to test whether the actual
and expected feature values used to calculate the specified SpecEnr
feature are significantly different for each sample class. Note this only
needs to be specified for SpecEnr features. Combined
with |
filter_btwn_es |
A numeric variable between 0 and 1 indicating what the
Cohen's D value of the nodes/edges in question must be greater or
equal to, to be significant – see |
overwrite |
A logical variable indicating whether or not to replace old plots if they exist under the same folder name. |
node_labels |
Parameter for the |
... |
Other parameters for the |
The interactive plots are made using the ggiraph
package.
No return; plots are saved to file.
flowGraph-class
fg_plot
plot_gr
fg_get_feature
fg_get_summary
fg_plot_qq
fg_plot_pVSdiff
fg_plot_box
no_cores <- 1
data(fg_data_pos2)
fg <- flowGraph(fg_data_pos2$count,
class=fg_data_pos2$meta$class,
no_cores=no_cores)
fg_save_plots(fg, "temp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.