BLAST multiple sequences against each other from one FASTA file
1
0
Entering edit mode
8.6 years ago
Keely • 0

Hi,

I am a beginner to using BLAST locally on Mac OSX. I have downloaded ncbi-blast-2.2.31+.dmg and have installed it. I have a FASTA file with multiple protein sequences in it and am trying to BLAST each sequence against every other sequence within that FASTA file as I am looking for duplicates. I am also a beginner to programming and am struggling to get my head around using the Terminal. I'm not really sure where to start. I've tried making a BLAST db from my FASTA file using

makeblastdb -in sequence.fasta -dbtype prot -out sequence -title -sequence

and it seems to have worked but I can't find the results anywhere.

I'm not even sure this is the right path to take.

Can anyone please help set me on the right path?

Keely

FASTA blast protein • 7.4k views
ADD COMMENT
0
Entering edit mode

Hey

How did you make blast db

ADD REPLY
0
Entering edit mode
8.6 years ago

Once your blast database was created, you just have to run blastp the original fasta against the compiled database.

blastp -query sequence.fasta -db sequence -out result
ADD COMMENT
0
Entering edit mode

Thanks Pierre, but when I try to do the blastp this is what I get:

blastp -query sequence.fasta -db sequence
BLAST Database error: No alias or index file found for protein database [sequence] in search path [/usr/local/ncbi/blast/bin::]

When I do:

blastp -query sequence.fasta -db sequence -out result

I get:

Command line argument error: Argument "out". File is not accessible:  `result'
ADD REPLY
0
Entering edit mode

Here is how my note on BLAST run,

Make a directory, enter the directory. Keep database file and input file inside it.

  1. Make index files for the database : makeblastdb -in indica.fasta -dbtype prot -out indica
  2. Blast your sequence against the database: blastp -query japonia.txt -db indica -out alignment.txt -outfmt 7
ADD REPLY
0
Entering edit mode

I made the database as follows:

makeblastdb -in sequence.fasta -dbtype prot -out sequence

Building a new DB, current time: 10/04/2015 18:20:03
New DB name:   /usr/local/ncbi/blast/bin/sequence
New DB title:  sequence.fasta
Sequence type: Protein
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1000000000B

Adding sequences from FASTA; added 227 sequences in 0.0208449 seconds.

I then created a alignment.rtf file from textEdit and then tried to blast my sequence against the database and I get the same problem:

blastp -query sequence.fasta -db sequence -out alignment.rtf -outfmt 7
BLAST Database error: No alias or index file found for protein database [sequence] in search path [/usr/local/ncbi/blast/bin::]
ADD REPLY
0
Entering edit mode

specify full path to blast databse you just created

best practive is to put database files into ./db directory - in your case into /usr/local/ncbi/blast/db

  1. mkdir /usr/local/ncbi/blast/db
  2. makeblastdb -in sequence.fasta -dbtype prot -out /usr/local/ncbi/blast/db/sequence
  3. blastp -query sequence.fasta -db /usr/local/ncbi/blast/db/sequence
ADD REPLY
0
Entering edit mode

I tried making a directory called db to store the database, but it won't let me even though I have full administrator rights:

mkdir /usr/local/ncbi/blast/db
mkdir: /usr/local/ncbi/blast/db: Permission denied
ADD REPLY
0
Entering edit mode

Ok, then try to create directory in the home

mkdir -p ~/blast/db
makeblastdb -in sequence.fasta -dbtype prot -out ~/blast/db/sequence
blastp -query sequence.fasta -db ~/blast/db/sequence
ADD REPLY
0
Entering edit mode

Thank you! I think I've got it working now :)

ADD REPLY

Login before adding your answer.

Traffic: 1524 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