Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create a BLAST database

    Hi everybody,

    I'm new on this forum and of course, I come here because I have a problem... sorry.

    I use Blast on macOSx

    I want to create a protein database named NveProt. Then I created a .fasta file NveProt.fas and saved it in ncbi-blast.2.2.24+/db folder.

    Then I use the command to create a new database : ./makeblastdb -in NveProt.fas

    and I get the following message :

    Building a new DB, current time: 02/15/2011 19:11:39
    New DB name: NveProt.fas
    New DB title: NveProt.fas
    Sequence type: Protein
    Keep Linkouts: T
    Keep MBits: T
    Maximum file size: 1073741824B
    BLAST Database error: No alias or index file found for protein database [NveProt.fas] in search path [/Users/aliealexandre/ncbi-blast-2.2.24+/bin::/Users/aliealexandre/ncbi-blast-2.2.24+/db:]

    What's happening
    Do I have to modify the path variable ? How to do that ?

    Thank you for your help

    Alex

  • #2
    Are you running makeblastdb from the ncbi-blast.2.2.24+/db folder? i.e. Are you in the same directory as the FASTA file?

    Comment


    • #3
      I've always specified the output names for my blast db:
      ./makeblastdb -in NveProt.fas -dbtype 'prot' -out NveProt -name -NveProt

      Paths are defined in the .profile file locate in your home directory. Use a text editor or vi to edit the .profile file. There may be more paths than this, but to define the paths in your email, the file should read
      export
      PATH=$PATH:/Users/aliealexandre/ncbi-blast-2.2.24+/bin:/Users/aliealexandre/ncbi-2.2.24+/db:$Path

      After editing this .profile, type
      >source .profile

      Or you can set a PATH at the command line:
      >export PATH=$PATH:/Users/aliealexandre/ncbi-blast-2.2.24+/bin
      >export PATH=$PATH:/Users/aliealexandre/ncbi-blast-2.2.24+/db
      >source .profile

      Maureen

      Comment


      • #4
        Thank you

        @maubp I copy the makeblastdb binary file in the same folder than my database (NveProt) and it worked

        In the same way, when I want to launch a blastp, for instance, I have to copy the blastp binary file in the same folder that my query sequence and my database file (actually ./db folder in this case)

        In sum everything must be in the same folder... which sounds strange to me.

        I thought that binary files are in the ./bin folder and databases in ./db folder.

        Do I do something wrong ?

        In any case, thanks to all of you for your prompt answers

        Alex

        Comment


        • #5
          I think you need to learn a bit more about the basics of working at the Unix/Linux command line. If you do this:

          Code:
          ./makeblastdb -in NveProt.fas -dbtype 'prot' -out NveProt -name -NveProt
          then you are telling the operating system to look for makeblastdb in the current directory (the single period or dot means the current directory, a double dot means the parent directory).

          Assuming BLAST+ is installed properly, you should just do this, and the operating system will look on the path for the installed copy of makeblastdb:

          Code:
          makeblastdb -in NveProt.fas -dbtype 'prot' -out NveProt -name -NveProt
          If you haven't installed BLAST+ at the system level (e.g. you are not an administrator) then you can configure your PATH to include your BLAST tools, or just give the path explicitly, e.g.

          Code:
          /home/alex/blast/bin/makeblastdb -in NveProt.fas -dbtype 'prot' -out NveProt -name -NveProt
          Last edited by maubp; 02-17-2011, 03:16 AM. Reason: typo

          Comment


          • #6
            maubbp you're right, I should learn more about UNIX. I'm on this way now... Following your advices I succeed in accomplishing the makeblastdb command.

            Thank you very much

            Alex

            Comment


            • #7
              Great - well done

              Comment


              • #8
                local blast database

                Hi,
                I am trying to set up a local BLAST, creating a database of miRNA seq from miRBASE. essentially using BLAST to use miRBASE seqs as a database. Everything worked fine in creating a database with the mature.fa sequences from miRBASE. Do I need to format this database? or use it directly to perform searches as is? Please can anyone guide me?
                Thanks
                geneart

                Comment


                • #9
                  Hi geneart, I'm having trouble understanding your question. Are you saying you've downloaded a FASTA file from miRBASE and want to turn this into a database? If so yes, you should use the makeblastdb command.

                  You can search directly against a FASTA file, but it is slower (and only uses one CPU), but will also give you pairwise e-values which will look more impressive than they really are, see:
                  Sometimes using BLAST is frustrating. Today I'm writing about it returning different expectation values, and therefore different answers, de...

                  Comment


                  • #10
                    BLAST database

                    Yes, maubp ,you are correct ! I did setup the database using miRBASE mature.fa files .I was wondering if I need to format that datanase at all in doing that. It does not matter now as it worked. But I had another question again.
                    I have short RNA sequences from Illumina sequencer and am trying to find matches in miRBASE through a blast standalone (which has mature.fa from miRBASE to be used as a database). Now when I directly use miRBASE and use SSEARCH I get hits however when I BLST locally I don't get any hits.
                    I have used default parameters, which I would like to tweek to see if results change. My problem is how do I run BLASTN-short on cmd line or tweek the parameters in BLAST standalone? Any help? I looked up the BLAST manual that comes with the standalone but could not find it.
                    I am not that command line savy so hoping someone can suggest ways of doing it ?
                    Thanks in advance
                    Geneart.

                    Comment


                    • #11
                      Hey everyone,

                      So I am also having some similar issues. I successfully made my database in the correct folder, but then when I actually try to run my blast, it isn't working...

                      #I used the following to make the db

                      makeblastdb -in supercontigs.fasta.txt -dbtype 'nucl' -out p.full

                      #I then tried to run this the next step

                      query=NGF.fasta -db=p.full -outfmt="6" -out=blast

                      Any ideas how I can change my second step to successfully run the blast search?

                      Thanks,
                      Kyle

                      Comment


                      • #12
                        Kyle - you've left out at least part of the command you ran, and more importantly you left out important details like what the error message was. That makes it almost impossible to guess what you've done wrong.

                        Comment


                        • #13
                          Originally posted by utagenomics View Post
                          Hey everyone,

                          #I used the following to make the db

                          makeblastdb -in supercontigs.fasta.txt -dbtype 'nucl' -out p.full

                          #I then tried to run this the next step

                          query=NGF.fasta -db=p.full -outfmt="6" -out=blast

                          Any ideas how I can change my second step to successfully run the blast search?
                          Well for one you haven't specified a program, which should probably be blastn in your case. Second, the correct syntax would be:

                          blastn -query NGF.fasta -db p.full -outfmt 6 -out blast

                          If that still doesn't work, then I'd guess that there are problems with your environmental variables. You could go around this by specifying the paths of your program, query file, and db, i.e.

                          /where/is/blast/bin/blastn -query /where/is/this/fileNGF.fasta -db /where/is/this/db/p.full -outfmt 6 -out blast

                          optional flag you should consider: -num_threads INSERT_NUMBER_OF_CORES_IN_YOUR_SYSTEM, e.g. -num_threads 2
                          Last edited by rhinoceros; 04-29-2013, 05:33 AM.
                          savetherhino.org

                          Comment


                          • #14
                            Creating blastdb in windows

                            after downloading and installation
                            1-Use command prompt and go to the bin directory
                            for creating a database like protein database you need a simple multi fasta file

                            2- use this command :
                            Code:
                            makeblastdb -in D:\\ref.fasta -dbtype prot -out Plant
                            with the above code makeblastdb generate 3 file with .pin , .phr and .psq format in the bin directory.
                            Plant is the name of output database.

                            3- for using this database in sample query :

                            Code:
                            blastp -query D:\\in.txt -db plant -out D:\\Out.txt

                            Comment


                            • #15
                              How I can make custom database in batch?

                              I am wondering if you could tell me how I can make a database from different files in batch? The commands like entry_batch does not respond.
                              I have also used below command but it gives the error stated afterwards:

                              makeblastdb -in Strains/*.fasta -dbtype 'nucl' -out db/stec_samples

                              Error: Too many positional arguments (1), the offending value: Strains/Sample_1.fasta

                              P.S. A single database can be made from Sample_1.fasta with no error.

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Strategies for Sequencing Challenging Samples
                                by seqadmin


                                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                03-22-2024, 06:39 AM
                              • seqadmin
                                Techniques and Challenges in Conservation Genomics
                                by seqadmin



                                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                Avian Conservation
                                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                03-08-2024, 10:41 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Yesterday, 06:37 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Yesterday, 06:07 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-22-2024, 10:03 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-21-2024, 07:32 AM
                              0 responses
                              67 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X