Main Content

run

Inspect Bowtie 2 index files

Description

run(object,indexBaseName,outputFileName) inspects Bowtie 2 index files with the prefix indexBaseName, checks the original reference sequences used to build the index, and saves the reference sequences in the output file outputFileName. The argument object is a Bowtie2InspectOptions object.

run 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

run(___,'IncludeAll',TF) specifies whether to use all object properties and their corresponding values when you run bowtie2inspect. Specify this option after all other input arguments. By default, only the modified properties are used to run bowtie2inspect.

example

flag = run(___) returns an exit flag of the function using any of the input arguments in the previous syntaxes.

example

Examples

collapse all

Get information about the reference sequence used to build the corresponding index files. 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.

Create an options object.

inspectOpt = Bowtie2InspectOptions;

Inspect the index and get information about the reference sequence. By default, the output file Dmel_chr4_retrieved.fa contains the actual sequence of the reference used to build the index. If the function runs without any warning or error, it returns 0.

flag = run(inspectOpt,'Dmel_chr4', 'Dmel_chr4_retrieved.fa');

Input Arguments

collapse all

Options to inspect the index files, specified as a Bowtie2InspectOptions object.

Example: 'inspectOpt'

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

Example: 'Dmel_chr4'

Data Types: char | string

Name of an output file, specified as a string or character vector. By default, the output file contains the reference sequences that are used to build the index files.

Example: 'refSeq.fa'

Data Types: char | string

Flag to use all object properties and their corresponding values when you run the function, specified as true or false. By default, only the modified properties are used.

Example: true

Output Arguments

collapse all

Exit status of the function, returned as an integer. flag is 0 if 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