Import the pipeline and block objects needed for the example.
Create a pipeline.
Create a SeqTrim
block and add it to the pipeline.
Specify two FASTQ files as the block inputs.
Set SplitDimension
to 2 so that each file is processed independently using one process for each file.
Run the pipeline.
Get the block results. The block returns completed results for both files.
r1 = struct with fields:
TrimmedFASTQFiles: [1×2 bioinfo.pipeline.datatype.File]
NumTrimmed: [1495 1602]
NumUntrimmed: [8505 8398]
Display the total number of trimmed sequences for each file.
Next specify a third FASTQ file, which is invalid. When you run the pipeline, the block returns partial results: two completed results for two valid files and one error for the invalid file.
r2 =
Incomplete result (1x3) with the following outputs:
TrimmedFASTQFiles
NumTrimmed
NumUntrimmed
Not Run: 0
Complete: 2
Error: 1
Access the completed results of the valid files. First, use the completed
function first to get the indices of the completed processes, and then use those indices to extract the results.
You can use unwrap
to see the location of the trimmed FASTQ files.
unwrap(r2.TrimmedFASTQFiles(validIdx))'