/sembio-go

Archive of what was once sembio/go

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Bio -- Bioinformatics Module

Build Status codecov GoReport CodeFactor

GoDoc LICENSE

DOI status

Overview

bio is a semantic Bioinformatics module that emphasizes a definitive design structure.

Installation

go get github.com/sembio/go/...

Design Structure

This module is structured intentionally to form a fat tree where each step down the tree asks/answers a new question in the following order:

  1. Why are you looking into this module? (i.e., the kind of work you are doing)
  2. How are you hoping to get the job done? (i.e., do you need speed, immutability, simplicity, and so on)
  3. What are you going to use? (i.e., the what that allows the why for your work)

These questions are very general so a contrived example might be "I need to represent N sequences of DNA with IUPAC ambiguity":

  1. Why...? Ex: I need sequences (look in bio/sequence package)
  2. How...? Ex: I prefer immutable data structures (look in .../sequence/immutable package)
  3. What...? Ex: I need IUPAC DNA (look in .../immutable/*iupac* files)

Full path: bio/sequence/immutable/dna_iupac.go to use immutable.NewDnaIupac(...) N times.

This structure should promote quick searches for the why, how, and what that must be answered for every project many times over.

This design means that everything under a directory should implement the interfaces above and inline with it in the tree; for example: everything under bio/sequence implements sequence.Interface and everything under bio/alphabet implements alphabet.Interface and so on.

If more than three levels are deemed necessary the first level will represent some generic functionality, such as in the case of bio/io/fasta/base/fasta.go which is housed under the generic io then answers our three questions fasta (why), base (how), fasta.go (what).

Documentation

Documentation can be built through use of godoc -http=localhost:6060 which then generates documentation accessible through a web browser at localhost:6060. For access to prior to downloading sembio/go, visit: https://godoc.org/github.com/sembio/go/bio

Testing

Tests can be run through use of go test -v ./... at the root of this repository. Use of the verbose -v flag is recommended as sembio/go makes extensive use of property tests, which should provide insight into what can be expected of a given implementation.

All tests, benchmarks, and examples are run continuously and can be viewed on Travis CI.