diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2013-10-17 20:36:39 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2013-11-09 14:42:49 +0100 |
commit | 389e98a4fa0b9d1fde5343a62b64df3ca5ccbda9 (patch) | |
tree | 1adf91559d5ad0f879b923dc0e717a7ed7671b92 /README.md |
Initial commit
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee8a2e9 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Introduction to the obo package + +This is a WIP for a go library for parsing [.obo files](http://www.geneontology.org/GO.format.obo-1_2.shtml). The library currently parses .obo files and returns either a channel to, or a slice of the [Term] stanzas contained in the files. + +The parsing of other stanza types is still under construction as are several of the key: value-pairs associated with the [Term] stanza. Please see the TODO section further below. + + + +# Examples + +Reading a .obo file into a slice of OboTermEntries + + +```Go +var obolist []*OboTermEntry +var parentchildren map[string][]*OboTermEntry + +reader := bufio.NewReader(os.File("/path/to/file/file.obo")) +obolist, parentchildren = ParseToSlice(*reader, parentchildren, obolist) + +``` + +To parse the OboTermEntries and having them fed to a channel: + +```Go +obochan := make(chan *OboTermEntry) +var obolist []*OboTermEntry + +reader := bufio.NewReader(os.File("/path/to/file/file.obo")) +obochan = ParseToChannel(*reader, obochan) + +for ent := range obochan { + obolist = append(obolist, ent) +} + +``` + + +# TODO + +* Parsing of header data +* Writing of .obo files +* Parsing of [Typedef] stanzas +* Parsing of [Instance] stanzas +* Handling of several tags is still missing + |