makeblastdb -dbtype prot -in sequence_name.fasta
This script will return three files:
You can then blastx your raw DNA reads against this database to pull out matches (with a custom script):
/project/directory/blast/launch_blast.py -1 RawReads_R1.fq -2 RawReads_R2.fq -b blastx -d /project/directory/blast/sequence_name.fasta
– before extracting matches based on significance (e-value, length, score). The extracted reads are then used to assemble the gene of interest ‘de novo’.
However, I recently tried running a script for blastx against newly made db files and kept returning the error:
BLAST Database error: No alias or index file found for protein database [/project/directory/sequence.fasta] in search path [/project/directory/::]
I was confused as this has been working up previously. After much wasted time I realised that I had changed my script to include the database name to:
makeblastdb -dbtype prot -in sequence_name.fasta -out sequence_name
This output db files named
NB: The name of the database files did not include the .fasta
Hence blastx could not find my files.