Question: BLAST Command Line - restarting
0
gravatar for t.kranenburg
2.3 years ago by
t.kranenburg40
t.kranenburg40 wrote:

Recently I installed BLAST for command line on Windows (see code below), and this works.

However, when I restart the command-line prompt, the command blastn does not work immediately, unless I go back to the actual folder and then issue the command. The same applies for setting up a local database; I have to re-run the code which sets up the database. Therefore I was wondering how load the BLAST functionalities and objects into the command line immediately instead of redoing the work.

#Command line BLAST
#Download BLAST: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/
#Install: ncbi-blast-2.7.1+-win64.exe
#Save test.fasta in  C:\Program Files\NCBI\blast-2.7.1+
cd C:\Program Files\NCBI\blast-2.7.1+
blastn -version
blastn -db nr -query test.fasta -remote -out test_query.txt
blast command line • 2.0k views
ADD COMMENTlink modified 24 months ago • written 2.3 years ago by t.kranenburg40
1
gravatar for ashish
2.3 years ago by
ashish320
ashish320 wrote:

You need to put the blast/bin folder location in your path variable. see this for instructions.

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by ashish320

Thank you for your answer. Is there a way to set the path variable through R, or do I really to go to system-settings (for windows)?

ADD REPLYlink written 2.3 years ago by t.kranenburg40

You need to go to the system settings, add the blast/bin folder to the path variable after which blast can be used from cmd without typing the full address. I don't know of any way to set path variable in R. However, this might be of some help to you.

ADD REPLYlink written 2.3 years ago by ashish320
0
gravatar for t.kranenburg
2.1 years ago by
t.kranenburg40
t.kranenburg40 wrote:

I have tried to set the system path by adding to system path to the NCBI-folder in which BLAST is located. However, it is still not recognized. I guess I'm doing something wrong, but I cannot figure out what yet. Do you have some advice?

Path settings

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by t.kranenburg40
1

You need to add to the PATH variable not in comSpec. You have blast folder mention in your PATH variable but its not complete. use C:\Program Files\NCBI\blast-2.7.1+\bin . In the second picture, PATH is there, edit it.

ADD REPLYlink written 2.1 years ago by ashish320

I assume that switching to a linux environment is not an option? :-)

(it would be my preferred option though)

ADD REPLYlink written 2.1 years ago by lieven.sterck7.2k
0
gravatar for t.kranenburg
24 months ago by
t.kranenburg40
t.kranenburg40 wrote:

Fixed it by:

set PATH=%PATH%;C:\Program Files\NCBI\blast-2.7.1+\bin
ADD COMMENTlink written 24 months ago by t.kranenburg40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1628 users visited in the last hour