goatools.gosubdag.plot.plot module¶
Plot a GoSubDag.
GO Terms in a plot contain text. The first two lines appear by default:
GO:0015618 L07 D13 p2 c2 d3 potassium-transporting ATPase activity
GO:0015618 => GO ID
First line:
- LNN => The “level” of the go term.
The length of the shortest path(s) from the top to the current term.
- DNN => The “depth” of the go term.
The length of the longest path(s) from the top to the current term.
- pN => Optional (parentcnt arg): number of immediate parent terms if the number
of parents plotted is different than the number of parents in the obo. The default is to plot all higher-level parent terms from the source GO IDs to best show the hierarchy. But with some plots, plotting all parent GO terms can result in a GO DAG which is too large to be clearly readable. The user can then force some parent GO terms to not be plotting using the init_dag=path keyword. If some parent terms are not plotted, using the “parentcnt” option can help the user know where the plot was cut for readability.
- cN => Optional (childcnt arg): number of immediate child terms.
Child hierarchy is not traversed. The default is to not plot all lower-level child terms to prevent the GO plots from being massive and unreadable. So knowing the total number of immediate child terms present (with most not on the plot) can give the user a better sense of the qualities of their plot.
- dN => Optional (rcntobj arg): total number of all levels of child terms.
Child hierarchy is traversed to the bottom or the leaf-level of the graph. Knowing the total number of all descendants succinctly gives the user a sense of how close a GO term is to the bottom of the graph. “Descendants Count” is used a proxy for understanding if the GO term is a “broad” or “specific”. If the GO term broadly describes a biological process, it most always has hundreds or thousands of total child terms. If the GO term specifically describes a biological process, it often has tens or less of total child terms.
- goatools.gosubdag.plot.plot.plt_goids(gosubdag, fout_img, goids, **kws_plt)[source]¶
Plot GO IDs in a DAG (Directed Acyclic Graph).
- goatools.gosubdag.plot.plot.plot_gos(fout_img, goids, go2obj, **kws)[source]¶
Given GO ids and the obo_dag, create a plot of paths from GO ids.