Main Content

results

Get bioinformatics pipeline results

Since R2023a

Description

example

blockResults = results(pipeline,block) returns the results of block in the pipeline.

Tip

Use fetchResults instead of results if you are running in parallel. fetchResults waits for the block to complete before returning its results.

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 the FileChooser and SamSort blocks.

FCB = FileChooser(which("ex1.sam"));
SSB = SamSort;

Add blocks to the pipeline and connect them.

addBlock(P,[FCB,SSB]);
connect(P,FCB,SSB,["Files","SAMFile"]);

Run the pipeline.

run(P);

The outputs of the FileChooser and SamSort blocks are files that are saved to your file system.

fcbResults = results(P,FCB)
fcbResults = struct with fields:
    Files: [1×1 bioinfo.pipeline.datatype.File]

ssbResults = results(P,SSB)
ssbResults = struct with fields:
    SortedSAMFile: [1×1 bioinfo.pipeline.datatype.File]

Tip: Use the unwrap method to see the location of the output file. For example, unwrap(ssbResults.SortedSAMFiles) shows the location of the sorted SAM file.

Input Arguments

collapse all

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

Block in the pipeline, specified as a scalar bioinfo.pipeline.Block object, character vector, or string scalar as the block name. To get the list of block names, enter pipeline.BlockNames at the command line.

Output Arguments

collapse all

Block results, returned as a structure or bioinfo.pipeline.datatypes.Incomplete object. The Incomplete object is returned if the block results are not yet computed or available.

If it is a structure, the field names are the output port names of the block, and the field values are the output values. If you have not run the pipeline or the results are not available yet, each output value has the default value of Incomplete, which is a bioinfo.pipeline.Incomplete object.

Data Types: struct

Version History

Introduced in R2023a