blastformat function

2 Ansichten (letzte 30 Tage)
Peter Clark
Peter Clark am 8 Nov. 2011
Kommentiert: Shlomo Geva am 14 Feb. 2017
I get the following error when trying to run blastformat:
Error using blastformat (line 154) FORMATDB produced the following error(s): /bin/bash: formatdb: command not found
I am running ncbi-blast-2.2.25+, and there is no command in the directory titled blastdb. I believe older versions used this command. Is there a workaround or should I just revert to an older, preferred version of ncbi-blast.
Thanks

Antworten (2)

Didier
Didier am 18 Apr. 2012
I got the same problem just recently. In fact you have to tell Matlab where to find the executable formatdb using the setenv command.
In my case I just typed at the prompt in the command window: setenv('PATH', [getenv('PATH') ':/Users/DC/Documents/MATLAB/blast-2.2.26/bin']); This the Mac type of command. For Windows you have to change : to ;
And then you have to put the entire path to the .fna file you are using: blastformat('Inputdb','/Users/DC/Documents/MATLAB/Data/Bacteria/Ecoli_data/NC_004431.fna')
  1 Kommentar
Raffael
Raffael am 2 Mai 2016
I have the same problem but i don’t know which type of blast I use. What would the code look like then?
I’m using Matlab 2014b
%%BLAST Script für die Erstellung eines Core genomes
clc
clear
% cd ('/Users/ringlin/polybox/Fasta import Matlab/NT-Fasta');
%%Erstellen einer BLAST Datenbank
blastformat('Inputdb','/Users/ringlin/polybox/Fasta import Matlab/NT-Fasta/RI_009_gene.fa')
My Error looks like this:
Error using blastformat (line 154)
FORMATDB produced the following error(s): /bin/bash: formatdb: command not found
Error in Core_Genome_BLAST (line 10)
blastformat('Inputdb','/Users/ringlin/polybox/Fasta import Matlab/NT-Fasta/RI_009_gene.fa')

Melden Sie sich an, um zu kommentieren.


Shlomo Geva
Shlomo Geva am 14 Feb. 2017
I had the same problem, using Windows. I installed the NCBI blast suite. In the \bin file where it is installed there is a command called blast_formatter.exe You can specify this in matlab when you call formatdb, by adding the arguments pair identifying the program to invoke. In my case the additional call arguments look like this:
blastformat('Inputdb', 'foo.fasta','Protein',false,... 'FORMATPATH', 'C:\Program Files\NCBI\blast-2.6.0+\bin\blast_formatter.exe');
  1 Kommentar
Shlomo Geva
Shlomo Geva am 14 Feb. 2017
You may actually mean to run the NCBI function makeblastdb.exe (NCBI formatdb was deprecated and this is the replacement, I think). It appears that the bioinformatics toolbox needs updating. The arguments naming had changed in the NCBI commnad (e.g. -i should be -in, -p should be -dbtype. It is wrong in MATLAB's implementation of blastformat.m

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by