Main Content

preset

Set combination of alignment options

Description

preset(object,P) sets a combination of alignment options (object properties) to predefined values for typical tradeoffs between execution time and sensitivity. The function sets the following object properties: NumReseedings, NumSeedExtensions, NumSeedMismatches, SeedIntervalFunction, SeedLength, and Mode.

preset requires the Bowtie 2 Support Package for Bioinformatics Toolbox™. If this support package is not installed, then the function provides a download link. For details, see Bioinformatics Toolbox Software Support Packages.

example

Examples

collapse all

Build a set of index files for the Drosophila genome. An error message appears if you do not have the Bioinformatics Toolbox Interface for Bowtie Aligner support package installed when you run the function. Click the provided link to download the package from the Add-on menu.

For this example, the reference sequence Dmel_chr4.fa is already provided with the toolbox.

status = bowtie2build('Dmel_chr4.fa', 'Dmel_chr4_index');

If the index build is successful, the function returns 0 and creates the index files (*.bt2) in the current folder. The files have the prefix 'Dmel_chr4_index'.

Once the index is ready, map the read sequences to the reference. The paired-end read files (SRR6008575_10k_1.fq and SRR6008575_10k_2.fq) are already provided with the toolbox.

Create an options object.

 alignOpt = Bowtie2AlignOptions;

Some preset options define a combination of values for several alignment parameters at the same time. Use an empty string to see the list of all the preset options.

preset(alignOpt,'')
ans =

  8×6 table

                          NumSeedExtensions    NumReseedings    NumSeedMismatches    SeedLength    SeedIntervalFunction       Mode   
                          _________________    _____________    _________________    __________    ____________________    __________

    Fast                         10                  2                  0                22             'S,0,2.50'         'EndToEnd'
    LocalFast                    10                  2                  0                22             'S,1,1.75'         'Local'   
    LocalSensitive               15                  2                  0                20             'S,1,0.75'         'Local'   
    LocalVeryFast                 5                  1                  0                25             'S,1,2.00'         'Local'   
    LocalVerySensitive           20                  3                  0                20             'S,1,0.50'         'Local'   
    Sensitive                    15                  2                  0                22             'S,1,1.15'         'EndToEnd'
    VeryFast                      5                  1                  0                22             'S,0,2.50'         'EndToEnd'
    VerySensitive                20                  3                  0                20             'S,1,0.50'         'EndToEnd'

Align using the 'Fast' option, which makes the alignment process faster but less sensitive and less accurate.

preset(alignOpt,'Fast');

Map reads to the reference using the specified alignment options.

flag = run(alignOpt,'Dmel_chr4','SRR6008575_10k_1.fq','SRR6008575_10k_2.fq','SRR6008575_10k_chr4_fast.sam');

The output is a SAM-formatted file that contains the mapping results.

Input Arguments

collapse all

Alignment options, specified as a Bowtie2AlignOptions object.

Example: alignOpt

Preset option, specified as a character vector. Valid options are 'Sensitive', 'VerySensitive', 'Fast', 'VeryFast', 'LocalFast', 'LocalVeryFast', 'LocalSensitive', 'LocalVerySensitive', and ''. Use an empty character vector '' to display the predefined values for each preset option.

Example: 'LocalFast'

References

[1] Langmead, B., and S. Salzberg. "Fast gapped-read alignment with Bowtie 2." Nature Methods. 9, 2012, 357–359.

Version History

Introduced in R2018a