goatools.godag.obographs module

Read a GO DAG from OBO Graphs JSON (go-basic.json) into the same records as an obo file.

goatools.godag.obographs.get_obo_id(iri: str) → str[source]

…/obo/GO_0008150 -> GO:0008150

goatools.godag.obographs.get_fragment(iri: str) → str[source]

…/obo/go#goslim_generic -> goslim_generic

class goatools.godag.obographs.OboGraphsReader(obo_file='go-basic.obo', optional_attrs=None)[source]

Bases: OBOReader

OBOReader for OBO Graphs JSON: yields one GOTerm per term.

Each node becomes the obo lines it stands for, read by OBOReader’s record builder.