You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is a simple workflow that conditionally creates an index file for a FASTA reference file before using it as an input to a CWL tool.
#!/usr/bin/env bash
if ! [ -f data/reference.fa.sa ]; then
bwa index data/reference.fa
fi
for sample in samples; do
bwa mem data/reference.fa $sample > outputs/$sample.sam
done
# we have limited storage space so we
# cleanup indices once we are done
rm -f data/reference.fa.*
The step in this script that creates an index is in a conditional. In the beginner tutorial this script is presented without the conditional but this gives us an opportunity to introduce conditional steps in the intermediate tutorial.
Note - the above required some modifications to the BWA tools to run. Perhaps best to resolve common-workflow-library/bio-cwl-tools#95 and then come back to this example.
Below is a simple workflow that conditionally creates an index file for a FASTA reference file before using it as an input to a CWL tool.
The step in this script that creates an index is in a conditional. In the beginner tutorial this script is presented without the conditional but this gives us an opportunity to introduce conditional steps in the intermediate tutorial.
Here is an example workflow using conditional:
where the input can either be:
or (if the index is pre-computed)
The text was updated successfully, but these errors were encountered: