goatools.gosubdag.go_tasks module

Tasks for go2obj dicts.

goatools.gosubdag.go_tasks.get_sorted_relationship(goterms)[source]

Topological sort of GO Terms w/’relationship’s loaded.

class goatools.gosubdag.go_tasks.TopologicalSortRelationships(goterms)[source]

Bases: object

Topological sort of GO Terms w/’relationship’s loaded.

goatools.gosubdag.go_tasks.get_go2obj_unique(go2obj)[source]

If GO keys point to the same GOTerm, return new go2obj w/no duplicates.

goatools.gosubdag.go_tasks.get_go2parents_go2obj(go2obj, relationships=None, prt=None)[source]

Return go2ancestors (set of parent GO IDs) for all GO ID keys in go2obj.

goatools.gosubdag.go_tasks.get_go2children_go2obj(go2obj, relationships=None, prt=None)[source]

Return go2children (set of child GO IDs) for all GO ID keys in go2obj.

goatools.gosubdag.go_tasks.get_goobjs_altgo2goobj(go2obj)[source]

Separate alt GO IDs and key GO IDs.

goatools.gosubdag.go_tasks.add_alt_goids(go2values, altgo2goobj)[source]

Add alternate source GO IDs.

goatools.gosubdag.go_tasks.fill_main_goids(go2obj, goids)[source]

Ensure main GO IDs are included in go2obj.

goatools.gosubdag.go_tasks.fill_altgoids(go2obj)[source]

Given a go2obj containing key GO IDs, fill with all alternate GO IDs.

goatools.gosubdag.go_tasks.fill_relationshipobjs(go2obj, relationships)[source]

Add GO IDs to go2obj that are involved in relationships.

class goatools.gosubdag.go_tasks.RelationshipFill(go2obj, relationships)[source]

Bases: object

Fill go2obj with GO IDs in relatinships.

fill_relationshipgo2obj(goobj)[source]

Fill go2obj with all relationship key GO IDs and their objects.

fill_relationshiprevgo2obj(goobj)[source]

Fill go2obj with all relationship key GO IDs and their objects.

goatools.gosubdag.go_tasks.get_child_objs(parent_obj)[source]

Fill child2obj with all child key and alt GO IDs and their objects.

goatools.gosubdag.go_tasks.fill_childgoid2obj(childgoid2obj, parent_obj)[source]

Fill childgoid2obj with all child key GO IDs and their objects.

goatools.gosubdag.go_tasks.get_leaf_children(gos_user, go2obj_arg)[source]

Find all the GO descendants under all user GO IDs. Return leaf-level GO IDs.

goatools.gosubdag.go_tasks.goid_is_valid(goid)[source]

Check format of user-provided GO IDs

goatools.gosubdag.go_tasks.goids_valid(goids)[source]

Check format of user-provided GO IDs

goatools.gosubdag.go_tasks.chk_goids(goids, msg=None, raise_except=True)[source]

check that all GO IDs have the proper format.