Pipeline object to build and run end-to-end bioinformatics analyses and workflows
bioinfo.pipeline.Pipeline object lets you construct and
execute bioinformatics pipelines and workflows to analyze genomic data.
Create the object using
Blocks — Blocks in pipeline
Blocks in the pipeline, specified as a vector of block objects.
BlockNames — Names of blocks in the pipeline
Names of the blocks in the pipeline, specified as a string vector.
|Add blocks to pipeline|
|Return the names of specified blocks in pipeline|
|Cancel blocks in pipeline that are running in parallel|
|Verify pipeline structure and check for warnings and errors|
|Connect two blocks in pipeline|
|Copy array of handle objects|
|Delete block results from pipeline|
|Remove connection between ports in a pipeline|
|Wait for parallel-running block to finish and return its results|
|Get block objects from bioinformatics pipeline|
|Get names of unconnected block inputs from pipeline|
|Show connected ports between two blocks|
|Return information about all processes in pipeline|
|Remove blocks from pipeline|
|Rename block in pipeline|
|Get bioinformatics pipeline results|
|Wait for running blocks to complete|
Create a Simple Pipeline to Plot Sequence Quality Data
Import the Pipeline and block objects needed for the example.
import bioinfo.pipeline.Pipeline import bioinfo.pipeline.block.*
Create a pipeline.
qcpipeline = Pipeline;
Select an input FASTQ file using a
fastqfile = FileChooser(which("SRR005164_1_50.fastq"));
sequencefilter = SeqFilter;
Define the filtering threshold value. Specifically, filter out sequences with a total of more than 10 low-quality bases, where a base is considered a low-quality base if its quality score is less than 20.
sequencefilter.Options.Threshold = [10 20];
Add the blocks to the pipeline.
Connect the output of the first block to the input of the second block. To do so, you need to first check the input and output port names of the corresponding blocks.
Outputs (port of the first block) and
Inputs (port of the second block).
ans = struct with fields: Files: [1×1 bioinfo.pipeline.Output]
ans = struct with fields: FASTQFiles: [1×1 bioinfo.pipeline.Input]
Files output port of the
fastqfile block to the
FASTQFiles port of
Next, create a
UserFunction block that calls the
seqqcplot function to plot the quality data of the filtered sequence data. In this case,
inputFile is the required argument for the
seqqcplot function. The required argument name can be anything as long as it is a valid variable name.
qcplot = UserFunction("seqqcplot",RequiredArguments="inputFile",OutputArguments="figureHandle");
Alternatively, you can also use dot notation to set up your
qcplot = UserFunction; qcplot.RequiredArguments = "inputFile"; qcplot.Function = "seqqcplot"; qcplot.OutputArguments = "figureHandle";
Add the block.
Check the port names of
sequencefilter block and
ans = struct with fields: FilteredFASTQFiles: [1×1 bioinfo.pipeline.Output] NumFilteredIn: [1×1 bioinfo.pipeline.Output] NumFilteredOut: [1×1 bioinfo.pipeline.Output]
ans = struct with fields: inputFile: [1×1 bioinfo.pipeline.Input]
FilteredFASTQFiles port of the
sequencefilter block to the
inputFile port of the
Run the pipeline to plot the sequence quality data.
Introduced in R2023a