mondolib package

Subpackages

Submodules

mondolib.cli module

Command line interface for mondolib.

mondolib.constants module

Constants used in package.

mondolib.main module

Main python file.

mondolib.main.add_obsoleted_label(all_ancestors, obsoletion_candidates_set)

Tag all terms that are obsolete candidates.

mondolib.main.add_status_and_update_parents(df, resource, obsoletion_candidates_file)
Return type:

DataFrame

Add status based on `robot reason`ed output.

The Dataframe that is passed here are rows present from the reasoned table and that are absent in the relaxed table. The 2 ancestor columns had CURIEs missing and thus we get them from oaklib eithout obsoletion terms inolved.

Spreadsheet explaining this: https://docs.google.com/spreadsheets/d/1fbHJAbrq4gDbUX3wg92AuLyqTWKPr_IR-ew6LHuWoMc/edit#gid=0

mondolib.main.create_review_table(branch_id, branch_id_file, obsoletion_candidates_file, output_file, input)

Generate review table for branch obsoletion.

Parameters:
  • branch_id – Branch CURIE.

  • branch_id_file – TSV file listing all branch IDs.

  • obsoletion_candidates_file – TTSV listing all obsoletion candidate CURIEs

  • output_file – output filepath.

  • input – input ontology resource (Path to local file or slug for oaklib).

mondolib.main.demo()

Define API.

mondolib.main.get_columns_as_sets(row)

Return each column of a row as a set of CURIEs.

mondolib.main.get_immediate_children(curie, relationships)

Get immediate children of CURIE passed.

mondolib.main.get_immediate_parent(curie, relationships)

Get immediate parents of CURIE passed.

mondolib.main.get_status(other_parents_in_branch_list_merged, other_parents_not_in_branch_list_merged)

Set the status of obsoletion.

mondolib.main.relax_and_reason(input, obsoletion_candidates_file, output_file, relaxed_resource)

Take in `robot relax`ed source and given `robot reason`ed (same source), write output.

Parameters:
  • input – Resource filepath.

  • obsoletion_candidates_file – TSV file listign obsoletion candidate CURIEs.

  • output_file – Output file path to write results.

  • relaxed_resource – File path for robot relax output.

mondolib.main.stringify(item, OI)

Take in a list, add OBSLETION_SUFFIXes wherever appropriate and list => string.

mondolib.main.update()

Update ontology file.

mondolib.main.validate(input, output)

Validate.

Module contents

mondolib package.