ncbi_gene_pyobo.transform_utils package

Submodules

ncbi_gene_pyobo.transform_utils.ontology_transform module

Ontology transform module.

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

Bases: Transform

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

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.

ncbi_gene_pyobo.transform_utils.transform module

Transform utilities.

class ncbi_gene_pyobo.transform_utils.transform.Transform(source_name, input_dir=None, output_dir=None)

Bases: object

Parent class for transforms, that sets up a lot of default file info.

Module contents

Ontology transform module.

class ncbi_gene_pyobo.transform_utils.OntologyTransform(input_dir=None, output_dir=None)

Bases: Transform

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

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.