Import the pipeline and block objects needed for the example.
Create a pipeline.
Create two FileChooser
blocks and a Bowtie2
block. The files represent pair-end read data for the Drosophila genome. These read files are already provided with the toolbox.
Add the blocks. Define the block names as "reads1","reads2", and "bowtie2" and add them in the same call.
Check the names of the output and input ports of the blocks to connect.
ans = struct with fields:
Files: [1×1 bioinfo.pipeline.Output]
ans = struct with fields:
Files: [1×1 bioinfo.pipeline.Output]
ans = struct with fields:
IndexBaseName: [1×1 bioinfo.pipeline.Input]
Reads1Files: [1×1 bioinfo.pipeline.Input]
Reads2Files: [1×1 bioinfo.pipeline.Input]
The Bowtie2
block has two required and one optional inputs. Set the value of the first required input IndexBaseName
to "Dmel_chr4"
, which is the base name for the reference index files, which are provided with the toolbox, for the Drosophila genome.
Because you are providing the pair-end (paired) read data, connect Reads1Files
to the Files
output of the reads1
block, which contains the first mate reads "SRR6008575_10k_1.fq" and connect Reads2Files
to the reads2
block that contains the second mate reads "SRR6008575_10k_2.fq". The Reads2Files
input is optional and is not needed if you have the single-end (unpaired) read data.
Run the pipeline.
The Bowtie2 block generates a SAM file as the output.
mappedReads = struct with fields:
SAMFile: [1×1 bioinfo.pipeline.datatype.File]
Suppose you want to provide a single end read data to the bowtie2Block
. You can update the reads1
block to read in such a single end read file and disconnect the Reads2File
optional input of bowtie2Block. The disconnect
function returns an empty string array, which means that there are no more connection between two blocks.
ans =
0×2 empty string array
Alternatively, you can use portMap to check if there are any connections between two blocks.
ans =
0×2 empty string array
You can then run the pipeline again.
mappedReads = struct with fields:
SAMFile: [1×1 bioinfo.pipeline.datatype.File]