This is a general WDL question: Is there a way to use a subset of array (generated by a scatter job) as input for the next task?
Example 1: Somatic variant calling from a set of tumor/normal samples. In some cases, a normal sample could be used for several tumor samples. So I want to scatter a subworkflow to generate bam files as an Array[File]. Then based on tumor/normal pair info, I want to subset the Array and use it as input for Mutect2 workflow.
Example 2: A RNAseq experiment contain samples in several groups: for example, 9 samples in 3 groups: A1, A2, A3, B1, B2, B3, C1, C2, C3. The first subworkflow would be scattered to do alignment and feature count. The outcome would be a Arrray[File] containing all feature count files. Then I want to do pairwise differential analysis, so I need to use a subset of the Array as the input for the next subworkflow. Since the number of groups and samples could be vary from time to time, I couldn't hard code the index.
Please sign in to leave a comment.