goatools.godag.go_tasks module

item-DAG tasks.

goatools.godag.go_tasks.get_go2parents(go2obj, relationships)[source]

Get set of parents GO IDs, including parents through user-specfied relationships

goatools.godag.go_tasks.get_go2children(go2obj, relationships)[source]

Get set of children GO IDs, including children through user-specfied relationships

goatools.godag.go_tasks.get_go2parents_isa(go2obj)[source]

Get set of immediate parents GO IDs

goatools.godag.go_tasks.get_go2children_isa(go2obj)[source]

Get set of immediate children GO IDs

goatools.godag.go_tasks.get_go2ancestors(terms, relationships, prt=None)[source]

Get GO-to- ancestors (all parents)

goatools.godag.go_tasks.get_go2descendants(terms, relationships, prt=None)[source]

Get GO-to- descendants

goatools.godag.go_tasks.get_go2depth(goobjs, relationships)[source]

Get depth of each object

goatools.godag.go_tasks.get_id2parents(objs)[source]

Get all parent IDs up the hierarchy

goatools.godag.go_tasks.get_id2children(objs)[source]

Get all child IDs down the hierarchy

goatools.godag.go_tasks.get_id2upper(objs)[source]

Get all ancestor IDs, including all parents and IDs up all relationships

goatools.godag.go_tasks.get_id2lower(objs)[source]

Get all descendant IDs, including all children and IDs down all relationships

goatools.godag.go_tasks.get_id2upperselect(objs, relationship_set)[source]

Get all ancestor IDs, including all parents and IDs up selected relationships

goatools.godag.go_tasks.get_id2lowerselect(objs, relationship_set)[source]

Get all descendant IDs, including all children and IDs down selected relationships

goatools.godag.go_tasks.get_relationship_targets(item_ids, relationships, id2rec)[source]

Get item ID set of item IDs in a relationship target set

class goatools.godag.go_tasks.IdToUpperSelect(objs, relationship_set)[source]

Bases: object

Get all ancestor IDs, including all parents and IDs up selected relationships

class goatools.godag.go_tasks.IdToLowerSelect(objs, relationship_set)[source]

Bases: object

Get all descendant IDs, including all children and IDs down selected relationships

class goatools.godag.go_tasks.CurNHigher(relationships, id2obj_all)[source]

Bases: object

Fill id2obj with item IDs in relationships.

get_id2obj_cur_n_high(id2obj_user, id_sources)[source]

Get id2obj containing: id_srcs and parents.

fill_parentidid2obj_r0(id2obj, child_obj)[source]

Fill id2obj with all parent key item IDs and their objects.

fill_parentidid2obj_r1(id2obj_user, child_obj)[source]

Fill id2obj_user with all parent/relationship key item IDs and their objects.