Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jesfreric
    Member
    • Oct 2015
    • 10

    #1

    Problems with BLAST+ HSP

    Dear Community

    I have a very annoying problem. In our laboratory we’re going to launch automated BLAST-searches. Therefore we’re using BLAST+ and its output-files. We have chosen the old XML-Format (-outfmt 5). Everything worked fine until we started searching for a “max_target_seqs” value higher than 50. In this case the “<hsp>” - sections were so numerous that our Java-Software (while reading >80k lines) crashed. Is there a possibility to limited the <hsp> results per hit? May be one hsp per hit?

    Our command for blast+ is something like that:

    …\blastn.exe -db nt -remote -task blastn-short -outfmt 5 -max_target_seqs 500 -evalue 10.00 -word_size 7 -gapopen 5 -gapextend 2 -reward 1 -penalty -3 -out xml.gb -query seq.fas

    Greetings from Germany
    Jesfreric
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Assuming you are using latest blast+, it has this option. It is per query though (not per hit, if that is what you are looking for).

    -max_hsps <Integer, >=1>
    Set maximum number of HSPs per subject sequence to save for each query
    Additionally you could experiment with

    -qcov_hsp_perc <Real, 0..100>
    Percent query coverage per hsp
    Last edited by GenoMax; 10-26-2015, 04:02 AM.

    Comment

    • Jesfreric
      Member
      • Oct 2015
      • 10

      #3
      Dear GenoMax

      Thanks for your answer. Is it necessary to write the Integer + brackets?
      -max_hsps <Integer, >=1>

      Because I wrote "-max_hsps 1" few minutes ago and it didn't work.

      Have a nice day
      Jesfreric

      Comment

      • Markiyan
        Senior Member
        • Sep 2010
        • 126

        #4
        Try splitting up the input sequences into 1MB chunks.

        So here we have a problem, that the limit of the number of the input sequences in the blast only limits a number of fasta entries in the input database, to which the hits are reported.
        If a whole chromosome has a 10K HSP's bellow given E, than it would report all of them...
        There are several possible solutions:

        1. Change the program, so it does on the fly parsing HSP - by - HSP , without reading entire results file into RAM.
        2. Increase ram available to JVM: java -Xmx4G or more...
        3. Lower the E-vallue, increase the -W (word size)
        4. Chop the nt database into 1Mbp chunks (take nt.fasta, parse the sequences, and every sequence longer than 1Mbp gets chopped up onto 1Mbp segments).
        5. Write a perl script to skip second and other HSP's, report only the fist HSP per hit...
        6. Have a catalog of the repetitive sequences, and fist search for hits against it, and then the whole nt (if no hits found)...
        BTW: Legacy blast has the same problem...
        Last edited by Markiyan; 10-26-2015, 04:30 AM. Reason: Typo fix/clarification.

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          Originally posted by Jesfreric View Post
          Dear GenoMax

          Thanks for your answer. Is it necessary to write the Integer + brackets?
          -max_hsps <Integer, >=1>

          Because I wrote "-max_hsps 1" few minutes ago and it didn't work.

          Have a nice day
          Jesfreric
          Just the integer should be fine. Did you get an error?

          Comment

          • Jesfreric
            Member
            • Oct 2015
            • 10

            #6
            Hi

            No I'm getting no error. But the number of <hsp> is still as high as before...

            Comment

            • Jesfreric
              Member
              • Oct 2015
              • 10

              #7
              Is it possible, that the -max_hsps is only working on 64-bit systems?

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                -max_hsps is working for me (tried a blastn search with nt). I don't think it would work only on 64-bit. Are you running 32-bit blast?
                Last edited by GenoMax; 10-26-2015, 04:55 AM.

                Comment

                • Jesfreric
                  Member
                  • Oct 2015
                  • 10

                  #9
                  At the moment yes. But we're going to update the system soon.
                  Did you try it with -task blastn-short too?

                  Comment

                  • Jesfreric
                    Member
                    • Oct 2015
                    • 10

                    #10
                    Is it possible that the usage of -task blastn-short will ignore all other parameter set by the user? Because the parameters are going to be adjusted automatically?

                    Greetings
                    Jesfreric

                    Comment

                    • GenoMax
                      Senior Member
                      • Feb 2008
                      • 7142

                      #11
                      I am not sure. You can email blast support staff at NCBI to check. It may take a couple of days but they are good about responding.

                      Edit: I tried a regular DNA fasta file with blastn-short and max_hsps did work as advertised.

                      Are you using blastn-short with actual NGS reads?
                      Last edited by GenoMax; 10-26-2015, 09:11 AM.

                      Comment

                      • Jesfreric
                        Member
                        • Oct 2015
                        • 10

                        #12
                        Dear GenoMax

                        At the beginning I used blastn-short but now I have chosen -task blastn and adjust the parameter equivalent to blastn-short. Unfortunately that did not working too. Would it be possible for you to blast the following sequence?

                        XXX XXX XXX XXX XXX XXX XXX

                        And could you use the following commands?
                        …\blastn.exe -db nt -task blastn -query seq.fsa -out xml2.gb -remote -outfmt 5 -evalue 1000 -word_size 7 -max_hsps 1

                        The result I get with these settings is a xml-file with 499 <hit> sections and 5153 <hsp> sections.
                        It would be very interesting if you get the same results.

                        I’m using blast-2.2.31+ and (still) 32-bit version of Windows…

                        Greetings
                        Richard
                        Last edited by Jesfreric; 10-27-2015, 05:58 AM.

                        Comment

                        • GenoMax
                          Senior Member
                          • Feb 2008
                          • 7142

                          #13
                          @Richard: -max_hsps option is working as expected with your sequence with blastn or blastn-short. (With a local copy of nt and outfmt 6 since it is easier to look at a glance)

                          With -outfmt 5 I see 500 <Hit> and <Hit_num> sections. So on windows blast appears to be doing something different.

                          Comment

                          • Jesfreric
                            Member
                            • Oct 2015
                            • 10

                            #14
                            If you're using -outfmt 5, do you see the whole 5000 <hsp> too?

                            Comment

                            • GenoMax
                              Senior Member
                              • Feb 2008
                              • 7142

                              #15
                              No. Only 500 <Hsp> or </Hsp> sections.

                              Comment

                              Latest Articles

                              Collapse

                              • SEQadmin2
                                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                                by SEQadmin2



                                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                                ...
                                10-14-2026, 09:55 AM
                              • SEQadmin2
                                New Genomics Technologies Take Aim at Long-Standing Limits
                                by SEQadmin2


                                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                                ...
                                09-28-2026, 10:25 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 10-22-2026, 11:13 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-22-2026, 10:48 AM
                              0 responses
                              20 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-15-2026, 10:52 AM
                              0 responses
                              36 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 10-14-2026, 05:39 AM
                              0 responses
                              42 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...