Skip to content

Shugyousha/obo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to the obo package

This is a WIP for a go library for parsing .obo files. 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

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:

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

About

A simple .obo format parsing library in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages