Main Content

blockName

Return the names of specified blocks in pipeline

Since R2023a

Description

names = blockName(pipeline,blocks) returns the names of the blocks in the pipeline.

example

Examples

collapse all

Import the pipeline and block objects needed for the example.

import bioinfo.pipeline.Pipeline
import bioinfo.pipeline.block.*

Create a pipeline.

P = Pipeline;

Create a FileChooser block.

fcBlock = FileChooser(which("ex1.sam"));

Create a SamSort block.

ssBlock = SamSort;

Add blocks to the pipeline.

addBlock(P,[fcBlock,ssBlock]);

Retrieve the block names.

bNames = blockName(P,[fcBlock,ssBlock])
bNames = 1×2 string
    "FileChooser_1"    "SamSort_1"

Input Arguments

collapse all

Bioinformatics pipeline, specified as a bioinfo.pipeline.Pipeline object.

Blocks in the pipeline, specified as a bioinfo.pipeline.Block object or vector of such objects.

Output Arguments

collapse all

Block names, returned as a string scalar or string array. If blocks is an array, names(i) is the name of the ith block blocks(i).

Version History

Introduced in R2023a