Skip to content

Commit

Permalink
Adjusting nested map task
Browse files Browse the repository at this point in the history
  • Loading branch information
tefirman committed Dec 21, 2024
1 parent 7e789cf commit 08f70c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mapTypeTest/mapTypeTest.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ task process_nested_map {
String patient_id
Map[String, String] patient_data
Array[String] samples_for_patient
String sample_type = patient_data[samples_for_patient[0]]
}

# First get the first sample ID
String first_sample = samples_for_patient[0]
# Then use it to index the patient data
String sample_type = patient_data[first_sample]

command {
echo "Processing patient ${patient_id} with sample type ${sample_type}"
for sample in ${sep=' ' samples_for_patient}; do
Expand Down

0 comments on commit 08f70c2

Please sign in to comment.