kg_bacdive.transform_utils.ontology package

Submodules

kg_bacdive.transform_utils.ontology.ontology_transform module

Ontology transform module.

class kg_bacdive.transform_utils.ontology.ontology_transform.OntologyTransform(input_dir=None, output_dir=None)

Bases: Transform

OntologyTransform parses an Obograph JSON form of an Ontology into nodes nad edges.

decompress(data_file)

Unzip file.

parse(name, data_file, source)

Process the data_file.

Parameters:
  • name (str) – Name of the ontology.

  • data_file (Optional[Path]) – data file to parse.

  • source (str) – Source name.

Return type:

None

Returns:

None.

run(data_file=None)

Transform an ontology.

Parameters:

data_file (Union[Path, None, str]) – data file to parse

Return type:

None

Returns:

None.

Module contents

Ontology transform module.

class kg_bacdive.transform_utils.ontology.OntologyTransform(input_dir=None, output_dir=None)

Bases: Transform

OntologyTransform parses an Obograph JSON form of an Ontology into nodes nad edges.

decompress(data_file)

Unzip file.

parse(name, data_file, source)

Process the data_file.

Parameters:
  • name (str) – Name of the ontology.

  • data_file (Optional[Path]) – data file to parse.

  • source (str) – Source name.

Return type:

None

Returns:

None.

run(data_file=None)

Transform an ontology.

Parameters:

data_file (Union[Path, None, str]) – data file to parse

Return type:

None

Returns:

None.