goatools.gosubdag.gosubdag module

Manages a user-specified subset of a GO DAG.

class goatools.gosubdag.gosubdag.GoSubDag(go_sources, go2obj, relationships=None, **kws)[source]

Bases: object

Manages a user-specified subset of a GO DAG.

kws_ok: Set[str] = {'children', 'go2color', 'go2letter', 'go2nt', 'prt', 'rcntobj', 'tcntobj'}
prt_goids(goids=None, prtfmt=None, sortby=True, prt=sys.stdout)[source]

Given GO IDs, print decriptive info about each GO Term.

get_nts(goids=None, sortby=None)[source]

Given GO IDs, get a list of namedtuples.

get_fncsortnt()[source]

Return sorted list of tuples.

get_go2nt(goids)[source]

Return dict of GO ID as key and GO object information in namedtuple.

get_go2obj(goids)[source]

Return a go2obj dict for just the user goids.

get_vals(field, goids=None)[source]

Return a go2obj dict for just the user goids.

get_key_goids(goids)[source]

Given GO IDs, return key GO IDs.

get_ns2goids(goids)[source]

Group GO IDs by namespace.

prt_objdesc(prt=sys.stdout, desc='')[source]

Return description of this GoSubDag object.