Main Content

processTable

Return information about all processes in pipeline

Since R2023a

Description

t = processTable(pipeline) returns a table t that contains information about all processes in a pipeline, including block-specific run start and end times and run statuses.

example

t = processTable(pipeline,blocks) returns a table t that contains information only for the specified blocks.

example

t = processTable(___,Expanded=tf) specifies whether to expand t to contain one row for each independent run of a block, or to collapse multiple runs of the same block into a single row.

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: [1x1 bioinfo.pipeline.Output]

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

Connect the ports.

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

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

results(P,trimsequences)
ans = 
  Incomplete result (0x0) with the following outputs:

    TrimmedFASTQFiles
    NumTrimmed
    NumUntrimmed


  Not Run:  0
  Complete: 0
  Error:    0

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    05-Sep-2024 19:52:35    05-Sep-2024 19:52:35    {0x0 MException}
    "SeqTrim_1"        Error        05-Sep-2024 19:52:36    05-Sep-2024 19:52:36    {1x1 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{:}

Input Arguments

collapse all

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

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

Flag to contain one row per each independent block run or group all runs of the same block into a single row, specified as a numeric or logical 1 (true) or 0 (false).

Each row in the table represents a block, and there are corresponding Status, RunStart, RunEnd, and RunErrors columns for each block.

By default, the function groups (or collapses) all runs of the same block into a single row. If a block is run n independent times (per its SplitDimension property of the input port), then the table variable value for each column is an n-by-1 cell array. For instance, the next figure is an example of a (default) collapsed process table (Expanded = false). Note that for the Bowtie2_1, SamSort_1 and Cufflinks_1 blocks, the table variable values are 2-by-1 cell arrays because each of these blocks were run 2 times independently.

The next figure is the same table with the expanded cell array (Expanded = true).

Output Arguments

collapse all

Table containing information on pipeline processes, returned as a table.

Each row in the table represents a block, and there are corresponding Status, RunStart, RunEnd, and RunErrors columns for each block.

Version History

Introduced in R2023a