A simple example to link tabix C library into GO language. 1. download [tabix C source code](https://github.com/samtools/tabix) 2. make dynamic libtabix.so.1 [ or make to get libtabix.a] 3. cp libtabix.so.1 to your LD\_LIBRARY\_PATH [ or use the static version libtabix.a ] 4. mv query_tabix_example.go query_tabix.go query_tabix_example_static.go into tabix directory which contains example.gtf.gz and example.gtf.gz.tbi and libtabix.a 5. go run query_tabix_example.go [ or go run query_tabix_example_static.go ] 6. go run query_tabix.go [file.bed] [file.gz] 7. query_tabix_bed6.go are designed for query motifs and coordinates translate to query region. References - [tabix api](https://github.com/samtools/tabix/blob/master/tabix.h) - [how to use tabix api in C](https://github.com/samtools/tabix/blob/master/main.c) - [integrate C lib into GO](http://golang.org/cmd/cgo/) - [use dynamic C lib in GO](http://www.goinggo.net/2013/08/using-c-dynamic-libraries-in-go-programs.html) - [use C print in GO](http://narutoinfo.github.io/cgo.html)