SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
BLAST+ creating custom blast database and using blast+ filtering features deniz Bioinformatics 3 07-07-2019 08:04 AM
Creating a Command Line BLAST+ Database GSviral Bioinformatics 3 01-29-2015 05:22 AM
Creating local blast+ database for mouse build 37 npatel Bioinformatics 7 03-04-2013 08:02 AM
BLAST database error - when changing to new BLAST+ local program biobio Bioinformatics 4 06-15-2011 05:20 AM
Create local BLAST database SeqClark Bioinformatics 2 03-07-2011 01:17 AM

Reply
 
Thread Tools
Old 03-05-2015, 08:53 AM   #1
hyates
Member
 
Location: Kansas City

Join Date: Jan 2014
Posts: 18
Default How can I write a bash command to blast local nt database?

I have been reading this.

I was able to write a basic query using blast n as follows:
Code:
blastn -db ~/programming/blastexample/db/tdb -query ~/programming/blastexample/db/even_tribolium.fasta
It seems to me that I must replace tdb (I used makedb to create this) with the downloaded local nt database?

However, I now downloaded nt into local database and I have the following questions:
  • How can I blast my fasta file against local nt blast database?
  • Are there options only to output the species name, contig, and E-value?
  • Where did my nt local blast database go? ha ha ha.


Thanks for considering my question and your patience. I am very new to all of this.
hyates is offline   Reply With Quote
Old 03-05-2015, 09:06 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,978
Default

Quote:
Originally Posted by hyates View Post
I have been reading this.

I was able to write a basic query using blast n as follows:
Code:
blastn -db ~/programming/blastexample/db/tdb -query ~/programming/blastexample/db/even_tribolium.fasta
It seems to me that I must replace tdb (I used makedb to create this) with the downloaded local nt database?

However, I now downloaded nt into local database and I have the following questions:
  • How can I blast my fasta file against local nt blast database?
  • Are there options only to output the species name, contig, and E-value?
  • Where did my nt local blast database go? ha ha ha.


Thanks for considering my question and your patience. I am very new to all of this.
Some questions for you:

1. Did you download all pre-formatted nt.nn.tar.gz files from this link: ftp://ftp.ncbi.nlm.nih.gov/blast/db/ and unzip them in a single directory. Do not do anything else to the files. This database is pre-formatted.

When using the database provide -db /path_to/nt (do not worry about file numbers).

2. Output options for blast: http://www.ncbi.nlm.nih.gov/books/NB...BLAST_search_r
If you don't like what you see there are custom parsers available to get just what you need.
GenoMax is offline   Reply With Quote
Old 03-05-2015, 09:10 AM   #3
hyates
Member
 
Location: Kansas City

Join Date: Jan 2014
Posts: 18
Default

Quote:
Originally Posted by GenoMax View Post
Some questions for you:

1. Did you download all pre-formatted nt.nn.tar.gz files from this link: ftp://ftp.ncbi.nlm.nih.gov/blast/db/ and unzip them in a single directory. Do not do anything else to the files. This database is pre-formatted.

When using the database provide -db /path_to/nt (do not worry about file numbers).

2. Output options for blast: http://www.ncbi.nlm.nih.gov/books/NB...BLAST_search_r
If you don't like what you see there are custom parsers available to get just what you need.
  • I ran ./update_blastdb.pl nt but I don't think I specified a directory. Oh no...
  • Thanks for the link to options. I am hopeful it has what I need since I am asking for basic fields.
hyates is offline   Reply With Quote
Old 03-05-2015, 09:15 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,978
Default

Quote:
Originally Posted by hyates View Post
  • I ran ./update_blastdb.pl nt but I don't think I specified a directory. Oh no...
This would be a large download. So depending on bandwidth available it could take some time. Make sure you have enough space available on disk and do not do this via wi-fi
GenoMax is offline   Reply With Quote
Old 03-05-2015, 09:18 AM   #5
hyates
Member
 
Location: Kansas City

Join Date: Jan 2014
Posts: 18
Default

Quote:
Originally Posted by GenoMax View Post
This would be a large download. So depending on bandwidth available it could take some time. Make sure you have enough space available on disk and do not try this on wi-fi
Thanks. I think I tried this before and put it in the directory with update_blastdb.pl, so I moved the files to a new directory. However, I am rerunning the command into a directory I wish for it to be in.

So, in theory, this command should work with the local blast nt I download, right? In otherwords, blast my fasta file against the local nt database?
Code:
blastn -db ~/path/to/my/local/nt/db -query ~/path/to/this/fasta/even_tribolium.fasta

Last edited by hyates; 03-05-2015 at 09:25 AM.
hyates is offline   Reply With Quote
Old 03-05-2015, 09:30 AM   #6
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,978
Default

Quote:
Originally Posted by hyates View Post
Thanks. I think I tried this before and put it in the directory with update_blastdb.pl, so I moved the files to a new directory. However, I am rerunning the command into a directory I wish for it to be in.

So, in theory, this command should work with the local blast nt I download, right? In otherwords, blast my fasta file against the local nt database?
Code:
blastn -db ~/path/to/my/local/nt/db -query ~/path/to/this/fasta/even_tribolium.fasta
You minimally want something like this, if you want click-able html output:
Code:
$ blastn –query ~/path/to/this/fasta/even_tribolium.fasta -db /path_to/nt -task blastn -html -out out.html
GenoMax is offline   Reply With Quote
Reply

Tags
bash, blast+, commandline

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 10:55 PM.


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