OAK rollup command

This notebook is intended as a supplement to the main OAK CLI docs.

This notebook provides examples for the rollup command which produces a summarization of ontology associations between entities and “rolled-up” ancestor terms.

Help Option

You can get help on any OAK command using --help

[1]:
!runoak rollup --help
Usage: runoak rollup [OPTIONS] [TERMS]...

  Produce an association rollup report.

  The report will list associations where the subject is one of the terms
  provided. The associations will be grouped by any provided --object-group
  options. This option can be provided multiple times. If the value is a comma
  separated list of object IDs, the first will be used as a primary grouping
  dimension and the remainder will be used to create sub-groups.

  Example:

      runoak -i sqlite:go.db -g wb.gaf -G gaf rollup             --object-
      group GO:0032502,GO:0007568,GO:0048869,GO:0098727             --object-
      group GO:0008152,GO:0009056,GO:0044238,GO:1901275             --object-
      group GO:0050896,GO:0051716,GO:0051606,GO:0051606,GO:0014823
      --object-group=GO:0023052             --output rollup.html
      WB:WBGene00000417 WB:WBGene00000912 WB:WBGene00000898 WB:WBGene00006752

  By default, is-a relationships between association objects are used to
  perform the rollup. Use the -p/--predicates option to change this behavior.

Options:
  -o, --output FILENAME         Output file, e.g. obo file
  -p, --predicates TEXT         A comma-separated list of predicates
  --autolabel / --no-autolabel  If set, results will automatically have labels
                                assigned  [default: autolabel]
  -O, --output-type TEXT        Desired output type
  --object-group TEXT           An object ID to group by. If a comma separated
                                list of IDs is provided, the first one is
                                interpreted as a top-level grouping and the
                                remaining IDs are interpreted as sub-groups
                                within.
  --help                        Show this message and exit.

Download example file and setup

We will use the HPO Association file

[1]:
!curl -L -s http://purl.obolibrary.org/obo/hp/hpoa/genes_to_phenotype.txt > input/g2p.tsv

next we will set up an hpo alias

[1]:
alias hp runoak -i sqlite:obo:hp

Test this out by querying for associations for a particular orpha disease.

We need to pass in the association file we downloaded, as well as specify the file type (with -G):

[3]:
hp -G hpoa_g2p -g input/g2p.tsv associations -Q subject NCBIGene:8195 -O csv | head










Enrichment

Next we will enrich based on a gene set

[4]:
alias mondo runoak -i sqlite:obo:mondo
[ ]: