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
                                Genetic Variation in Immunogenetics and Antibody Diversity
                                by seqadmin



                                The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
                                11-06-2024, 07:24 PM
                              • seqadmin
                                Choosing Between NGS and qPCR
                                by seqadmin



                                Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
                                10-18-2024, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Today, 11:09 AM
                              0 responses
                              22 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Today, 06:13 AM
                              0 responses
                              20 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 11-01-2024, 06:09 AM
                              0 responses
                              30 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 10-30-2024, 05:31 AM
                              0 responses
                              21 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X