get_ancestors: Get ancestors to Cell Ontology IDs

View source: R/get_ancestors.R

get_ancestorsR Documentation

Get ancestors to Cell Ontology IDs

Description

Get ancestors to Cell Ontology IDs

Usage

get_ancestors(
  meta,
  id_col = "cell_ontology_id",
  ontology = ontoProc::getCellOnto(),
  levels_up = 1,
  ancestor_col = paste0("ancestor", levels_up)
)

Arguments

meta

Metadata

id_col

Name of the column in meta with the ontology IDs.

ontology

A controlled ontology object of class ontology_index.

levels_up

How many levels up the ontology hierarchy should ancestors be retrieved from.

ancestor_col

The name of the column where the ancestor IDs will be stored.

Value

The original meta object with the new ancestor_col.

Examples

## Not run: 
  hpca_sce = celldex::HumanPrimaryCellAtlasData()
  meta_ancest <- get_ancestors(meta=hpca_sce@colData , id_col="label.ont")

## End(Not run)

neurogenomics/scNLP documentation built on Oct. 8, 2024, 5:30 p.m.