Main Content

bioinfo.pipeline.block.Bowtie2Build

Bioinformatics pipeline block to create Bowtie2 index from reference sequence

Since R2023a

Description

A Bowtie2Build block enables you to create index files from a reference sequence.

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

Creation

Description

b = bioinfo.pipeline.block.Bowtie2Build creates a Bowtie2Build block.

b = bioinfo.pipeline.block.Bowtie2Build(options) also specifies additional options.

b = bioinfo.pipeline.block.Bowtie2Build(Name=Value) specifies additional options as the property names and values of a Bowtie2BuildOptions object. This object is set as the value of the Options property of the block. For example, bt2buildBlock = bioinfo.pipeline.block.Bowtie2Build(ForceLargeIndex=true) sets the ForceLargeIndex property of the object to force the creation of a large index even if the reference is less than 4 billion nucleotides long.

Input Arguments

expand all

Bowtie2Build options, specified as a Bowtie2BuildOptions object, string, or character vector.

If you are specifying a string or character vector, it must be in the native bowtie2 option syntax (prefixed by one or two dashes) [1].

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Note

The following list of arguments is a partial list. For the complete list, refer to the properties of Bowtie2BuildOptions object.

Boolean indicator to build only the 3.bt2 and 4.bt2 files that correspond to the bitpacked version of reference sequences, specified as true or false.

Data Types: logical

Boolean indicator to omit building the 3.bt2 and 4.bt2 files that correspond to the bitpacked version of reference sequences, specified as true or false.

Data Types: logical

Properties

expand all

Function to handle errors from the run method of the block, specified as a function handle. It specifies the function to call if the run method encounters an error within a pipeline. In order for the pipeline to continue after a block fails, ErrorHandler must return a structure compatible with the output ports of the block. The error handling function is called with the following two input arguments:

  • Structure with the following fields:

    FieldDescription
    identifierIdentifier of the error that occurred
    messageText of the error message
    indexLinear index indicating which block process failed in the parallel run. By default, the index is always 1 because there is only one run per block. For details on how block inputs can be split across different dimensions for multiple run calls, see Bioinformatics Pipeline SplitDimension.

  • Input structure passed to the run method when it failed.

Data Types: function_handle

This property is read-only.

Input ports of the block, specified as a structure. The field names of the structure are the names of the block input ports and the field values are bioinfo.pipeline.Input objects. These objects describe the input port behaviors. The input port names are the expected field names of the input structure that you pass in for the block run method.

The Bowtie2Build block Inputs structure has the following fields:

  • ReferenceFASTAFiles — Names of files with reference sequence information. This input is a required input that must be satisfied.

  • IndexBaseName — Base name of the reference index files. The index files are in the BT2 or BT21 format. For example, if you specify "Dmel_chr4" as IndexBaseName, the generated index files would be Dmel_chr4.1.bt2, Dmel_chr4.2.bt2, and so on. This input is optional, and by default, the block uses "Bowtie2Index" as the prefix.

The default value for each of these inputs is a bioinfo.pipeline.datatypes.Unset object, which means that the input value is not set yet.

Data Types: struct

This property is read-only.

Output ports of the block, specified as a structure. The field names of the structure are the names of the block output ports and the field values are bioinfo.pipeline.Output objects. These objects describe the output port behaviors. The output structure returned by the block run method has the field names that are the same as the output port names.

The Bowtie2Build block Outputs structure has the field named IndexBaseName.

Data Types: struct

Bowtie2Build options, specified as a Bowtie2BuildOptions object. The default value is a default Bowtie2BuildOptions object.

Object Functions

compilePerform block-specific additional checks and validations
copyCopy array of handle objects
emptyInputsCreate input structure for use with run method
evalEvaluate block object
runRun block object

References

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

Version History

Introduced in R2023a