mondolib package
Subpackages
- mondolib.config package
- mondolib.datamodels package
- Submodules
- mondolib.datamodels.mondolib_schema module
CandidateObsoletion
CandidateObsoletion.class_class_curie
CandidateObsoletion.class_class_uri
CandidateObsoletion.class_model_uri
CandidateObsoletion.class_name
CandidateObsoletion.confidence
CandidateObsoletion.direct_child_terms
CandidateObsoletion.has_definition
CandidateObsoletion.is_likely_grouping
CandidateObsoletion.is_ordo_only
CandidateObsoletion.label
CandidateObsoletion.lexical_pattern_matches
CandidateObsoletion.term
CandidateObsoletionTerm
Configuration
LexicalPattern
Report
ValidationCheckScope
slots
slots.candidateObsoletion__confidence
slots.candidateObsoletion__direct_child_terms
slots.candidateObsoletion__has_definition
slots.candidateObsoletion__is_likely_grouping
slots.candidateObsoletion__is_ordo_only
slots.candidateObsoletion__label
slots.candidateObsoletion__lexical_pattern_matches
slots.candidateObsoletion__term
slots.configuration__exclude_terms_with_definitions
slots.configuration__lexical_patterns
slots.lexicalPattern__description
slots.lexicalPattern__obsoletion_reason
slots.lexicalPattern__pattern
slots.lexicalPattern__scope
slots.report__candidate_obsoletions
- mondolib.datamodels.vocabulary module
- Module contents
- mondolib.qc package
- mondolib.utilities package
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.