Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hyates
    Member
    • Jan 2014
    • 18

    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.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    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.

    Comment

    • hyates
      Member
      • Jan 2014
      • 18

      #3
      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.

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        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

        Comment

        • hyates
          Member
          • Jan 2014
          • 18

          #5
          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, 10:25 AM.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            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

            Comment

            Latest Articles

            Collapse

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 06-05-2026, 10:09 AM
            0 responses
            14 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-04-2026, 08:59 AM
            0 responses
            24 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-02-2026, 12:03 PM
            0 responses
            29 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-02-2026, 11:40 AM
            0 responses
            23 views
            0 reactions
            Last Post SEQadmin2  
            Working...