emptyInputs
Description
Examples
Create Input Structure from Bioinformatics Pipeline Block
Create a Bowtie2
block to map the read sequences to the reference sequence.
bowtie2block = bioinfo.pipeline.block.Bowtie2;
Use the 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 IndexBaseName
to "Dmel_chr4"
, which is the base name for the reference index files for the Drosophila genome. Set Reads1Files
to "SRR6008575_10k_1.fq"
and Reads2Files
to "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.
run(bowtie2block,inStructAll);
Input Arguments
blockObj
— Block object
bioinfo.pipeline.Block
object
Block object, specified as a scalar bioinfo.pipeline.Block
object.
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 false
.
Output Arguments
S
— Prepared input structure for run
method
structure
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
array []
.
If you set IncludeOptional=true
, the structure also contains the
fields for optional input ports of the block.
Version History
Introduced in R2023a
See Also
compile
| bioinfo.pipeline.Block
| bioinfo.pipeline.Pipeline
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)