Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brentp/bcf
bcf parsing in golang
https://github.com/brentp/bcf
Last synced: 3 months ago
JSON representation
bcf parsing in golang
- Host: GitHub
- URL: https://github.com/brentp/bcf
- Owner: brentp
- License: mit
- Created: 2016-12-08T22:52:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-09T03:53:36.000Z (about 8 years ago)
- Last Synced: 2024-09-20T00:04:14.020Z (4 months ago)
- Language: Go
- Size: 30.3 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-bio-go - bcf
README
bcf
===[![Build Status](https://travis-ci.org/brentp/bcf.svg?branch=master)](https://travis-ci.org/brentp/bcf)
[![GoDoc] (https://godoc.org/github.com/brentp/bcf?status.png)](https://godoc.org/github.com/brentp/bcf)`bcf` is a [bcf](https://samtools.github.io/hts-specs/BCFv2_qref.pdf) parser for the go programming language.
```Go
import "github.com/brentp/bcf"func main() {
rdr, _ := os.Open("some.bcf")
brdr, _ := bcf.NewReader(rdr, 2)
for {
variant, err := brdr.Read()
if err == io.EOF {
break
}
fmt.Println(variant.Chrom, variant.Id, variant.Pos)
}
}
```TODO
====
The library is currently working, but some things remain to be done:+ parse header into proper structure
+ fix parsing of FILTER
+ finalize parsing of FORMAT fields. This is done, but we don't currently replace the missing tokens with NaN or whatever is appropriate.
+ benchmark the current INFO and FORMAT parsing (which is lazy) that saves a slice (3 uint32's) to the underlying data to compare to just saving the offsets and having each entry in the INFO pull from
the same underlying slice.
+ docs