Package index
-
SCDRAKE_CLI_VERSION - Matching CLI version for this package version.
-
install_cli()check_cli() - Install or check the command line interface scripts.
-
init_project() - Initialize a new
scdrakeproject.
-
update_project() - Update
scdrakeproject files.
-
load_config()load_pipeline_config()load_single_sample_configs()load_integration_configs() - Load a YAML config file as
scdrake_list.
-
update_config()update_pipeline_config()update_single_sample_configs()update_integration_configs()update_configs() - Update a local YAML config file using a default one.
-
scdrake_list()`$`(<scdrake_list>)`[`(<scdrake_list>)`[[`(<scdrake_list>) - A
scdrake's list with overloaded, strict access operators.
yq tool
Functions related to the yq tool.
-
check_yq() - Check the availability and version of the
yqtool.
-
download_yq() - Download the binary of the
yqtool (version 3.4.1).
-
get_yq_default_path() - Return a default download path for the
yqtool's binary.
-
yq_merge_cmd() - Merge two YAML files using the
yqtool.
-
run_single_sample()run_integration()run_single_sample_r()run_integration_r() - Run the
scdrakepipeline.
-
create_single_sample_dirs()create_integration_dirs() - Create a basic directory structure based on paths in config.
-
scdrake_make()scdrake_r_make() - Execute a
scdrake's pipeline plan.
-
check_pandoc() - Check for
pandoc's binary.
-
check_pkg_installed()check_qs_installed()check_future_installed()check_clustermq_installed()check_future.callr_installed()check_sc3_version()check_scdrake_packages() - Check if a package is installed and display an informative message.
-
check_scdrake() - Check for selected
scdrakedependencies.
-
get_single_sample_plan()get_integration_plan() - Get a
drakeplan for a specific analysis type.
-
get_dimred_plots_other_vars_subplan() - Get a subplan for dimensionality reduction plots of selected variables.
-
get_common_subplan()get_cluster_markers_subplan()get_contrasts_subplan() - Get a
drakesubplan common to all pipelines.
-
get_clustering_graph_subplan() - Get a subplan for graph-based clustering.
-
get_clustering_kmeans_subplan() - Get a subplan for k-means clustering.
-
get_clustering_sc3_subplan() - Get a subplan for SC3 clustering.
-
get_clustering_subplan() - Get subplan for clustering.
-
get_cell_annotation_subplan() - Get a subplan for cell annotation via
SingleR
-
get_input_qc_subplan()get_norm_clustering_subplan() - Get a
drakeplan for a stage of single-sample pipeline.
-
get_integration_subplan()get_int_clustering_subplan() - Get a
drakeplan for a stage of integration pipeline.
-
load_custom_plan() - Source a file returning a custom drake plan.
-
download_pbmc1k()download_pbmc3k() - Download PBMC example data from 10x Genomics.
-
get_scdrake_default_options()get_scdrake_options() - Options used by
scdrake.
Target-related functions
Those functions are mostly used for individual targets within pipeline plans. They are usually named as <target_name>_fn().
-
cell_qc_fn() - Return a SingleCellExperiment object with artifact spatial information
-
empty_droplets_fn() - Calculate empty droplet statistics for each cell.
-
get_gene_filter() - Get a logical filter for genes not passing a ratio of cells expressing a gene and a minimum number of UMI per gene.
-
get_used_qc_filters_operator_desc() - Return an informative message about the used operator to join cell QC filters
-
sce_final_input_qc_fn() - Finalize a
SingleCellExperimentobject which will proceed to the02_norm_clusteringstage.
-
sce_history_fn() - Create a tibble with history of cell and gene filtering.
-
sce_history_plot_fn() - Plot history of cell and gene filtering.
-
sce_raw_fn() - Import scRNA-seq data.
-
sce_selected_fn() - Select a
SingleCellExperimentobject which will proceed to the02_norm_clusteringstage.
-
sce_valid_cells_fn() - Subset cells in a
SingleCellExperimentobject to non-empty ones and add corresponding statistics.
-
cc_genes_fn() - Get dataframe of cell cycle genes.
-
pca_phase_plots_fn() - Make dimred plots of PCA colored by cell cycle phase.
-
sce_cc_fn() - Assign cell cycle phase to cells.
-
sce_norm_fn()scran_normalization()sctransform_normalization() - Normalize counts either by
scranorsctransform.
-
sce_norm_hvg_fn() - Find highly variable genes (HVGs).
-
sce_rm_doublets_fn() - Remove cell doublets from a
SingleCellExperimentobject.
-
selected_markers_plots_fn() - Make a grid of feature plots for selected genes.
-
get_int_method_description() - Return description for an integration method.
-
hvg_int_list_fn() - Get a named list of HVG data (gene IDs, fit, metadata).
-
hvg_plot_int_fn() - Make a HVG plot for uncorrected
SingleCellExperimentobject (processed bybatchelor::multiBatchNorm()).
-
int_diagnostics_df_fn() - Compute and make integration diagnostics and plots for each integration method.
-
integration_methods_df_fn() - Make a tibble with integration methods and their parameters.
-
sce_int_clustering_df_fn() - Compute a quick graph-based clustering for each integration method.
-
sce_int_combine_hvgs() - Combine HVG data from a list of
SingleCellExperimentobjects.
-
sce_int_df_fn() - Perform integration of single-samples.
-
sce_int_dimred_df_fn() - Calculate t-SNE and UMAP for each integration method result (
SingleCellExperimentobject).
-
sce_int_dimred_plots_df_fn() - Make dimred plot for each combination of integration method, dimred method, and coloring by batch (single-sample) and cell cycle phase.
-
sce_int_import_fn() - Import
sce_final_norm_clusteringtargets fromdrakecaches.
-
sce_int_pca_df_fn() - Compute PCA for each integration method result (
SingleCellExperimentobject).
-
sce_int_processed_fn() - Subset each object in a list of
SingleCellExperimentobjects to common data and their corresponding metadata (e.g. HVGs).
-
sce_int_raw_snn_clustering_fn() - Perform a fast shared nearest neighbor clustering of each sample.
-
selected_markers_int_df_fn() - Prepare parameters for expression plots of selected markers.
-
selected_markers_int_plots_df_fn() - Make expression plots of selected markers.
-
collapse_ensembl_multivals() - Collapse a character vector by
",".
-
make_gene_annotation() - Create a
dataframewith annotation of SCE object's genes using anAnnotationDbipackage.
-
with_dbi() - Load a SQL database file and run a function from the
AnnotationDbipackage.
-
cell_annotation_diagnostic_plots_files_fn() - Save cell annotation diagnostic plots to PDF files.
-
cell_annotation_diagnostic_plots_fn() - Generate diagnostic plots for cell annotation.
-
cell_annotation_fn() - Perform cell annotation via
SingleR::SingleR().
-
cell_annotation_labels_fn() - Create a named list of cell labels returned from
SingleR::SingleR().
-
cell_annotation_params_fn() - Load a list of cell annotation references into a
tibble.
-
calculate_metadata() - Calculate metadata for manual cell/spot annotation for heatmap visualisation.
-
create_signature_matrix_fn() - Create signature matrix from provided file containing names with markers.
-
meta_heatmap_ploting() - Manual annotation heatmap plotting
-
run_page_man_annotation() - Calculate and run PAGE annotation.
-
cluster_markers_fn() - Add LFC summaries for Wilcox tests, obtained from t-test results.
-
cluster_markers_heatmaps_df_fn() - Create a final
tibbleholding parameters for cluster markers heatmaps generation.
-
cluster_markers_out_fn() - Create a final
dataframeof cluster markers.
-
cluster_markers_test_params_fn()cluster_markers_plot_params_fn()cluster_markers_heatmap_params_fn() - Extract columns with certain parameters from cluster markers sources
tibble.
-
cluster_markers_params_fn() - Load a list of cluster markers sources into a
tibble.
-
cluster_markers_processed_fn() - Add additional summary columns of cluster markers for comparisons with other group levels.
-
calc_sc3() - Run SC3 clustering for a specific
k.
-
cells_per_cluster_table() - Get a frequency table of cell-cluster assignments.
-
cluster_sc3_cluster_stability_plots_file_fn() - Save SC3 cluster stability plots to a single PDF.
-
cluster_sc3_df_fn() - Create a dataframe of SC3 clusters for a selected number of clusters.
-
get_pca_gene_var_pcs() - Get a number of PCs corresponding to biological variation.
-
get_pca_selected_pcs() - Get a final selection of number of PCs.
-
graph_snn_fn() - Compute shared nearest neighbors (SNN) graph.
-
make_kmeans_gaps_plot() - Make a plot of k-means gaps.
-
make_pca_selected_pcs_plot() - Make a plot showing numbers of selected PCs from all strategies.
-
run_graph_based_clustering() - Find clusters in SNN graph using a community detection algorithm and if possible, using a specified resolution.
-
run_kmeans_clustering() - Run k-means clustering for a specific
k.
-
sce_calc_pca() - Calculate PCA of a
SingleCellExperimentobject.
-
sce_compute_dimreds() - Compute t-SNE and UMAP dimreds on a
SingleCellExperimentobject.
-
contrasts_fn() - Extract contrast statistics from cluster markers tests.
-
contrasts_heatmaps_df_fn() - Create a
tibbleholding contrast results and heatmap parameters.
-
contrasts_out_fn() - Format a
tibblewith contrast results.
-
contrasts_params_fn()contrasts_heatmap_params_fn()contrasts_plot_params_fn() - Prepare a
tibblewith parameters for contrasts tests.
-
get_top_hvgs() - Get top N highly variable genes (HVGs) by a specified metric.
-
plot_hvg() - Plot average expression vs. HVG metrics (total, bio, and technical variance) and highlight HVGs.
-
plot_hvg_fit() - Plot fit of a HVG metric and highlight HVGs.
-
sce_get_cc_genes() - Identify cell cycle-related genes by using variance explained threshold.
-
sce_remove_cc_genes() - Remove cell cycle-related genes from HVGs.
-
add_marker_table_links() - Convert specified columns of a marker table to HTML links.
-
filter_markers() - Filter a dataframe with cluster markers.
-
generate_markers_results_section() - Generate a table with links to marker results.
-
marker_heatmap() - Make a heatmap of cell clusters.
-
marker_heatmaps_wrapper() - Make a heatmap of global or contrast markers.
-
marker_plot() - Make a marker plot.
-
markers_dimred_plots() - Make dimred plots for each marker source defined in
CLUSTER_MARKERS_SOURCES(cluster_markers.yamlconfig) orCONTRASTS_SOURCES(contrasts.yamlconfig).
-
markers_dimred_plots_files() - Save dimred plots.
-
markers_for_tables() - Make a table used in HTML report of marker results.
-
markers_plots_files() - Make plots of top markers.
-
markers_plots_top() - Get a tibble of top markers extracted from each test result.
-
markers_table_files() - Prepare a table with markers and render a HTML report from RMarkdown template.
-
scran_markers() - Compute cell cluster markers.
-
additional_cell_data_fn() - Load additional cell data from a CSV or Rds (dataframe) file.
-
as_seurat() - Convert a
SingleCellExperimenttoSeuratobject.
-
make_cell_groupings() - Create new cell groups based on existing ones.
-
cell_data_fn() - Merge all cell-related data to a single DataFrame.
-
cells_per_cluster_table() - Get a frequency table of cell-cluster assignments.
-
create_seu_for_heatmaps() - Create a
Seuratobject used for heatmap generation.
-
merge_sce_metadata() - Merge
metadata()of multipleSingleCellExperimentobject.
-
sce_add_cell_data() - Add columns to
colData()of aSingleCellExperimentobject.
-
sce_add_colData() - Append new columns to
colDataof aSingleCellExperimentobject.
-
sce_add_metadata() - Append data to
metadata()list of aSingleCellExperimentobject.
-
sce_add_spatial_colData() - Append new columns to
colDataof aSingleCellExperimentorSpatialExperimentobject.
-
seu_add_metadata() - Append data to metadata o a
Seuratobject's assay.
-
which_genes_regex() - Get indices of genes whose annotation matches a regex.
-
convertToSCE() - Rewrite
SpatialExperimentobject to aSingleCellExperimentobject.
-
dimred_plots_cell_annotation_params_df_fn() - Make a tibble with parameters for dimred plots of cell annotation labels.
-
dimred_plots_clustering_fn() - Make a dimred plot for each clustering and dimred method.
-
dimred_plots_clustering_united_files_fn() - Put clustering dimred plots for different parameters (resolution,
k) into a single PDF.
-
dimred_plots_from_params_df() - Make dimred plots of selected variables.
-
dimred_plots_other_vars_params_df_fn() - Make a tibble with parameters for dimred plots of selected variables.
-
get_legend_35() - Extract legend from plot
-
highlight_points() - Highlight points belonging to certain levels.
-
plotReducedDim_mod() - A wrapper around
scater::plotReducedDim().
-
plot_clustree() - Plot clustering tree.
-
plot_colData() - A wrapper for
scater::plotColData().
-
plot_vln() - Make a combined violin-boxplot plot.
-
save_clustree() - Save a clustree plot into PDF.
-
save_plot_with_fallback() - Save a plot with a fallback for large legends
-
save_selected_markers_plots_files() - Save plots of selected markers.
-
selected_markers_dimplot() - Make a grid of feature plots for selected markers.
-
getDistinctColors() - A helper function for asigning colors in pseudotissue visualization
-
plot_spat_point_layer_ggplot() - A function for pseudotissue visualization
-
plot_spat_visuals() - A function for visualization selected qc matrices in image
-
plot_spat_visuals2() - A function for visualization selected qc matrices in pseudotissue
-
spatGenePlot2Dsce() - A function for visualization selected genes in pseudotissue visualization
-
visualized_spots() - A basic function for pseudotissue visualization
-
plot_deconv_results_fn() - Deconvolution annotation plotting.
-
spot_deconvolution_fn() - Deconvolution of spatial dataset.
-
cells_per_cluster_table_collapsed_html() - Print a HTML of table collapsible by button.
-
format_used_functions() - Use the downlit package to generate a Markdown list of autolinked functions wrapped inside
<details>tags.
-
generate_cell_annotation_plots_section() - Generate a section with dimred plots used in some RMarkdown files.
-
generate_dimred_plots_clustering_section() - Generate a section of clustering dimensionality reduction plots in an RMarkdown document.
-
generate_dimred_plots_section() - Generate a section with dimred plots used in some RMarkdown files.
-
generate_stage_report() - Render RMarkdown document for a stage of the pipeline.
-
create_a_link()create_img_link() - Generate a HTML link as
<a></a>or in the form of image as<a><img /></a>.
-
md_header() - Generate a Markdown header.
-
render_bootstrap_table() - Render a dataframe-like object using
knitr::kable()andkableExtra::kable_styling().
-
format_shell_command()wrap_code()format_shell_commands() - Format a shell command as a Markdown codeblock.
-
get_random_strings() - Generate random strings compounded from alphabetical characters by default.
-
str_comma()str_line()str_space() - Various utils for joining of text.
-
add_item_to_list() - Add named item (including
NULL) to a list.
-
assert_that_() - A wrapper around
assertthat::assert_that().
-
create_dummy_plot() - Create a blank
ggplotwith label.
-
filter_nulls() - Return list with removed
NULLelements.
-
get_sys_env() - Read an environment variable and if needed, assign a default value.
-
get_tmp_dir() - Get a path to the temporary directory according to the OS.
-
`%&&%` - A short-circuit evaluation-like function similar to
bash's&&operator.
-
lapply_rows() - Apply a function over rows of a
data.frame-like object and concatenate the results back totibbleordata.frame.
-
list_names_to_values() - Append names of a list of lists as values in each sublist.
-
lists_to_tibble() - Convert list of lists to tibble.
-
na_empty() - Return
NAif an object is empty.
-
replace_list_nas_with_nulls() - Replace
NAs in a list byNULLs.
-
replace_list_nulls() - Replace
NULLitems in a defined depth of a list.
-
save_pdf() - Save a list of plots to multipage PDF.
-
save_print()save_object_info() - Capture output from
print()of an object.
-
set_rstudio_drake_cache() - Set
rstudio_drake_cacheoption.
-
with_plan() - Locally change a
futureplan.
-
.apply_config_patches() - Apply YAML config patches to package-bundled configs.
-
.check_integration_methods() - Check for valid
INTEGRATION_SOURCESparameter.
-
.check_marker_sources() - Check for correct structure of
CLUSTER_MARKERS_SOURCESorCONTRASTS_SOURCES.
-
.get_dict_param() - Unlist a list of length one containing a named list.
-
.hereize_paths() - Using the
herepackage, contruct paths relative to project's root directory.
-
.load_config_group() - Load a group of YAML config files.
-
.load_configs() - Load a list of YAML config files.
-
.paths_to_base_dir() - Construct paths relative to base directory.
-
.update_configs_recursive() - Recursively update local configs using a file glob
*.default.yaml.
-
.prepare_marker_source_params().prepare_marker_sources_params() - Prepare a
tibblewith parameters for cluster marker tests.
-
.process_pipeline_config().process_main_config().process_cluster_markers_config().process_contrasts_config().prepare_cell_annotation_sources_params().process_integration_config().process_int_clustering_config().process_input_qc_config().process_norm_clustering_config() - Config processing.
-
update_config_group - Update a group of configs, i.e. pipeline, single-sample, or integration.