SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blastn to return only top hit nr23 Bioinformatics 17 12-10-2016 01:18 AM
blastn a list of sequences against themselves AVesterbacka Bioinformatics 2 12-20-2012 09:49 AM
Blastn cannot open .nin files PlutonicFriend Bioinformatics 1 07-24-2012 01:37 PM
Blastn or Blastx? kalu Bioinformatics 11 09-23-2011 04:18 PM
Using blastn to look for intron/exons boundries alexa039 General 2 01-14-2011 12:45 PM

Reply
 
Thread Tools
Old 04-04-2013, 09:22 AM   #1
SDPA_Pet
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 222
Default How create a db for NCBI BLASTN

Hello, I have some metagenomic contigs and I want to use blastn against Silva SSU and LSU database to get taxa information.

I download the Silva RDP database from here in fasta format

http://www.arb-silva.de/documentation/release-111/

I try to use blastn to blast it directly. However, it doesn't work. Someone told me I have to convert it to NCBI format, but I don't know how to do it.

Also, the Silva database sequences are RNA seqs. I think I need to convert it to DNA first. I don't know how to do it.

I know after I convert it to DNA seqs, I can use "makeblastdb" to convert make the database. However, I don't know how to set "makeblastdb" parameters.

Can anyone help me. Post the scripts I should use.

Thanks,
Ben
SDPA_Pet is offline   Reply With Quote
Old 04-04-2013, 09:44 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,080
Default

See this page for the BLAST help: http://www.ncbi.nlm.nih.gov/books/NBK1763/. If you search for "makeblastdb" (you will need to find the 3rd or 4th occurrence) then you will see this command line example:

Code:
$ makeblastdb -in hs_chr –input_type blastdb -dbtype nucl -parse_seqids \
 -mask_data hs_chr_mask.asnb -out hs_chr -title \
 "Human Chromosome, Ref B37.1"
If you type
Code:
makeblastdb -help
in your terminal window you will be able to get detailed program options.

What OS are you using?
GenoMax is offline   Reply With Quote
Old 04-04-2013, 09:47 AM   #3
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 667
Default How create a db for NCBI BLASTN

Here is an example of the makeblastdb command,

$ makeblastdb -in hs_chr.fa -dbtype nucl -parse_seqids \
-out hs_chr -title "Human chromosomes, Ref B37.1"

taken from the 'Cookbook' section of the BLAST Command Line Applications User Manual

http://www.ncbi.nlm.nih.gov/books/NBK1763/

You may also want to look at some of the previous threads here on SEQanswers, for example,

http://seqanswers.com/forums/showthread.php?t=6498



Best wishes,
Maria
mastal is offline   Reply With Quote
Old 04-04-2013, 12:09 PM   #4
SDPA_Pet
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 222
Default

I use windows7 blastn.

I try "$ makeblastdb -in hs_chr –input_type blastdb -dbtype nucl -parse_seqids
-mask_data hs_chr_mask.asnb -out hs_chr -title \
"Human Chromosome, Ref B37.1"

It didn't work. I need to convert Silva RDP fasta database to NCBI database.

I don't think I need a title. what is mask_data for.

I run this


D:\ME>makeblastdb -in LSURef_111_tax_silva.fasta -dbtype nucl -parse_seqids -out LSURef_111_tax_silva.ncbi.db


Building a new DB, current time: 04/04/2013 10:41:10
New DB name: LSURef_111_tax_silva.ncbi.db
New DB title: LSURef_111_tax_silva.fasta
Sequence type: Nucleotide
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1000000000B
Adding sequences from FASTA; added 29306 sequences in 3.68226 seconds.

It looks successful, but I can't use the output file for blastn.

If anyone can leave your dropbox account for me, I can share my file to you.

So you can try it, you will know it won't work.

Here is the link that I download the fasta format database from Silva RDP

http://www.arb-silva.de/no_cache/dow...e_111/Exports/

LSURef_111_tax_silva.fasta.tgz is the file that I want to convert to NCBI format

Ben

Last edited by SDPA_Pet; 04-04-2013 at 12:17 PM.
SDPA_Pet is offline   Reply With Quote
Old 04-04-2013, 12:21 PM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,080
Default

Quote:
Originally Posted by SDPA_Pet View Post

It looks successful, but I can't use the output file for blastn.


Ben
What exactly is happening? Are you getting no results/error messages?
GenoMax is offline   Reply With Quote
Old 04-04-2013, 01:06 PM   #6
SDPA_Pet
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 222
Default

Quote:
Originally Posted by GenoMax View Post
What exactly is happening? Are you getting no results/error messages?
I run "makeblastdb -in LSURef_111_tax_silva.fasta -dbtype nucl -out LSURef_111_tax_silva.ncbi.db"

I have got three output files:

LSURef_111_tax_silva.ncbi.db.nhr
LSURef_111_tax_silva.ncbi.db.nin
LSURef_111_tax_silva.ncbi.db.nsq

I try all of them for blastn

Run:
blastn -query test.fna -db LSURef_111_tax_silva.ncbi.db.nhr -out out_test -evalue 1e-6

I got this

BLAST Database error: No alias or index file found for nucleotide database [LSURef_111_tax_silva.ncbi.db.nhr] in search path [D:\ME;;]

I don't know what happened.

Ben
SDPA_Pet is offline   Reply With Quote
Old 04-04-2013, 01:12 PM   #7
yzzhang
Member
 
Location: florida

Join Date: Jan 2013
Posts: 67
Default

you should run command
blastn -query test.fna -db LSURef_111_tax_silva.ncbi.db -out out_test -evalue 1e-6
try it to see if it works
Regards
yzzhang is offline   Reply With Quote
Old 04-04-2013, 01:13 PM   #8
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,178
Default

Quote:
Originally Posted by SDPA_Pet View Post
Run:
blastn -query test.fna -db LSURef_111_tax_silva.ncbi.db.nhr -out out_test -evalue 1e-6

I got this

BLAST Database error: No alias or index file found for nucleotide database [LSURef_111_tax_silva.ncbi.db.nhr] in search path [D:\ME;;]

I don't know what happened.

Ben
Don't add ".nhr" to the name of your blastdb in the command, just use the base blastdb name, which in this case would be LSURef_111_tax_silva.ncbi.db

BLASTN will find the specific files it needs from the basename.

Last edited by kmcarr; 04-04-2013 at 01:13 PM. Reason: Crossed replies with yzzhang
kmcarr is offline   Reply With Quote
Old 04-04-2013, 01:14 PM   #9
SDPA_Pet
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 222
Default

Quote:
Originally Posted by yzzhang View Post
you should run command
blastn -query test.fna -db LSURef_111_tax_silva.ncbi.db -out out_test -evalue 1e-6
try it to see if it works
Regards
The point is that I don't have this output "LSURef_111_tax_silva.ncbi.db"

I only got three output files:
LSURef_111_tax_silva.ncbi.db.nhr
LSURef_111_tax_silva.ncbi.db.nin
LSURef_111_tax_silva.ncbi.db.nsq

It looks I didn't convert my db correctly at the first step.
SDPA_Pet is offline   Reply With Quote
Old 04-04-2013, 01:17 PM   #10
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,178
Default

Quote:
Originally Posted by SDPA_Pet View Post
The point is that I don't have this output "LSURef_111_tax_silva.ncbi.db"

I only got three output files:
LSURef_111_tax_silva.ncbi.db.nhr
LSURef_111_tax_silva.ncbi.db.nin
LSURef_111_tax_silva.ncbi.db.nsq

It looks I didn't convert my db correctly at the first step.
The point is you aren't supposed to provide a full filename as the blastdb, only its base file name which in your case is "LSURef_111_tax_silva.ncbi.db". BLAST figures out the rest.

Trust us, we know what we're talking about.
kmcarr is offline   Reply With Quote
Old 04-04-2013, 01:25 PM   #11
SDPA_Pet
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 222
Default

Quote:
Originally Posted by kmcarr View Post
The point is you aren't supposed to provide a full filename as the blastdb, only its base file name which in your case is "LSURef_111_tax_silva.ncbi.db". BLAST figures out the rest.

Trust us, we know what we're talking about.
Thank you. You are right.

BTW, the parameters that I used are enough to create a good database file?

makeblastdb -in LSURef_111_tax_silva.fasta -dbtype nucl -out LSURef_111_tax_silva.ncbi.db

I just use "-dbtype nucl ". Anything else I should include?

Ben
SDPA_Pet is offline   Reply With Quote
Old 04-05-2013, 04:07 AM   #12
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,080
Default

Quote:
Originally Posted by SDPA_Pet View Post

BTW, the parameters that I used are enough to create a good database file?

Ben
If you did get output that makes sense then those parameters were adequate.

Did you manage to get the search to work?
GenoMax is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:24 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO