Docker group

Docker : a blast example

image_print

Get a blast image

docker pull simonalpha/ncbi-blast-docker

Create a working dir

mkdir blast_test && cd blast_test/

Get data

curl -o sequences_COI.fasta https://data-access.cesgo.org/index.php/s/KdY6BCuC1KtvfBX/download
curl -o Danio_rerio_genes_Zv9.fasta https://data-access.cesgo.org/index.php/s/1PRhWEtSK9v9wHD/download

First test with makeblastdb

docker run simonalpha/ncbi-blast-docker makeblastdb -in Danio_rerio_genes_Zv9.fasta -parse_seqids -dbtype nucl -out blastdb/zv9 -title "Zv9"

Failed because data are not in container, need to mount volume

Mount volume (working dir -> /data in container)

Use the option -v : -v $(pwd):/data/

Run makeblastdb

docker run -v $(pwd):/data/ simonalpha/ncbi-blast-docker makeblastdb -in /data/Danio_rerio_genes_Zv9.fasta -parse_seqids -dbtype nucl -out /data/blastdb/zv9 -title "Zv9"

A blastdb directory with results is created in your working dir

Run blastn

docker run -v $(pwd):/data simonalpha/ncbi-blast-docker blastn -query /data/sequences_COI.fasta -task megablast -db /data/blastdb/zv9 -outfmt 7 -out /data/megablast.out

The result is in your working dir