Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bre
    Member
    • Dec 2009
    • 11

    Building bfast index with btestindexes

    The command "bfast index" requires the three parameters -f (input file), -m (mask or spaced seed), and -w (hash width or index's index). For finding a value for -m, there is a separate program called "btestindexes". I'm not absolutely sure which options for btestindexes are required, but it looks like at least -a for an algorithm number, -r for a read length, -S for number of events to sample are required. I'll explain what I know so far.

    There are two algorithms in btestindexes. These are selected by either a 0 or a 1 following -a.
    Step 1: Finding a set of masks
    This step is specified by -a 0. I think required options for this are -s for number of indexes to sample, -l for key size, -w for maximum key width, -n for maximum set size, and -t for accuracy percent threshold.
    Step 2: Estimate mask accuracy
    This step is specified by -a 1. Requirements for this step are -f for input file name and -I for maximum insertion length

    Is there anyone who has built indexes with bfast or used btestindexes that can tell me what these parameters expect? More directly, what is expected for parameters -r, -S, -s, -l, -w, and -n?
    Last edited by bre; 01-05-2010, 01:24 PM.
  • nilshomer
    Nils Homer
    • Nov 2008
    • 1283

    #2
    Originally posted by bre View Post
    The command "bfast index" requires the three parameters -f (input file), -m (mask or spaced seed), and -w (hash width or index's index). For finding a value for -m, there is a separate program called "btestindexes". I'm not absolutely sure which options for btestindexes are required, but it looks like at least -a for an algorithm number, -r for a read length, -S for number of events to sample are required. I'll explain what I know so far.

    There are two algorithms in btestindexes. These are selected by either a 0 or a 1 following -a.
    Step 1: Finding a set of masks
    This step is specified by -a 0. I think required options for this are -s for number of indexes to sample, -l for key size, -w for maximum key width, -n for maximum set size, and -t for accuracy percent threshold.
    Step 2: Estimate mask accuracy
    This step is specified by -a 1. Requirements for this step are -f for input file name and -I for maximum insertion length

    Is there anyone who has built indexes with bfast or used btestindexes that can tell me what these parameters expect? More directly, what is expected for parameters -r, -S, -s, -l, -w, and -n?
    Take a look at the manual, it will give recommended settings for Illumina and SOLiD reads. These should be used by default and avoid the set below. If you don't get the expected results, then...

    to try to find a set of indexes on your own, check out the BFAST paper supplemental materials.
    • -r expects the read length (say 50bp reads for SOLiD etc)
    • -S is the number of reads to sample when assessing the sensitivity of an index (10,000 gives a good sampling)
    • -s is the number of indexes to sample when searching for the next index to include the set (10 is the number I use for Illumina/SOLiD sequencing)
    • -l is the key size i.e. the # of 1s in the mask
    • -w is the maximum width i.e. the # of 1s and 0s in the mask
    • -n is the maximum # of indexes in the set.

    Again, the-l, -w, and -n options are clearly described in the BFAST paper and supplement and relate to the genome size, desired sensitivity and read length.

    Comment

    • bre
      Member
      • Dec 2009
      • 11

      #3
      Originally posted by nilshomer View Post
      Take a look at the manual, it will give recommended settings for Illumina and SOLiD reads. These should be used by default and avoid the set below. If you don't get the expected results, then...

      to try to find a set of indexes on your own, check out the BFAST paper supplemental materials.
      • -r expects the read length (say 50bp reads for SOLiD etc)
      • -S is the number of reads to sample when assessing the sensitivity of an index (10,000 gives a good sampling)
      • -s is the number of indexes to sample when searching for the next index to include the set (10 is the number I use for Illumina/SOLiD sequencing)
      • -l is the key size i.e. the # of 1s in the mask
      • -w is the maximum width i.e. the # of 1s and 0s in the mask
      • -n is the maximum # of indexes in the set.

      Again, the-l, -w, and -n options are clearly described in the BFAST paper and supplement and relate to the genome size, desired sensitivity and read length.
      I'm sorry, but could you please direct me to the section in the manual which describes the recommended settings?

      Comment

      • nilshomer
        Nils Homer
        • Nov 2008
        • 1283

        #4
        Originally posted by bre View Post
        I'm sorry, but could you please direct me to the section in the manual which describes the recommended settings?
        See section 7.1.

        Comment

        • bre
          Member
          • Dec 2009
          • 11

          #5
          I'm still having trouble finding arguments to these parameters. These are Sanger-style reads and here are some data characteristics:

          TARGET
          • Number of sequences = 1,168
          • Minimum sequence length = 1,028
          • Maximum sequence length = 63,086,992
          • Average sequence length = 843,760.069349
          • Total number of bases: 985,511,761
          • Number of Ns in file = 18,289,543
          • Longest N stretch = 1,185,460
          • Number of sequences containing N = 771

          QUERY
          • Number of sequences = 180,099
          • Minimum sequence length = 69
          • Maximum sequence length = 1,045
          • Average sequence length = 824.930960194
          • Total number of bases: 148,569,241
          • Number of Ns in file = 158,231
          • Longest N stretch = 363
          • Number of sequences containing N = 59,998


          Given these, can you recommend arguments to pass to btestindexes? Perhaps bfast may not even be the tool I'm looking for.

          Comment

          • nilshomer
            Nils Homer
            • Nov 2008
            • 1283

            #6
            Originally posted by bre View Post
            I'm still having trouble finding arguments to these parameters. These are Sanger-style reads and here are some data characteristics:

            TARGET
            • Number of sequences = 1,168
            • Minimum sequence length = 1,028
            • Maximum sequence length = 63,086,992
            • Average sequence length = 843,760.069349
            • Total number of bases: 985,511,761
            • Number of Ns in file = 18,289,543
            • Longest N stretch = 1,185,460
            • Number of sequences containing N = 771

            QUERY
            • Number of sequences = 180,099
            • Minimum sequence length = 69
            • Maximum sequence length = 1,045
            • Average sequence length = 824.930960194
            • Total number of bases: 148,569,241
            • Number of Ns in file = 158,231
            • Longest N stretch = 363
            • Number of sequences containing N = 59,998


            Given these, can you recommend arguments to pass to btestindexes? Perhaps bfast may not even be the tool I'm looking for.
            Typical short-read aligners expect reads between 25-150bp in length, and typically each run of the machine produces reads of the same length. Given your reads are between 70-1000bp in length, you may need to split the reads into various read length bins etc. to process with a short-read aligner.

            Why not just use the recommended settings in the manual and bypass the 'btestindexes' step?

            Comment

            • javijevi
              Member
              • Jan 2010
              • 38

              #7
              I'm also a little bit confused with the selection of masks to create the indexes for BFAST...

              In a previous post, you said: "Why not just use the recommended settings in the manual and bypass the 'btestindexes' step?"

              I guess that's only right for datasets similar to those in the manual, that is, human reads, 50 bp-long for SOLiD, etc., isn't?

              If so, I guess that they will not work fine for different datasets as, e.g., my data: SOLiD 25 bp-long reads, obtained from messenger RNAs from a plant, where reference genome is a draft genome composed of 3,761 scaffolds with very diverse length, 794 MB long (721 MB if not counting N's), where exons (source of transcripts) are estimated to sum 40 MB.

              So, am I forced to use the btestindexes utility to generate my set of masks and related indexes? Or can I use some kind of rationale to select a proper set of masks?

              Comment

              • nilshomer
                Nils Homer
                • Nov 2008
                • 1283

                #8
                Originally posted by javijevi View Post
                I'm also a little bit confused with the selection of masks to create the indexes for BFAST...

                In a previous post, you said: "Why not just use the recommended settings in the manual and bypass the 'btestindexes' step?"

                I guess that's only right for datasets similar to those in the manual, that is, human reads, 50 bp-long for SOLiD, etc., isn't?

                If so, I guess that they will not work fine for different datasets as, e.g., my data: SOLiD 25 bp-long reads, obtained from messenger RNAs from a plant, where reference genome is a draft genome composed of 3,761 scaffolds with very diverse length, 794 MB long (721 MB if not counting N's), where exons (source of transcripts) are estimated to sum 40 MB.

                So, am I forced to use the btestindexes utility to generate my set of masks and related indexes? Or can I use some kind of rationale to select a proper set of masks?
                The 'btestindexes' utility is a pain to use and does not always return great masks sets. I have found the following masks work well with 25bp reads regardless of genome size:

                Code:
                1111111111111111
                11111110011110011111
                111111111001111111
                1111000111111111111
                111101000110010011111111
                1111111111110001111
                1111100100111110011111
                1111111110011001100111
                1100111001110011111111
                11110011011110010011111
                The only caveat is that BFAST was not designed for short-reads (<30bp) since enumeration and exhaustive strategies (like BWA) are more efficient and sensitive.

                Comment

                • javijevi
                  Member
                  • Jan 2010
                  • 38

                  #9
                  Originally posted by nilshomer View Post
                  The only caveat is that BFAST was not designed for short-reads (<30bp) since enumeration and exhaustive strategies (like BWA) are more efficient and sensitive.
                  Oops... I missed this point... Are you sure? (well, you're the developer, so what a silly question...) But, do you think it is a so important point? Is there such a big difference between 30 and 25 bp-long reads regarding the selection of the tool? Do you think I must use bwa? Does it manage gaps in such a good way as bfast does it (MAQ do not manage gaps in non-paired reads, and AFAIK bwa is the evolution of MAQ)?

                  I've seen in your bfast paper that, for 25 bp SOLiD reads, bfast, bwa and maq percentage of mapped reads are 66, 75 and 64 %, respectively. But, what about the quality of the mapping (maq do not manage gapping, and gets similar percentage to bfast)?

                  Comment

                  • nilshomer
                    Nils Homer
                    • Nov 2008
                    • 1283

                    #10
                    Originally posted by javijevi View Post
                    Oops... I missed this point... Are you sure? (well, you're the developer, so what a silly question...) But, do you think it is a so important point? Is there such a big difference between 30 and 25 bp-long reads regarding the selection of the tool? Do you think I must use bwa? Does it manage gaps in such a good way as bfast does it (MAQ do not manage gaps in non-paired reads, and AFAIK bwa is the evolution of MAQ)?


                    I've seen in your bfast paper that, for 25 bp SOLiD reads, bfast, bwa and maq percentage of mapped reads are 66, 75 and 64 %, respectively. But, what about the quality of the mapping (maq do not manage gapping, and gets similar percentage to bfast)?
                    I think you will be fine if you use BFAST.

                    Comment

                    • javijevi
                      Member
                      • Jan 2010
                      • 38

                      #11
                      Originally posted by nilshomer View Post
                      I think you will be fine if you use BFAST.
                      OK, I will try BFAST, but I do not know why do you select this set of masks for 25 bp reads:

                      - why do they have different lengths (one of them being 24 bp long, that is, only one base shorter than reads?
                      - why some of them have so many zeroes? For instance, if I understood well, the mask 111101000110010011111111 is supposed to allow alignment when there are so many differences as, e.g., one SNP, followed by a base match, followed by three consecutive base mismatches (or an indel of three bases), followed by two base matches, followed by two consecutive base mismatches (or an indel of two bases), followed by one base match, followed by two consecutive base mismatches (or an indel of two bases), isn't? Or maybe I'm wrong...
                      - are not the two following masks exactly the same?: 1111000111111111111 and 1111111111110001111
                      - shouldn't there be a mask allowing for a single mismatch?

                      I know there are too many questions, so that there is the possibility that I'm absolutely wrong in my suppositions about masks and indexes...

                      Comment

                      • nilshomer
                        Nils Homer
                        • Nov 2008
                        • 1283

                        #12
                        Originally posted by javijevi View Post
                        OK, I will try BFAST, but I do not know why do you select this set of masks for 25 bp reads:

                        - why do they have different lengths (one of them being 24 bp long, that is, only one base shorter than reads?
                        - why some of them have so many zeroes? For instance, if I understood well, the mask 111101000110010011111111 is supposed to allow alignment when there are so many differences as, e.g., one SNP, followed by a base match, followed by three consecutive base mismatches (or an indel of three bases), followed by two base matches, followed by two consecutive base mismatches (or an indel of two bases), followed by one base match, followed by two consecutive base mismatches (or an indel of two bases), isn't? Or maybe I'm wrong...
                        - are not the two following masks exactly the same?: 1111000111111111111 and 1111111111110001111
                        - shouldn't there be a mask allowing for a single mismatch?

                        I know there are too many questions, so that there is the possibility that I'm absolutely wrong in my suppositions about masks and indexes...
                        Remember, these masks are applied across the read, and they are designed to compliment each other. There is a wide array of literature on finding spaced seeds. Suppose you knew where the errors and SNPs occurred within the read, the masks are designed such that at least one mask when applied at a least one offset from the start of the read does not have '1' that matches the SNP (two color changes) or error (one color change). I would recommend reading the BFAST manuscript, especially the supplemental materials if you are interested in a more in-depth description http://dx.doi.org/10.1371/journal.pone.0007767.

                        Comment

                        • javijevi
                          Member
                          • Jan 2010
                          • 38

                          #13
                          Originally posted by nilshomer View Post
                          Remember, these masks are applied across the read, and they are designed to compliment each other. There is a wide array of literature on finding spaced seeds. Suppose you knew where the errors and SNPs occurred within the read, the masks are designed such that at least one mask when applied at a least one offset from the start of the read does not have '1' that matches the SNP (two color changes) or error (one color change). I would recommend reading the BFAST manuscript, especially the supplemental materials if you are interested in a more in-depth description http://dx.doi.org/10.1371/journal.pone.0007767.
                          I strongly apologize for having missed that great supplementary material in the BFAST manuscript. I thought it was just data results about tools comparisons and simulations, and not that deep and informative description of the problem and the solution offered by BFAST. It has been very illustrative for a biologist like me.

                          In that supplementary material can be read that "in the BFAST distribution, we provide greedy sets containing S=40 masks, as well as the accuracy tables for using just the first s=1, s=2, s=3, …, so that one can conveniently choose a subset with any desired accuracy level, and which is furthermore already optimized relative to that accuracy specification", and also "BFAST distribution includes greedy search optimized mask sets for reads from L=20 to L=100, and up to S=40 masks long, with associated accuracy tables for all choices of fewer masks s < S, so that it is convenient to choose a mask set for the read length and accuracy levels of interest for any specific alignment problem".

                          However, I cannot find that index sets in the BFAST distribution I downloaded on Jan/2010, version 0.6.2a

                          Can anybody show me where do I have to look for them?, or Is there any other way of getting them?

                          Comment

                          • nilshomer
                            Nils Homer
                            • Nov 2008
                            • 1283

                            #14
                            Originally posted by javijevi View Post
                            I strongly apologize for having missed that great supplementary material in the BFAST manuscript. I thought it was just data results about tools comparisons and simulations, and not that deep and informative description of the problem and the solution offered by BFAST. It has been very illustrative for a biologist like me.

                            In that supplementary material can be read that "in the BFAST distribution, we provide greedy sets containing S=40 masks, as well as the accuracy tables for using just the first s=1, s=2, s=3, …, so that one can conveniently choose a subset with any desired accuracy level, and which is furthermore already optimized relative to that accuracy specification", and also "BFAST distribution includes greedy search optimized mask sets for reads from L=20 to L=100, and up to S=40 masks long, with associated accuracy tables for all choices of fewer masks s < S, so that it is convenient to choose a mask set for the read length and accuracy levels of interest for any specific alignment problem".

                            However, I cannot find that index sets in the BFAST distribution I downloaded on Jan/2010, version 0.6.2a

                            Can anybody show me where do I have to look for them?, or Is there any other way of getting them?
                            They are not up, but can be generated by btestindexes. Use the recommended settings!

                            Comment

                            • saberdsl
                              Junior Member
                              • Jan 2010
                              • 1

                              #15
                              hello nilshomer,can you tell me the masks work well with 35bp solid reads

                              Comment

                              Latest Articles

                              Collapse

                              • 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
                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 07-02-2026, 11:08 AM
                              0 responses
                              16 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-30-2026, 05:37 AM
                              0 responses
                              17 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-26-2026, 11:10 AM
                              0 responses
                              20 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-17-2026, 06:09 AM
                              0 responses
                              54 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...