Trouble installing and creating database for blast
1
0
Entering edit mode
6.1 years ago
asidhu ▴ 10

I'm using the ubuntu app to install and launch ncbi-blast-2.7.1+ on Windows 10 and I am struggling as I've been following instructions from the following tutorials: https://www.blaststation.com/intl/members/en/howtoblastwin.html https://github.com/enormandeau/ncbi_blast_tutorial/blob/master/README.md and none of them seem to be helping me work.

I'm new to BLAST but I'm working on an assignment for which I need a BLAST database. I've installed blast-2.7.1 and it is located in C:/Program Files/ NCBI/blast-2.7.1 and I ran the program as instructed. I then created a directory (mkdir c/blast/db) where I downloaded ncbi-blast-2.7.1+-x64-win64.tar.gz and extracted the file. The FASTA file I'm using is called reference.fasta and I tried the following command:

makeblastdb -in reference.fasta -title reference -out reference -dbtype nucl

I got the following error

Command 'makeblastdb' not found, but can be installed with:

sudo apt install ncbi-blast+

I tried to use sudo apt instal ncbi-blast+ but it didn't work

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ncbi-blast

I am not sure what I am doing wrong.

I am also not sure what the following means in the tutorial:

Add the bin folder from the extracted archive to your path. For example, add the following line to your ~/.bashrc file: export PATH="/PATH/TO/ncbi-blast-2.3.0+/bin":$PATH And change the /PATH/TO part to the path where you have put the extracted archive.

blast ubuntu fasta • 4.9k views
ADD COMMENT
1
Entering edit mode
6.1 years ago

It appears to me that you are recently been exposed to linux environment. So, let me first try to explain this:

Add the bin folder from the extracted archive to your path. For example, add the following line to your ~/.bashrc file: export PATH="/PATH/TO/ncbi-blast-2.3.0+/bin":$PATH And change the /PATH/TO part to the path where you have put the extracted archive.

When you run a Unix-based operating system, most likely you will have bash installed as your default terminal. Bash is one of the most common linux shell. So, what is bash and what does it do? Well, It is "bash" which interprets your typed input in the terminal executing the commands based on your input.

So, then what is bashrc? Bash allows for some degree of customization using scripting, which is where "bashrc" comes in. In order to load your preferences, bash runs the contents of the bashrc file at each launch. This shell script is found in each user’s home directory. It’s used to save and load your terminal preferences and environmental variables.

What is $PATH?

When you type a command into the shell, the shell needs to find that program. If you say "/bin/ls" then the shell goes to the /bin directory to find it. If you just say "ls" then it needs to look for it. There are too many places it could be, and possibly multiple things with that name, so you must give the shell a list of places to look. That list is the PATH variable. The syntax to add a new program to PATH is

export PATH=$PATH:/new/dir

this means add /new_dir to $PATH ; it will not clear the original $PATH.

So, how do I edit my bashrc file?

Simple, open the bashrc file using text editor, for e.g.

vi ~/.bashrc or gedit ~/.bashrc

export PATH=$PATH:/PATH/TO/ncbi-blast-2.3.0+/bin

Here PATH/TO/ is the path where you have put the extracted archive. Find out where is you extracted ncbi-blast-2.7.1+-x64-win64.tar.gz. for example, if you extracted that in /home/user/ncbi-blast-2.7.1+-x64-win64/ then you will add the below in bashrc

export PATH=$PATH:/home/user/ncbi-blast-2.7.1+-x64-win64/ncbi-blast-2.3.0+/bin

After adding that, quit and save the editor and then source the bashrc file

source ~/.bashrc

now your makeblastb should execute from anywhere.

NOTE: the dot symbol which is prefix to bashrc file means that it is a hidden file.

ADD COMMENT

Login before adding your answer.

Traffic: 2680 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6