Question: BLAST multiple sequences against each other from one FASTA file
0
gravatar for Keely
4.5 years ago by
Keely0
Australia
Keely0 wrote:

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

blast protein fasta • 3.6k views
ADD COMMENTlink modified 4.5 years ago by kozhaki.seq50 • written 4.5 years ago by Keely0
0
gravatar for Pierre Lindenbaum
4.5 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

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 COMMENTlink modified 4.5 years ago • written 4.5 years ago by Pierre Lindenbaum127k

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by Keely0

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by kozhaki.seq50

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by Keely0

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by vladimir.khramkov10

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by Keely0

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 REPLYlink modified 4 months ago by RamRS26k • written 4.5 years ago by vladimir.khramkov10

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

ADD REPLYlink written 4.5 years ago by Keely0
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: 1813 users visited in the last hour