Reports the number of GO terms at each level and depth.
See the Gene Ontology Consorium's (GOC) advice regarding levels and depths of a GO term
GO terms reported can be all GO terms in an ontology.
Or subsets of GO terms can be reported.
GO subset examples include all GO terms annotated for a species or all GO terms in a study.
Example report on full Ontology from Ontologies downloaded April 27, 2016.
Dep <-Depth Counts-> <-Level Counts->
Lev BP MF CC BP MF CC
--- ---- ---- ---- ---- ---- ----
00 1 1 1 1 1 1
01 24 19 24 24 19 24
02 125 132 192 223 155 336
03 950 494 501 1907 738 1143
04 1952 1465 561 4506 1815 1294
05 3376 3861 975 7002 4074 765
06 4315 1788 724 7044 1914 274
07 4646 1011 577 4948 906 60
08 4150 577 215 2017 352 6
09 3532 309 106 753 110 1
10 2386 171 24 182 40 0
11 1587 174 3 37 22 0
12 1032 70 1 1 0 0
13 418 53 0 0 0 0
14 107 17 0 0 0 0
15 33 4 0 0 0 0
16 11 0 0 0 0 0
In [6]:
# Get http://geneontology.org/ontology/go-basic.obo
from goatools.base import download_go_basic_obo
obo_fname = download_go_basic_obo()
In [7]:
# Get ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2go.gz
from goatools.base import download_ncbi_associations
gene2go = download_ncbi_associations()
In [8]:
from goatools.obo_parser import GODag
obodag = GODag("go-basic.obo")
In [9]:
from goatools.rpt_lev_depth import RptLevDepth
rptobj = RptLevDepth(obodag)
In [10]:
rptobj.write_summary_cnts_all()
Copyright (C) 2016, DV Klopfenstein, H Tang. All rights reserved.