Import the pipeline, block, and library objects needed for the example.
Create a pipeline.
Create a FileChooser
block for a FASTQ file, that is provided with the toolbox, and add to the pipeline.
Create a block library directly from the pipeline.
mylib =
Library with properties:
Name: "mylib"
Description: ""
BlockNames: "FileChooser_1"
Blocks: [1x1 bioinfo.pipeline.block.FileChooser]
Add a block to the library.
Remove a block from the library.
Add a library to the list of available libraries.
You can also save a library as a MAT-file and share with others. saveLibrary
creates the corresponding MAT-file in the current folder. The MAT-file has the same base name as the library being saved. You may set Overwrite=true
to overwrite any existing library with the same name. For instance, the following call creates mylib.mat
in the current folder.
Instead of saving the file in the current directory, you can also specify an alternative location to save the file.
saveLibrary(mylib,"C:\Examples\BlockLibraries\");
Load the library from the MAT-file.
Create a new SeqFilter
block that filters sequences using their average base qualities instead. Add the block to mylib2 and rename the library.
mylib2 =
Library with properties:
Name: "mylib2"
Description: ""
BlockNames: "FileChooser_1"
Blocks: [1x1 bioinfo.pipeline.block.FileChooser]
Add mylib2 to the list of available libraries.
Get a list of all the available libraries.
availableLibs=1×2 Library array with properties:
Name
Description
BlockNames
Blocks
Remove the library mylib
from the list.
availableLibs =
Library with properties:
Name: "mylib2"
Description: ""
BlockNames: "FileChooser_1"
Blocks: [1x1 bioinfo.pipeline.block.FileChooser]