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

            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM
            • SEQadmin2
              Cancer Drug Resistance: The Lingering Barrier to Rising Survival
              by SEQadmin2



              Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

              There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
              07-08-2026, 05:17 AM
            • GATTACAT
              Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
              by GATTACAT
              Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
              07-01-2026, 11:43 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 10:26 AM
            0 responses
            15 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-09-2026, 10:04 AM
            0 responses
            29 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-08-2026, 10:08 AM
            0 responses
            16 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-07-2026, 11:05 AM
            0 responses
            33 views
            0 reactions
            Last Post SEQadmin2  
            Working...