OBO
The OBO flat file is described here -> http://www.geneontology.org/GO.format.obo-1_2.shtml
Comments start with an exclamation mark
<tag>: <value> {<trailing modifiers>} ! <comment>
The tag name is always a string. The value is always a string, but the value string may require special parsing depending on the tag with which it is associated.
At present, every OBO stanza always begins with an id tag.
is_a: This tag describes a subclassing relationship between one term and another. The value is the id of the term of which this term is a subclass. A term may have any number of is_a relationships.
intersection_of: This tag indicates that this term is equivalent to the intersection of several other terms. The value is either a term id, or a relationship type id, a space, and a term id.
relationship: This tag describes a typed relationship between this term and another term. The value of this tag should be the relationship type id, and then the id of the target term. The relationship type name must be a relationship type name as defined in a typedef tag stanza. The [Typedef] must either occur in a document in the current parse batch, or in a file imported via an import header tag. If the relationship type name is undefined, a parse error will be generated. If the id of the target term cannot be resolved by the end of parsing the current batch of files, this tag describes a "dangling reference"; see the parser requirements section for information about how a parser may handle dangling references. If a relationship is specified for a term with an is_obsolete value of true, a parse error will be generated.
OBO-Edit
Download here -> http://oboedit.org/
Once installed there are examples inside the folder test_resources. Let's take a look at one of the example files called car.obo:
[Term] id: TEST:0000001 name: automobile synonym: "car" EXACT [] [Term] id: TEST:0000002 name: blue [Term] id: TEST:0000003 name: blue car [Term] id: TEST:0000004 name: blue VW [Term] id: TEST:0000005 name: VW synonym: "Volkswagen" EXACT [] [Term] id: TEST:0000006 name: automobile def: "This is the obsolete definition of automobile" [FBC:auto_generated_definition] is_obsolete: true consider: TEST:0000001 replaced_by: TEST:0000001 [Typedef] id: has_color name: has_color [Typedef] id: has_make name: has_make