Create input structure for use with
Create Input Structure from Bioinformatics Pipeline Block
Bowtie2 block to map the read sequences to the reference sequence.
bowtie2block = bioinfo.pipeline.block.Bowtie2;
emptyInputs method of the block to construct an input structure with field names prepopulated to match the names of required input port names of the block.
inStruct = emptyInputs(bowtie2block)
inStruct = struct with fields: IndexBaseName:  Reads1Files: 
Some of the built-in blocks have optional input ports. To see the names of these ports, set
IncludeOptional=true. For instance, the
Bowtie2 block has an optional input port (
Reads2Files) that accepts files for the second mate reads when you have paired-end read data.
inStructAll = emptyInputs(bowtie2block,IncludeOptional=true)
inStructAll = struct with fields: IndexBaseName:  Reads1Files:  Reads2Files: 
Set the field values of the prepopulated structure. Specifically, set
"Dmel_chr4", which is the base name for the reference index files for the Drosophila genome. Set
"SRR6008575_10k_2.fq". These files are already provided with the toolbox.
inStructAll.IndexBaseName = "Dmel_chr4"; inStructAll.Reads1Files = "SRR6008575_10k_1.fq"; inStructAll.Reads2Files = "SRR6008575_10k_2.fq";
Run the block using the structure as an input. The mapped results are saved as
Aligned.sam in the current working directory.
blockObj — Block object
Block object, specified as a scalar
tf — Flag to include optional input port names
false or 0 (default) |
true or 1
Flag to include optional input port names, specified as a numeric or logical 1 (
true) or 0 (
false). An optional inport port is an input port (
bioinfo.pipeline.Input) with its
Required property set to
S — Prepared input structure for
Prepared input structure for the block
run method, returned as
a structure. The field names of the structure are the names of the required input ports
of the block
blockObj. The value of each field is set as an empty
If you set
IncludeOptional=true, the structure also contains the
fields for optional input ports of the block.
Introduced in R2023a