Main Content

removeBlock

Remove blocks from pipeline

Since R2023a

Description

example

removeBlock(pipeline,blocks) removes the specified blocks from the pipeline. Any existing connections to or from any of the removed ports are also removed.

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 some blocks.

FCB1 = FileChooser(which("ex1.bam"));
FCB2 = FileChooser(which("ex1.sam"));
FCB3 = FileChooser(which("Myco_1_1.sam"));

Add blocks to the pipeline.

addBlock(p,[FCB1,FCB2,FCB3], ["F1","F2","F3"]);

Remove blocks from the pipeline.

removeBlock(p,"F2");
p.Blocks
removeBlock(p,[FCB1,FCB3])
p.Blocks
ans = 

  0×1 Block array with properties:

    Inputs
    Outputs
    ErrorHandler

Input Arguments

collapse all

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

Pipeline blocks, specified as a bioinfo.pipeline.Block object or vector of block objects. You can also specify character vector, string scalar, string vector, or cell array of character vectors representing block names.

Version History

Introduced in R2023a