Unconfigured Ad

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

    #1

    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

            • kinpict.com
              Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by kinpict.com
              The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
              Today, 06:37 PM
            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2





              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
              10-30-2026, 06:46 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 11-12-2026, 07:59 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-05-2026, 09:25 AM
            0 responses
            35 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-03-2026, 11:54 AM
            2 responses
            56 views
            0 reactions
            Last Post kinpict.com  
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            175 views
            0 reactions
            Last Post SEQadmin2  
            Working...