This is a test version of Biostars. For the public version, visit https://www.biostars.org.
makeblastdb check for correct formatting

hello, I made a blast database with

makeblastdb -in GRCh38.fa -dbtype nucl -out GRCh38.fa

the execution is fine but is there a way to check if the formatting is correct? Thank you

software error blastdb sanity check

out of curiosity : why do you want to check that? do you suspect something not being OK?

Yes, I am using a program that calls blast internally and I am getting errors such as [main_samview] random alignment retrieval only works for indexed BAM or CRAM files. and FileNotFoundError: [Errno 2] No such file or directory: '/home/gigiux/Documents/Transposons/Results/A0N-vs-Human endogenous retrovirus.bam.9'. I would like to exclude basic mistakes before debugging further...

the samview error/warning on the retrieval you can resolve by indexing your bam files (this has nothing to do with blast itself though)

1 answer

From blast+ package:

   $  blastdbcheck -h
    USAGE
      blastdbcheck [-h] [-help] [-db DbName] [-dbtype molecule_type]
        [-dir DirName] [-recursive] [-verbosity DefaultKey] [-full]
        [-stride StrideLength] [-random NumSequences] [-ends NumSequences]
        [-no_isam] [-legacy] [-must_have_taxids] [-cdd_delta] [-version]

    DESCRIPTION
       BLAST database integrity and validity checking application

I got this:

$ blastdbcheck -db ~/Documents/Transposons/GRCh38.fa -dbtype nucl -full
Writing messages to <stdout> at verbosity (Summary)
ISAM testing is ENABLED.
Legacy testing is DISABLED.
TaxID testing is DISABLED.
Using `full' mode: every OID will be tested.

Testing 1 volume(s).
  /home/gigiux/Documents/Transposons/GRCh38.fa / MetaData:   [ERROR] caught exception.
 Result=FAILURE. 1 errors reported in 1 volume(s).
Testing 0 alias(es).
 Result=SUCCESS. No errors reported for 0 alias(es).

Total errors: 1

what is the exact error you're getting from running this?

side note: it's not because this check fails there is for sure something wrong with your blast DBs. (it could for instance complain on missing some of the taxid files, which is not a vital thing for running blasts)

Log in to answer this question.