<jupyter_start><jupyter_text>Report counts of GO terms at various levels and depthsReports the number of GO terms at each level and depth.     * **Level** refers to the length of the shortest path from the top.     * **Depth** refers to the length of the longest path from the top.See the Gene Ontology Consorium's (GOC) advice regarding [levels and depths of a GO term](http://geneontology.org/faq/how-can-i-calculate-level-go-term)     GO level and depth reportingGO 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 TermsSummary for all Ontologies:Dep   Lev   BP    MF    CC    BP    MF    CC--- ----  ----  ----  ----  ----  ----00     1     1     1     1     1     101    29    16    21    29    16    2102   264   125   345   421   154   74603  1273   570   494  2205   866  107304  2376  1516   735  4825  2072  135905  3692  4801   913  7297  5035   69706  4474  1834   787  7287  1934   23007  4699  1029   600  4696   728    6808  4214   508   254  2018   194    1009  3516   312    51   631    79     110  2399   153     4   241    13     011  1511   140     1    38    19     012   854    42     0     0     0     013   303    35     0     0     0     014    66    21     0     0     0     015    14     7     0     0     0     016     4     1     0     0     0     0```  1. Download Ontologies, if necessary<jupyter_code># Get http://geneontology.org/ontology/go-basic.obo
from goatools.base import download_go_basic_obo
obo_fname = download_go_basic_obo()<jupyter_output>EXISTS: go-basic.obo<jupyter_text>2. Download Associations, if necessary<jupyter_code># Get ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2go.gz
from goatools.base import download_ncbi_associations
gene2go = download_ncbi_associations()<jupyter_output>EXISTS: gene2go<jupyter_text>3. Initialize GODag object<jupyter_code>from goatools.obo_parser import GODag

obodag = GODag("go-basic.obo")<jupyter_output>go-basic.obo: fmt(1.2) rel(2019-01-12) 47,374 GO Terms<jupyter_text>4. Initialize Reporter class<jupyter_code>from goatools.rpt.rpt_lev_depth import RptLevDepth

rptobj = RptLevDepth(obodag)<jupyter_output><empty_output><jupyter_text>5. Generate depth/level report for all GO terms<jupyter_code>rptobj.write_summary_cnts_all()<jupyter_output>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
{'fraction_non_alphanumeric': 0.067471371092541, 'fraction_numerical': 0.18384401114206128, 'mean_word_length': 1.8251748251748252, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '128948', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1133, 'n_words': 406, 'path': 'notebooks/report_depth_level.ipynb', 'repo_name': 'cinaljess/goatools', 'size': '3231'}