goatools.gosubdag.go_paths module

Collect GO paths.

class goatools.gosubdag.go_paths.GoPaths[source]

Bases: object

Class for helping traverse GO paths.

adjdir = {False: <function GoPaths.<lambda>>, None: <function GoPaths.<lambda>>, True: <function GoPaths.<lambda>>}
get_paths_from_to(goobj_start, goid_end=None, dn0_up1=True)[source]

Get a list of paths from goobj_start to either top or goid_end.

static prt_paths(paths, prt=sys.stdout)[source]

Print list of paths.

goatools.gosubdag.go_paths.get_paths_goobjs(go_objs, go_top=None, go2obj=None)[source]

Given a list of GO objects, return: paths, user GOs as ints, all GO terms paths.

goatools.gosubdag.go_paths.paths2edges(paths)[source]

[8079, 8135, 3723, 3676, 1901363, 5488, 3674]

goatools.gosubdag.go_paths.path2edges(path)[source]

Given: [2000343, 32722, 1819] Return: set([(2000343, 32722), (32722, 1819)]).