Create Starlng Shiny app from a ClustAssess object
Source:R/shiny.R
starlng_write_app_clustassess.RdRuns the entire Starlng pipeline on a normalized gene expression matrix togheter with the output of the ClustAssess automatic pipeline and generates a folder with all necessary files to run a Shiny app.
Usage
starlng_write_app_clustassess(
folder_path,
expression_matrix,
clustassess_object,
metadata_df,
stable_feature_type,
stable_feature_set_size,
stable_clustering_method,
stable_n_clusters = NULL,
use_all_genes = TRUE,
app_title_name = "",
learn_graph_parameters = list(nodes_per_log10_cells = 30, learn_graph_controls =
list(eps = 1e-05, maxiter = 100)),
gene_filtering_function = function(info_gene_df) {
rownames(info_gene_df %>%
dplyr::filter(.data$morans_I > 0.1, .data$q_value < 0.05))
},
clustering_parameters = list(n_neighbours = seq(from = 5, to = 50, by = 5), graph_type
= "snn", prune_value = -1, resolutions = list(RBConfigurationVertexPartition =
seq(from = 0.1, to = 2, by = 0.1), RBERVertexPartition = NULL,
ModularityVertexPartition = NULL), number_iterations = 5, number_repetitions = 100),
ecc_threshold = 0.9,
freq_threshold = 30,
enrichment_organism = "hsapiens",
save_entire_monocle = TRUE,
discrete_colours = list(),
continuous_colours = list(),
max_n_colors = 40,
verbose = FALSE,
compression_level = 7,
chunk_size = 100,
nthreads = 1
)Arguments
- folder_path
Check
starlng_write_app_monocle()documentation.- expression_matrix
A normalized gene by cell expression matrix. The matrix should have the rownames and the colnames defined.
- clustassess_object
The output of the automatic pipeline of the ClustAssess package.
- metadata_df
A data frame with cell metadata specific to the experiment. If NULL, the function will create a one-group metadata with the name "one_level".
- stable_feature_type
The feature type that is chosen from the ClustAssess analysis.
- stable_feature_set_size
The size of the feature set that is chosen from the ClustAssess analysis.
- stable_clustering_method
The clustering method that is chosen from the ClustAssess analysis.
- stable_n_clusters
The number of clusters that is chosen from the ClustAssess analysis. If NULL, the function will use all the clusters that are obtained. Defaults to NULL.
- use_all_genes
If TRUE, uses all the genes in the expression matrix. If FALSE, uses only the stable feature set as determined by ClustAssess. Defaults to TRUE.
- app_title_name
Check
starlng_write_app_monocle()documentation.- learn_graph_parameters
Check
starlng_write_app_monocle()documentation.- gene_filtering_function
Check
starlng_write_app_monocle()documentation.- clustering_parameters
Check
starlng_write_app_monocle()documentation.- ecc_threshold
Check
starlng_write_app_monocle()documentation.- freq_threshold
Check
starlng_write_app_monocle()documentation.- enrichment_organism
Check
starlng_write_app_monocle()documentation.`- save_entire_monocle
Check
starlng_write_app_monocle()documentation.- discrete_colours
Check
starlng_write_app_monocle()documentation.- continuous_colours
Check
starlng_write_app_monocle()documentation.- max_n_colors
Check
starlng_write_app_monocle()documentation.- verbose
Check
starlng_write_app_monocle()documentation.- compression_level
Check
starlng_write_app_monocle()documentation.- chunk_size
Check
starlng_write_app_monocle()documentation.- nthreads
Check
starlng_write_app_monocle()documentation.
Note
For more details about the other parameters and the content of the
shiny folder, consult the documentation of the starlng_write_app_monocle()
function.