goatools.cli.gosubdag_plot module

Command-line script to create GO term diagrams

Usage:
  goatools go_plot [GO ...] [options]
  goatools go_plot [GO ...] [--obo=<file.obo>] [--outfile=<file.png>] [--title=<title>]
                   [--go_file=<file.txt>]
                   [--relationship]
                   [--relationships=<part_of>]
                   [--sections=<sections.txt>]
                   [--gpad=<file.gpad>]
                   [--gaf=<file.gaf>]
                   [--gene2go=<gene2go>] [--taxid=<Taxonomy_number>]
                   [--id2gos=<file.txt>]
                   [--shorten] [--no_ldr]
                   [--parentcnt] [--childcnt] [--mark_alt_id]
                   [--go_aliases=<go_aliases.txt>]
                   [--draw-children]
                   [--norel]
                   [--go_color_file=<file.txt>]
                   [--rankdir=<rankdir>]
  goatools go_plot [GO ...] [--obo=<file.obo>] [-o <file.png>] [-t <title>]
                   [--shorten] [-p] [-c]
  goatools go_plot [GO ...] [-o <file.png>] [--draw-children]
  goatools go_plot [GO ...] [-o <file.png>] [--draw-children] [--shorten]
  goatools go_plot [--obo=<file.obo>]
  goatools go_plot [--obo=<file.obo>] [--outfile=<file.png>]
  goatools go_plot [GO ...]
  goatools go_plot [GO ...] [--outfile=<file.png>] [--title=<title>]
  goatools go_plot [GO ...] [--outfile=<file.png>] [--title=<title>] [--shorten]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>] [--parentcnt]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>] [--childcnt]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>] [--parentcnt] [--childcnt]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>] [-p]
  goatools go_plot [GO ...] [-o <file.png>] [-t <title>] [-p] [-c]

Options:
  -h --help                            show this help message and exit
  -i --go_file=<file.txt>              GO IDs in an ASCII file
  -o <file.png>, --outfile=<file.png>  Plot file name [default: go_plot.png]
  -r --relationship                    Plot all relationships
  --relationships=<part_of>            Plot user-specified relationships
  -s <sections.txt> --sections=<sections.txt>  Sections file for grouping
  -S <sections module str>             Sections file for grouping

  --gpad=<file.gpad>                   Annotations from a gpad file
  --gaf=<file.gaf>                     Annotations from a gaf file
  --id2gos=<file.txt>                  Annotations from a text file, e.g., data/association
  --gene2go=<gene2go>                  Annotations from a gene2go file downloaded from NCBI
  --taxid=<taxid_num>                  TaxID for use when reading NCBI's gene2go file

  --obo=<file.obo>                     Ontologies in obo file [default: go-basic.obo].

  -t <title>, --title=<title>          Title string to place in image
  -p --parentcnt                       Include parent count in each GO term
  -c --childcnt                        Include child count in each GO term
  --shorten                            Shorten the GO name on plots
  --no_ldr                             Do not print L(evel), D(epth), R(eldepth) in GO term boxes
  --mark_alt_id                        Add 'a' if GO ID is an alternate ID: GO:0007582a
  --draw-children                      Draw children. By default, they are not drawn.
  --go_aliases=<go_aliases.txt>        ASCII file containing letter alias
  --go_color_file=<file.txt>           GO color file. GO and color (eg #cafffb)
  --rankdir=TB|LR|BT|RL                Choose orientation of graph; Top->Bottom, Left->Right, ... [default: TB]

  --norel                              Don't load relationship from the GO DAG
class goatools.cli.gosubdag_plot.CliGetGOs(go2obj)[source]

Bases: object

Return a list of GO IDs for plotting.

max_gos = 200
get_go_color(**kws)[source]

Return source GO IDs and GO color, if provided.

class goatools.cli.gosubdag_plot.PlotCli(gosubdag=None, use_doc=True)[source]

Bases: object

Class for command-line interface for creating GO term diagrams

kws_dict = {'GO', 'S', 'gaf', 'gene2go', 'go_aliases', 'go_color_file', 'go_file', 'gpad', 'id2gos', 'obo', 'outfile', 'rankdir', 'relationships', 'sections', 'taxid', 'title'}
kws_set = {'childcnt', 'draw-children', 'mark_alt_id', 'no_ldr', 'norel', 'parentcnt', 'relationship', 'shorten'}
dflt_outfile = 'go_plot.png'
kws_plt = {'childcnt', 'mark_alt_id', 'no_ldr', 'parentcnt', 'shorten'}
cli(kws_plt=None, args=None)[source]

Command-line interface for go_draw script.

plot(godag, kws_plt)[source]

Plot GO DAG subset

get_gosubdagplot(godag, kws_plt)[source]

Get GoSubDagPlot

get_docargs(args=None, prt=None)[source]

Pare down docopt. Return a minimal dictionary and a set containing runtime arg values.

get_outfile(outfile, goids=None)[source]

Return output file for GO Term plot.

goatools.cli.gosubdag_plot.main(args=None)[source]

Create GO-DAG plots from the command line.