renameBlock
Description
Examples
Rename Blocks in Bioinformatics Pipeline
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.
FCB = FileChooser(which("ex1.bam"));
Add the block to the pipeline and set the block name to "File".
addBlock(p,FCB,"File");
Rename the block. Use the existing block name to reference the block to be renamed.
renameBlock(p,"File","BamFile"); p.BlockNames
ans = "BamFile"
Alternatively, you can use the block object itself.
renameBlock(p,FCB,"Ex1Bam");
p.BlockNames
ans = "Ex1Bam"
Input Arguments
pipeline
— Bioinformatics pipeline
bioinfo.pipeline.Pipeline
object
Bioinformatics pipeline, specified as a bioinfo.pipeline.Pipeline
object.
block
— Pipeline block
bioinfo.pipeline.Block
object | character vector | string scalar
Pipeline block, specified as a bioinfo.pipeline.Block
object, character vector, or string scalar,
representing the current block name.
name
— New block name
character vector | string scalar
New block name, specified as a character vector or string scalar. The name must be a valid variable name and must be unique within a pipeline.
Version History
Introduced in R2023a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)