This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Creating DIAMOND database on HPC

Hello everyone,

I'm new to DIAMOND and would like to create its database on HPC. I'm wondering if anyone knows how to write the right script to submit a job on SLURM?

Thank you!

database diamond hpc

that I don't know, what i do know is that you will need to have access to considerable amount of storage to store this index/database. So perhaps double check if you have that before really doing it.

Thank you for the information!

1 answer

Creating DIAMOND database is not difficult. It is a straightforward command as noted on the wiki page.

# creating a diamond-formatted database file
./diamond makedb --in reference.fasta -d reference

You will need to wrap this into a SLURM submission script or a command line that will work on your HPC.

That said, if you are going to align against one of the standard NCBI databases then the good news is DIAMOND can now use NCBI blast formatted databases, so that can save you the trouble of creating an index. You will need to use latest DIAMOND version for this.

Hi GenoMax! Thank you for the information!

You've mentioned that DIAMOND can now use NCBI blast formatted databases without creating an index. May I know how can this be done? Basically, what I'm planning to do is that from NCBI nr database, I would like to create a database of bacteria and archaea. Then, from the bacteria and archaea database, a diamond database will be created, which will then be used for the alignment of the contigs of interest.

Thank you!

DIAMOND Wiki page describes the necessary commands. It is not a trivial task to create a db of just bacteria and archea from nr database. You may want to filter your results afterwards. Otherwise you will have to extract the bacterial/archaea sequences in fasta format from nr and then build a database. May as well build a direct DIAMOND db at that point.

To use nr db as is do:

update_blastdb.pl --decompress --blastdb_version 5 nr
./diamond prepdb -d nr
./diamond blastp -d nr -q queries.fasta -o matches.tsv

Hi GenoMax ! Thank you very much for the information!

Log in to answer this question.