Input
| GO:0005499 |
| GO:0005502 |
| GO:0016918 |
The script takes a input file with one code term per line and translates the list to term names
semtools -O GO -i terms.txt -l names
| GO:0005499 | vitamin D binding |
| GO:0005502 | 11-cis retinal binding |
| GO:0016918 | retinal binding |
We use -C to specify whic terms use as parents to obtain all childs (from the next level to the finale leafs in the ontology). Then, all childs for the specified parents are unified in one list.
semtools -C GO:0019842,GO:0002060 -O GO
| GO:0005499 |
| GO:0005502 |
| GO:0016918 |
| GO:0005503 |
| GO:0005542 |
| GO:0008431 |
| GO:0009374 |
| GO:0019841 |
| GO:0030170 |
| GO:0070279 |
| GO:0030975 |
| GO:0030976 |
| GO:0031177 |
| GO:0031418 |
| GO:0031419 |
| GO:0070280 |
| GO:0070281 |
| GO:0070282 |
| GO:1902098 |
| GO:1902271 |
| GO:1902118 |
| GO:1904768 |
| GO:0002055 |
| GO:0002057 |
| GO:0160050 |
With '/' character previous to the term list specified with -C flag we an use modificators such 'r' to obtain pairs parent-child and 'n' to translate term codes to term names.
semtools -C 'rn/GO:0019842,GO:0002060' -O GO
| vitamin D binding | D3 vitamins binding |
| retinal binding | 11-cis retinal binding |
| retinal binding | all-trans retinal binding |
| retinol binding | all-trans-retinol binding |
| vitamin B6 binding | pyridoxal phosphate binding |
| vitamin B6 binding | pyridoxal binding |
| vitamin B6 binding | pyridoxamine binding |
| vitamin B6 binding | pyridoxine binding |
| D3 vitamins binding | calcitriol binding |
| D3 vitamins binding | calcidiol binding |
| vitamin binding | vitamin D binding |
| vitamin binding | folic acid binding |
| vitamin binding | vitamin E binding |
| vitamin binding | biotin binding |
| vitamin binding | retinal binding |
| vitamin binding | retinol binding |
| vitamin binding | thiamine binding |
| vitamin binding | thiamine pyrophosphate binding |
| vitamin binding | phosphopantetheine binding |
| vitamin binding | L-ascorbic acid binding |
| vitamin binding | cobalamin binding |
| vitamin binding | vitamin B6 binding |
| purine nucleobase binding | adenine binding |
| purine nucleobase binding | guanine binding |
| purine nucleobase binding | xanthine binding |
Others -C modificators are 'a' which assumes that the given terms are childs and that the user desires the parent terms of these childs. The numbers of levels checked (parents or childs without 'a' or not) could be controlled with 'hN' where N must be an integrate with the number of hops (i.e. 'h2' means that the command only must check the next/previous two levels of the ontology)
semtools -C 'rah2n/GO:0019842,GO:0002060' -O GO
| nucleobase binding | purine nucleobase binding |
| small molecule binding | heterocyclic compound binding |
| organic cyclic compound binding | nucleobase binding |
| heterocyclic compound binding | nucleobase binding |
| small molecule binding | vitamin binding |
| binding | small molecule binding |
| binding | organic cyclic compound binding |
Input
| GO:0005499 |
| GO:0005502 |
| GO:0016918 |
| GO:0005503 |
| GO:0005542 |
| GO:0008431 |
| GO:0009374 |
| GO:0019841 |
| GO:0030170 |
| GO:0070279 |
| GO:0030975 |
| GO:0030976 |
| GO:0031177 |
| GO:0031418 |
| GO:0031419 |
| GO:0070280 |
| GO:0070281 |
| GO:0070282 |
To filter a list of code terms the -F flag must be used with a string that with specifices white lists (p, to keep terms with a given parent) or black list (n, to remove terms with a given parent). Parents are listed as comma separated term list flanked by '(' and ')'. The string can include several especifications of this estructure. The flag '--list' specifies that the input file is one item per line list.
semtools -i terms.txt -F 'n(GO:0070279)' --list -O GO
| GO:0005499 |
| GO:0005502 |
| GO:0016918 |
| GO:0005503 |
| GO:0005542 |
| GO:0008431 |
| GO:0009374 |
| GO:0019841 |
| GO:0070279 |
| GO:0030975 |
| GO:0030976 |
| GO:0031177 |
| GO:0031418 |
| GO:0031419 |