View source: R/velocity_analysis_functions.R
write_off_md | R Documentation |
Save Off Metadata for Velocity Analysis
write_off_md(
sobj,
id_col,
output_dir,
vars_to_keep = NULL,
handle_n_of_1 = TRUE
)
sobj |
Seurat object; must have a column titled sample_id |
output_dir |
The directory you wish to save your metadata to |
vars_to_keep |
Metadata columns you want saved off along with sample_id and UMAP and PCA embeddings |
handle_n_of_1 |
boolean saying whether or not you want to handle the special case when a sample has only one observation |
sobj_id |
The specific seurat object ID for which you want metadata; required even if only one sample in sobj |
This is a helper function for running RNA velocity analysis. While your Seurat object may contain multiple samples, the loom files are constructed for each sample_id present in that object, and the anndata objects created from those loom files are for each individual sample_id. The function assumes that you made the loom files using the shell script "make_loom_files.sh", which changes the row names and appends a unique ID to the end of each sample when saving it off.
A csv for each sample ID containing the sample ID, the reductions, and any user specified columns of metadata in output_dir
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.