Main Content

bioinfo.pipeline.datatype.Incomplete

Incomplete pipeline result object

Since R2023a

Description

A bioinfo.pipeline.datatype.Incomplete object is the value returned by the results method when the block result is not yet computed.

When you query an incomplete result of a block at the command line, the value is displayed as follows.

results(pipeline,fileChooserBlock)
ans = 

  Incomplete pipeline result.

Creation

Use bioinfo.pipeline.datatype.Incomplete to create the object.

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 that takes in a SAM file as an input.

samFile = FileChooser(which("Myco_1_1.sam"));

Create a SeqTrim block.

trimsequences = SeqTrim;

Add blocks to the pipeline.

addBlock(P,[samFile,trimsequences]);

Check the names of the output port and input port of the blocks to connect.

samFile.Outputs
ans = struct with fields:
    Files: [1×1 bioinfo.pipeline.Output]

trimsequences.Inputs
ans = struct with fields:
    FASTQFiles: [1×1 bioinfo.pipeline.Input]

Connect the ports.

connect(P,samFile,trimsequences,["Files","FASTQFiles"]);

The block returns an incomplete result if the block has not yet run.

results(P,trimsequences)
ans = 
  Incomplete pipeline result.

Run the pipeline and check the run status of each block in the process table. The samFile block had no error, but the SeqTrim block generated an error as indicated by the Status column. The SeqTrim block generated an error because it was expecting a FASTQ file as an input but received a SAM file instead.

run(P);
t = processTable(P,Expanded=true)
t=2×5 table
         Block          Status            RunStart                 RunEnd              RunErrors    
    _______________    _________    ____________________    ____________________    ________________

    "FileChooser_1"    Completed    26-Jul-2023 09:19:07    26-Jul-2023 09:19:07    {0×0 MException}
    "SeqTrim_1"        Error        26-Jul-2023 09:19:07    26-Jul-2023 09:19:08    {1×1 MException}

You can see the printed error message at the MATLAB® command line. You can also enter the following commands to see the message.

seqTrimInfo = t(2,:);
seqTrimInfo.RunErrors{:}

Version History

Introduced in R2023a