build_atlas | R Documentation |
Function to combine records into single atlas
build_atlas(matrix_fns = NULL, genes_fn, matrix_objs = NULL, output_fn = NULL)
matrix_fns |
character vector of paths to study matrices stored as .rds files. If a named character vector, then the name will be added as a suffix to the cell type name in the final matrix. If it is not named, then the filename will be used (without .rds) |
genes_fn |
text file with a single column containing genes and the ordering desired in the output matrix |
matrix_objs |
Checks to see whether .rds files will be read or R objects in a local environment. A list of environmental objects can be passed to matrx_objs, and that names will be used, otherwise defaults to numbers |
output_fn |
output filename for .rds file. If NULL the matrix will be returned instead of saving |
Combined matrix with all genes given
pbmc_ref_matrix <- average_clusters(
mat = pbmc_matrix_small,
metadata = pbmc_meta,
cluster_col = "classified",
if_log = TRUE # whether the expression matrix is already log transformed
)
references_to_combine <- list(pbmc_ref_matrix, cbmc_ref)
atlas <- build_atlas(NULL, human_genes_10x, references_to_combine, NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.