celltype_maps: Cell-type maps

celltype_mapsR Documentation

Cell-type maps

Description

Mappings from cell-type names to cell-type ontology terms in the HumanCellLandscape and DescartesHuman scRNA-seq datasets.

Usage

data("celltype_maps")

Format

data.table

Source

## Download standardised Seurat objects from CellXGene. obj_list <- list() obj_list[["DescartesHuman"]] <- readRDS("~/Downloads/db4d63ab-0ca3-4fa5-b0cf-34955227912d.rds") obj_list[["HumanCellLandscape"]] <- readRDS("~/Downloads/1b7484e3-83a0-47fe-847e-54d811a2adae.rds") cols <- c("Main_cluster_name", "author_cell_type", "cell_type_ontology_term_id", "cell_type") celltype_maps <- lapply(obj_list, function(obj){ select_cols <- cols[cols meta <- unique(data.table::as.data.table(obj@meta.data[,select_cols])) data.table::setnames(meta, 1, "author_celltype") meta[,author_celltype:=EWCE::fix_celltype_names(author_celltype, make_unique = FALSE)] unique(meta) }) |> data.table::rbindlist(idcol = "ctd") #### Ensure one entry per cell type celltype_maps <- celltype_maps[,.SD[1],by=c("ctd","author_celltype")] ## Rename cols to make more concise and conform to hpo_id/hpo_name format data.table::setnames(celltype_maps, c("cell_type_ontology_term_id","cell_type"), c("cl_id","cl_name")) celltype_maps <- fix_cl_ids(celltype_maps) usethis::use_data(celltype_maps, overwrite = TRUE)


neurogenomics/MultiEWCE documentation built on April 22, 2024, 6:22 a.m.