主要内容

bowtie2build

Create Bowtie 2 index files from reference sequences

Description

example

bowtie2build(referenceFileNames,indexBaseName)builds Bowtie2 index files from the reference sequence information saved in the FASTA files specified byreferenceFileNames.

bowtie2buildrequires theBowtie 2 Support Package for Bioinformatics Toolbox™. If this support package is not installed, then the function provides a downloadlink. For details, seeBioinformatics Toolbox Software Support Packages.

example

bowtie2build(___,buildOptions)uses the additional options specified bybuildOptions. Specify these options after all other input arguments.

example

flag= bowtie2build(___)返回一个退出flagof the function using any of the input arguments in the previous syntaxes.

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 sequenceDmel_chr4.fais already provided with the toolbox.

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

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

You can specify different options by using aBowtie2BuildOptionsobject or by passing in a Bowtie 2 syntax string. For instance, you can specify whether to force the creation of a large index even if the reference is less than four billion nucleotides long as follows.

buildOpt = Bowtie2BuildOptions;

Set theForceLargeIndexoption to true.

buildOpt.ForceLargeIndex = true;

Build the index files using the specified option.

bowtie2build('Dmel_chr4.fa','Dmel_chr4_index_large',buildOpt);

Alternatively, you can pass in a Bowtie 2 syntax string.

flag = bowtie2build('Dmel_chr4.fa','Dmel_chr4_index_large2','--large-index');

Input Arguments

collapse all

Names of files with reference sequence information, specified as a string, character vector, string array, or cell array of character vectors.

Example:'Dmel_chr4.fa'

Data Types:char|string|cell

Base name (prefix) of the reference index files, specified as a character vector or string. The index files are in theBT2orBT21format.

Example:'Dmel_chr4'

Data Types:char|string

Options to build index files, specified as a character vector, string, orBowtie2BuildOptionsobject. The character vector or string must be in the Bowtie 2 option syntax (prefixed by one or two dashes)[1].

For aBowtie2BuildOptionsobject, only the modified properties are used to run the function.

Example:'--trim5 10 -s 5'

Output Arguments

collapse all

Exit status of the function, returned as an integer.flagis0if the function runs without errors or warning. Otherwise, it is nonzero.

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