#!/bin/bash

# get the genome reference
curl -o Danio_rerio_genes_Zv9.fasta https://data-access.cesgo.org/index.php/s/yG9WD56AofdJOJ0/download --insecure

# get the sequence to blast
curl -o sequences_COI.fasta https://data-access.cesgo.org/index.php/s/V502iUr5hofhJ4L/download --insecure

# create blastdb
mkdir blastdb
makeblastdb -in Danio_rerio_genes_Zv9.fasta -parse_seqids -dbtype nucl -out blastdb/zv9 -title "Zv9"

#run blast
blastn -query sequences_COI.fasta -task megablast -db blastdb/zv9 -outfmt 7 -out megablast.out
