mlin / GenomicSQLite-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GenomicSQLite-examples

This repo exhibits a simple example program using Genomics Extension for SQLite, implemented in several supported programming languages. It's a minimal starting point to fork into your own program. See the Programming Guide for full documentation.

Each implementation provides two subcommands:

  1. gsqlex load exons.gff exons.db imports a small GFF file into a new database, indexed by genomic range
  2. gsqlex query exons.db chr17:43,104,800-43,105,000 prints the records overlapping the given genomic range

General requirements: x86-64, Linux or macOS, installed development package for SQLite 3.31.0+.

Python (3.6+)

pip3 install genomicsqlite

git clone https://github.com/mlin/GenomicSQLite-examples.git
cd GenomicSQLite-examples/python

python3 gsqlex.py load ../exons.gff exons.db
python3 gsqlex.py query exons.db chr17:43,104,800-43,105,000

C

git clone https://github.com/mlin/GenomicSQLite-examples.git
cd GenomicSQLite-examples/c

wget https://github.com/mlin/GenomicSQLite/releases/download/v0.8.0/GenomicSQLite-v0.8.0.zip
unzip GenomicSQLite-v0.8.0.zip

cc -o gsqlex -L$(pwd) gsqlex.c -lsqlite3 -lgenomicsqlite -Wl,-rpath,\$ORIGIN

./gsqlex load ../exons.gff exons.db
./gsqlex query exons.db chr17:43,104,800-43,105,000

About

License:MIT License


Languages

Language:C 78.3%Language:Python 21.7%