11789: Merge branch 'master' into 11789-arvput-exclude-flag
[arvados.git] / doc / _includes / _run_command_foreach_example.liquid
index dfa14c954dd5ff12e0c068a7df5db8525c174e60..8e3dd713d14f2691c138ef7a59189b4907f75b56 100644 (file)
@@ -1,25 +1,46 @@
-"bwa-mem": {
-    "script": "run-command",
-    "script_version": "master",
-    "repository": "arvados",
-    "script_parameters": {
-        "command": [
-            "bwa",
-            "mem",
-            "-t",
-            "$(node.cores)",
-            "$(glob $(dir $(reference_collection))/*.fasta)",
-            "$(glob $(dir $(sample))/*_1.fastq)",
-            "$(glob $(dir $(sample))/*_2.fastq)"
-        ],
-        "task.stdout": "$(basename $(glob $(dir $(sample))/*_1.fastq)).sam"
-        "reference_collection": {
-            "required": true,
-            "dataclass": "Collection"
-        },
-        "samples": {
-            "required": true,
-            "dataclass": "Collection"
-        },
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+
+{
+    "name":"run-command example pipeline",
+    "components":{
+        "bwa-mem": {
+            "script": "run-command",
+            "script_version": "master",
+            "repository": "arvados",
+            "script_parameters": {
+                "command": [
+                    "bwa",
+                    "mem",
+                    "-t",
+                    "$(node.cores)",
+                    "$(glob $(dir $(reference_collection))/*.fasta)",
+                    {
+                        "foreach": "read_pair",
+                        "command": "$(read_pair)"
+                    }
+                ],
+                "task.stdout": "$(basename $(glob $(dir $(sample))/*_1.fastq)).sam",
+                "task.foreach": ["sample_subdir", "read_pair"],
+                "reference_collection": {
+                    "required": true,
+                    "dataclass": "Collection"
+                },
+                "sample": {
+                    "required": true,
+                    "dataclass": "Collection"
+                },
+                "sample_subdir": "$(dir $(sample))",
+                "read_pair": {
+                    "value": {
+                        "group": "sample_subdir",
+                        "regex": "(.*)_[12]\\.fastq(\\.gz)?$"
+                    }
+                }
+            }
+        }
     }
 }