blastformat function

2 次查看(过去 30 天)
Peter Clark
Peter Clark 2011-11-8
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

回答(2 个)

Didier
Didier 2012-4-18
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 个评论
Raffael
Raffael 2016-5-2
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')

请先登录,再进行评论。


Shlomo Geva
Shlomo Geva 2017-2-14
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 个评论
Shlomo Geva
Shlomo Geva 2017-2-14
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by