napistu.ingestion.reactome

Functions

construct_reactome_consensus(pw_index_inp, ...)

Constructs a basic consensus model by merging all models from a pw_index

reactome_sbml_download(output_dir_path[, ...])

Reactome SBML Download

napistu.ingestion.reactome._build_reactome_pw_index(output_dir: str, file_ext: str, species_filter: Iterable[str] | None = None) DataFrame

Build a reactome pathway index

Builds the index based on available files and cross-check it with the expected reactome pathway list.

Parameters:
  • output_dir (str) – File directory

  • file_ext (str) – File extension

  • species_filter (Optional[Iterable[str]], optional) – Filter the expected pathway list based on a list of species. E.g., in cases where only one species is available. Defaults to None.

Returns:

pathway index

Return type:

pd.DataFrame

napistu.ingestion.reactome._check_reactome_pw_index(pw_index: PWIndex, reactome_pathway_list: list)

Compare local files defined in the pathway index to a list of Reactome’s pathways.

napistu.ingestion.reactome._get_reactome_pathway_list()

Reactome Pathway List Produce a pd.DataFrame listing all pathways in reactome and their internal ids

Parameters:

None

Returns:

pd.DataFrame containing pathway_id, name and species

napistu.ingestion.reactome.construct_reactome_consensus(pw_index_inp: str | PWIndex, organismal_species: str | OrganismalSpeciesValidator, outdir: str | None = None, strict: bool = True, verbose: bool = False) SBML_dfs

Constructs a basic consensus model by merging all models from a pw_index

Parameters:
  • pw_index_inp (str | indices.PWIndex) – PWIndex or uri pointing to PWIndex

  • organismal_species (str | OrganismalSpeciesValidator) – The species to filter to

  • outdir (str | None, optional) – output directory used to cache results. Defaults to None.

  • strict (bool) – should failure of loading any given model throw an exception? If False a warning is thrown.

  • verbose (bool, default=False) – If True, then include detailed logs.

Returns:

sbml_dfs_core.SBML_dfs

Return type:

A consensus SBML

napistu.ingestion.reactome.reactome_sbml_download(output_dir_path: str, overwrite: bool = False) None

Reactome SBML Download

Download Reactome SBML (systems biology markup language) for all reactome species.

Parameters:
  • output_dir_path (str) – Paths to a directory where .sbml files should be saved.

  • overwrite (bool) – Overwrite an existing output directory. Default: False

Return type:

None