GO-FILTER-SUBSET(1p) | User Contributed Perl Documentation | GO-FILTER-SUBSET(1p) |
go-filter-subset.pl - extracts a subgraph from an ontology file
go-filter-subset.pl -id GO:0003767 go.obo go-filter-subset.pl -id GO:0003767 -to png go.obo | xv - go-filter-subset.pl -filter_code 'sub{shift->name =~ /transcr/}' go.obo
Exports a subset of an ontology from a file. The subset can be based on a specified set of IDs, a preset "subset" filter in the ontology file (eg a GO "slim" or subset), or a user-defined filter.
The subset can be exported in any format, including a graphical image
Multiple IDs can be passed
-id ID1 -id ID2 -id ID3 ....etc
ONLY terms belonging to the subset are exported - the -partial option is automatically set
A subroutine with which the GO::Model::Term object is tested for inclusion in the subgraph (all ancestors are automatically included)
You should have an understanding of the go-perl object model before using this option
Example:
go-filter-subset -filter_code 'sub {shift->namespace eq 'molecular_function'}' go.obo
(the same things can be achieved with the -namespace option)
For example, with the -subset option: if X and Y belong to the subset, and Z does not, and X is_a Z is_a Y, then the exported graph withh have X is_a Y
With caching mode, the first time you parse a file, then an additional file will be exported in a special format that is fast to parse. This file will have the same filename as the original file, except it will have the ".cache" suffix.
The next time you parse the file, this program will automatically check for the existence of the ".cache" file. If it exists, and is more recent than the file you specified, this is parsed instead. If it does not exist, it is rebuilt.
<http://www.godatabase.org/dev>
2021-01-09 | perl v5.32.0 |