The obo2flat utility converts an OBO file to one or more GO Flat Files.
obo2flat [options] <inputfile1> <inputfile2>
... <inputfileN>
The command line parameters are:
-def <definition_file>
- (optional)
Specifies the path to the definitions
file
-o <term_id> <path_to_output_file>
-
(required) Specifies an output file for a particular root id (the
save is done as if "export path to root" has been enabled)-cr <term_id> <term_name>
- Creates a dummy root with the given name. All
roots in the original OBO file will become children of the dummy root. If a
term with this id exists in the ontology, it will be destroyed and recreated.
-co <term_id_of_parent> <term_id_of_new_node>
<term_name_of_new_node>
- Creates a holder node for obsolete
terms under a given parent. This switch only creates the node; use -mapobs and
-defaultobs to move children under an obsolete holder node.If a term with this
id exists in the ontology, it will be destroyed and recreated.
-adddef <term_id> <definition>
- Adds a definition to a term created by -co or
-cr. All definitions created by -adddef must also have at least one dbxref
created by -addref.
-addref <term_id> <dbxref>
- Adds a definition dbxref to a term created by -co or
-cr. All dbxrefs created by -addref must also have a definition provided by
-adddef.
-mapobs <namespace> <term_id>
- Makes obsolete nodes with the
given namespace into children of the given term. Any term_id may be used, but
usually the term_id will be one specified by a -co switch.
-defaultobs <term_id>
- Specifies the default
location for obsolete nodes. Any term that is not assigned to an obsolete node
by a -mapobs switch will be assigned to the given node.-rootreltype <term_id> <type_id>
- Specifies the relationship to
be used when copying a root from the original .obo file to a dummy root
created with the -co switch.
-symbol <type_id> <symbol>
- Specifies a symbol to use in the output file for a
given relationship type. The symbol must obey the usual rules for GO flat file
relationship type symbols. Types that do not have symbols specified by this
tag will be written out using the @REL_TYPE@ encoding.
-reducefilesize
- Uses the reduced file size output format.
-dangling
- Allows dangling parents in the input
file.--gopresets <biological_process_file>
<cellular_component_file> <molecular_function_file>
<definitions_file>
- Sets all options (except for file paths)
to suit the Gene Ontology flat files. Equivalent to running obo2flat with the
following options:obo2flat -cr GO:0003673 Gene_Ontology \
-co GO:0003674 GO:0008369
'obsolete molecular function' \
-co GO:0005575 GO:0008370 'obsolete cellular
component' \
-co GO:0008150 GO:0008371 'obsolete biological process'
\
-mapobs GO:0003674 function \
-mapobs GO:0005575 component \
-mapobs
GO:0008150 process \
-defaultobs GO:0003674 \
-rootreltype GO:0003674
part_of \
-rootreltype GO:0005575 part_of \
-rootreltype GO:0008150
part_of \
-symbol part_of '>' \
-symbol is_a '%' \
-o GO:0003674
biological_process_output_file \
-o GO:0005575 cellular_component_output_file
\
-o GO:0008150 molecular_function_output_file \
-def
definitions_output_file
-v, -verbose
- Shows status messages as obo2flat
runsAlso see Java Options on the Command-line
To convert an OBO file at ~/cvs/go/ontology/gene_ontology.obo into GO compatible flat files:
obo2flat --gopresets ~/cvs/go/ontology/process.ontology
~/cvs/go/ontology/component.ontology ~/cvs/go/ontology/function.ontology
~/cvs/go/docs/GO.defs.current ~/cvs/go/ontology/input.obo