A thin rest service on top af blast.
- Node version v8.9.4 installed.
- blast installed, and a blast database created for querying
Download a reference dataset: https://unite.ut.ee/repository.php - choose the "General FASTA release"
Make a blast database:
makeblastdb -in sh_general_release_dynamic_01.12.2017.fasta -title unite -parse_seqids -dbtype nucl
Clone this repository:
git clone https://github.com/thomasstjerne/blast-ws.git
cd in to the directory:
cd blast-ws
install dependencies:
npm install
node app.js
POST http://localhost:9000/blast
The body of your request should be a JSON object:
{
"marker": "ITS",
"sequence": "TTAGAGGAAGTAAAAGTCGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTATTGAAATAAACCT......."
}
curl --header "Content-Type: application/json" \
--request POST \
--data '{"sequence" : "TTAGAGGAAGTAAAAGTCGTAACAAGGTTTCCGTAGGTGAACCTGCGGAAGGATCATTATTGAAATAAACCTGATGAGTTGTTGCTGGCTCTCTAGGGAGCATGTGCACACTTGTCATCTTTGTATCTTCACCTGTGCACCTTTTGTAGACCTTGGGTATCTATCTGATTGCTTTAGCACTCAGGATTGAGGATTGACTTCTTGTCTCTTCTTACATTTCCAGGTCTATGTTTCTTAATATACCCTAATGTATGTTTATAGAATGTAATTAATGGGCCTTTGTGCCTATAAATCTATACAACTTTCAGCAACGGATCTCTTGGCTCTCGCATCGATGAAGAACGCAGCGAAATGCGATAAGTAATGTGAATTGCAGAATTCAGTGAATCATCGAATCTTTGAACGCACCTTGCGCTCCTTGGTATTCCGAGGAGCATGCCTGTTTGAGTGTCATTAATATATCAACCTCTTTGGTTGGATGTGGGGGTTTGCTGGCCACTTGAGGTCAGCTCCTCTTAAATGCATTAGCGGACAACATTTTGCTAAACGTTCATTGGTGTGATAATTATCTACGCTCTTGACGTGAAGCAGGTTCAGCTTCTAACAGTCCATTGACTTGGATAAATTTTTTTCTATCAATGTGACCTCAAATCAGGTAGGACTACCCGCTGAACTTAAGCATATCAATAAGCGGAGGAAAAGAAACTAACAAGGATTCCCCTAGTAACTGCGAGTGAAGCGGGAAAAGCTCAAATTTAAAATCTGGCAGTCTTTGGCTGTCCGAGTTGTAATCTAGAGAAGCATTATCCGCGCTG",
"marker": "ITS"
}' \
http://localhost:9000/blast | node <<< "var o = $(cat); console.log(JSON.stringify(o, null, 4));"
create 'blast_cache', {NAME=>'ref', VERSIONS => 1, COMPRESSION => 'SNAPPY', DATA_BLOCK_ENCODING => 'FAST_DIFF', BLOOMFILTER => 'NONE'}
hosts: c4master1-vh.gbif.org, c4master2-vh.gbif.org, c4master2-vh.gbif.org
port: 9090
ssh [email protected]
> hbase shell
hbase> count 'blast_cache'
hbase> scan 'blast_cache'