From 08f70c2545d36cd5e29080ed5eb6884762577980 Mon Sep 17 00:00:00 2001 From: tefirman Date: Sat, 21 Dec 2024 09:10:48 -0800 Subject: [PATCH] Adjusting nested map task --- mapTypeTest/mapTypeTest.wdl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mapTypeTest/mapTypeTest.wdl b/mapTypeTest/mapTypeTest.wdl index 6f96bf1..f17ec17 100644 --- a/mapTypeTest/mapTypeTest.wdl +++ b/mapTypeTest/mapTypeTest.wdl @@ -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