napistu.rpy2.rids

Functions

create_bioconductor_mapping_tables(mappings, ...)

Create Bioconductor Mapping Tables.

napistu.rpy2.rids._create_single_mapping(ontology: str, species: str, r_paths: str | None = None) DataFrame

Create a single mapping table for a given ontology.

Parameters:
  • ontology (str) – The ontology to map (e.g. ENSEMBL_GENE, UNIPROT)

  • species (str) – The organismal species to map

  • r_paths (str | None, optional) – Optional path to R packages directory

Returns:

DataFrame containing the mapping between entrez and the target ontology

Return type:

pd.DataFrame

napistu.rpy2.rids.create_bioconductor_mapping_tables(mappings: set[str], species: str, r_paths: str | None = None) dict[str, DataFrame]

Create Bioconductor Mapping Tables.

Creating a dictionary of mappings between entrez and other ontologies.

Parameters:
  • mappings (set[str]) – A set of ontologies to work with. The valid ontologies are: “ensembl_gene”, “ensembl_transcript”, and “uniprot”.

  • species (str) – The organismal species that we are working with (e.g., Homo sapiens).

  • r_paths (str | None, optional) – Optional path to a library of R packages.

Returns:

A table of entrez ids, and tables mapping from each ontology in “mappings” to entrez.

Return type:

dict[str, pd.DataFrame]

Raises:

ValueError – If any of the requested mappings are not supported