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:
go-basic.obo: fmt(1.2) rel(2019-01-12) 47,374 GO Terms
Summary for all Ontologies:
Dep <-Depth Counts-> <-Level Counts->
Lev BP MF CC BP MF CC
--- ---- ---- ---- ---- ---- ----
00 1 1 1 1 1 1
01 29 16 21 29 16 21
02 264 125 345 421 154 746
03 1273 570 494 2205 866 1073
04 2376 1516 735 4825 2072 1359
05 3692 4801 913 7297 5035 697
06 4474 1834 787 7287 1934 230
07 4699 1029 600 4696 728 68
08 4214 508 254 2018 194 10
09 3516 312 51 631 79 1
10 2399 153 4 241 13 0
11 1511 140 1 38 19 0
12 854 42 0 0 0 0
13 303 35 0 0 0 0
14 66 21 0 0 0 0
15 14 7 0 0 0 0
16 4 1 0 0 0 0
In [1]:
# Get http://geneontology.org/ontology/go-basic.obo
from goatools.base import download_go_basic_obo
obo_fname = download_go_basic_obo()
In [2]:
# Get ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2go.gz
from goatools.base import download_ncbi_associations
gene2go = download_ncbi_associations()
In [3]:
from goatools.obo_parser import GODag
obodag = GODag("go-basic.obo")
In [4]:
from goatools.rpt.rpt_lev_depth import RptLevDepth
rptobj = RptLevDepth(obodag)
In [5]:
rptobj.write_summary_cnts_all()
Copyright (C) 2016-2019, DV Klopfenstein, H Tang. All rights reserved.