Answers.Body: <p>first I recommend you to check your downloaded data with md5 to be sure there was no problem with that step. How many files did you download?</p>
  <p>Also I was curious if you had another BLAST+ version installed on your computer. Be sure that blastn is called is a version corresponding to the database you are using.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-13T09:20:41.343Z
Answers.Text: Thank you for your reply. I downloaded 24 files in total, from ```nt.00``` till ```nt.23```. For every nt file there are following extensions available: ```.nhd``` ```.nhi``` ```.nhr``` ```.nin``` ```.nnd``` ```.nni``` ```.nog``` ```.nsq```. For every nt file there is a ```nt.xx.tar.gz.md5``` file available. Does that make sense?
Answers.UserDisplayName: RobH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-13T09:50:48.990Z
Answers.Text: Try to run `md5sum nt.xx.tar.gz.md5` for each xx in 00 to 23. Also I was curious if you had another BLAST+ version installed on your computer. Be sure that blastn is called from your latest version folder.
Answers.UserDisplayName: thomas duge de bernonville
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-13T10:09:58.213Z
Answers.Text: I think this last issue you adres could be the problem. When I run ```blastn -version``` it returns ```Package: blast 2.6.0, build Jan 15 2017 17:12:27``` so not ```2.10``` which I downloaded. Once I also downloaded ```blast``` with ```conda``` so perhaps that is the problem.
Answers.UserDisplayName: RobH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-13T11:03:26.977Z
Answers.Text: Thomas, indeed this was the problem, very good suggestion. I removed my BLAST through ```conda remove blast``` to remove the old version. I followed the exact steps of https://www.ncbi.nlm.nih.gov/books/NBK52640/ but this did not lead to a correct installation. The command ```blastn``` was not found even after right configuration (check by echo $PATH). Now I recall that I install ```blast``` also through ```conda``` because the description of NCBI did not work. I now managed to install ```blast 2.10``` by following these steps: https://ngsprimer.wordpress.com/. I receive no error now. Thanks!
Answers.UserDisplayName: RobH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-13T11:23:02.317Z
Answers.Text: Happy to hear it solved the problem! good luck!
Answers.UserDisplayName: thomas duge de bernonville
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-25T11:09:36.567Z
Answers.Text: I run into this problem and indeed it was mismatch of database and blast versions. So other don't have to fish it out of the comment section to, I added it to the answer (you as much your words as possible). Feel free to adjust it, but that's the solution that should be accepted I think.
Answers.UserDisplayName: Kamil S Jaron
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-12T07:14:23.423Z
Answers.LastActivityDate: 2021-03-25T11:08:35.863Z
Answers.LastEditDate: 2021-03-25T11:08:35.863Z
Answers.UserDisplayName: thomas duge de bernonville
Body: <p>I want to use a local <code>blastn</code> command to BLAST a multifasta file ~700 sequences using following command: <code>blastn -db nt -query fasta_all.fasta -num_alignments 2 -out fasta_blasted.txt</code> but I receive error :<code>BLAST Database error: Error: Not a valid version 4 database.</code></p>
  
  <p>I use a local <code>nt</code> database which I downloaded today (11th of May 2020) by running <code>update_blastdb.pl --decompress nt [*]</code>. I downloaded this but I did not do any post-processing and just the "raw" download files are in the folder (see image below which shows only a part of the files)</p>
  
  <p><a href="https://i.sstatic.net/uGn4U.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uGn4U.png" alt="enter image description here"></a></p>
  
  <p>The <code>blast+</code> I downloaded and installed is <code>ncbi-blast-2.10.0+-x64-linux.tar.gz</code> from <a href="https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/" rel="nofollow noreferrer">https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/</a></p>
  
  <p>So, both database and <code>blastn</code> version should be the latest. It probably has something to do with either the version of the database or the software, but as it both are the latest version, I find it strange that these would not be compatible. Any ideas what causes this error?</p>
  
Tags: <database><public-databases><blastn>
Title: local BLAST error: BLAST Database error: Error: Not a valid version 4 database
ThreadText: # local BLAST error: BLAST Database error: Error: Not a valid version 4 database
  
  (Asked by: username_0 on 2020-05-11)
  
  I want to use a local `blastn` command to BLAST a multifasta file ~700 sequences using following command: `blastn -db nt -query fasta_all.fasta -num_alignments 2 -out fasta_blasted.txt` but I receive error :`BLAST Database error: Error: Not a valid version 4 database.`
  
  I use a local `nt` database which I downloaded today (11th of May 2020) by running `update_blastdb.pl --decompress nt [*]`. I downloaded this but I did not do any post-processing and just the "raw" download files are in the folder (see image below which shows only a part of the files)
  
  [![enter image description here](https://i.sstatic.net/uGn4U.png)](https://i.sstatic.net/uGn4U.png)
  
  The `blast+` I downloaded and installed is `ncbi-blast-2.10.0+-x64-linux.tar.gz` from <https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/>
  
  So, both database and `blastn` version should be the latest. It probably has something to do with either the version of the database or the software, but as it both are the latest version, I find it strange that these would not be compatible. Any ideas what causes this error?
  
  **Tags:** database, public-databases, blastn
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-05-12. Score: 2 | Accepted answer
  
  first I recommend you to check your downloaded data with md5 to be sure there was no problem with that step. How many files did you download?
  
  Also I was curious if you had another BLAST+ version installed on your computer. Be sure that blastn is called is a version corresponding to the database you are using.
  
  > **Comments:**
  > **username_0**: Thank you for your reply. I downloaded 24 files in total, from ```nt.00``` till ```nt.23```. For every nt file there are following extensions available: ```.nhd``` ```.nhi``` ```.nhr``` ```.nin``` ```.nnd``` ```.nni``` ```.nog``` ```.nsq```. For every nt file there is a ```nt.xx.tar.gz.md5``` file available. Does that make sense?  
  > **username_1**: Try to run `md5sum nt.xx.tar.gz.md5` for each xx in 00 to 23. Also I was curious if you had another BLAST+ version installed on your computer. Be sure that blastn is called from your latest version folder.  
  > **username_0**: I think this last issue you adres could be the problem. When I run ```blastn -version``` it returns ```Package: blast 2.6.0, build Jan 15 2017 17:12:27``` so not ```2.10``` which I downloaded. Once I also downloaded ```blast``` with ```conda``` so perhaps that is the problem.  
  > **username_0**: username_1, indeed this was the problem, very good suggestion. I removed my BLAST through ```conda remove blast``` to remove the old version. I followed the exact steps of https://www.ncbi.nlm.nih.gov/books/NBK52640/ but this did not lead to a correct installation. The command ```blastn``` was not found even after right configuration (check by echo $PATH). Now I recall that I install ```blast``` also through ```conda``` because the description of NCBI did not work. I now managed to install ```blast 2.10``` by following these steps: https://ngsprimer.wordpress.com/. I receive no error now. Thanks!  
  > **username_1**: Happy to hear it solved the problem! good luck!  
  > **username_2**: I run into this problem and indeed it was mismatch of database and blast versions. So other don't have to fish it out of the comment section to, I added it to the answer (you as much your words as possible). Feel free to adjust it, but that's the solution that should be accepted I think.  
  
  ---
  
  