Merge branch '4042-run-command-MxN' of git.curoverse.com:arvados into 4042-run-comman...
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 8 Oct 2014 18:50:12 +0000 (14:50 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 8 Oct 2014 18:50:12 +0000 (14:50 -0400)
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

crunch_scripts/run-command
doc/_includes/_run_command_foreach_example.liquid
doc/_includes/_run_command_simple_example.liquid

index 030a93a616d8160e303462180fe6f9ea4d8b383d..7e86e9d7911e3b90e12eda60e3ce0ec053b84457 100755 (executable)
@@ -56,8 +56,9 @@ else:
     jobp = json.loads(args.job_parameters)
     os.environ['JOB_UUID'] = 'zzzzz-8i9sb-1234567890abcde'
     os.environ['TASK_UUID'] = 'zzzzz-ot0gb-1234567890abcde'
-    os.environ['CRUNCH_SRC'] = '/tmp/crunch-src'
-    os.environ['TASK_KEEPMOUNT'] = '/keep'
+    os.environ['CRUNCH_SRC'] = '/tmp/crunche-src'
+    if 'TASK_KEEPMOUNT' not in os.environ:
+        os.environ['TASK_KEEPMOUNT'] = '/keep'
 
 links = []
 
index dfa14c954dd5ff12e0c068a7df5db8525c174e60..828499f51f1ba41b0fa521796ff4445800802d77 100644 (file)
@@ -1,25 +1,44 @@
-"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"
-        },
+{
+    "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)"
+                    },
+                    "$(glob $(dir $(sample))/*_1.fastq)",
+                    "$(glob $(dir $(sample))/*_2.fastq)"
+                ],
+                "task.stdout": "$(basename $(glob $(dir $(sample))/*_1.fastq)).sam",
+                "task.foreach": ["sample_subdir", "read_pair"],
+                "reference_collection": "2463fa9efeb75e099685528b3b9071e0+438",
+                "samples": "df45f4be79668b6d3d974e24f78e766f+149",
+                "sample_subdir": "$(dir $(samples))",
+                "read_pair": {
+                    "group": "sample_subdir",
+                    "regex": "(.*)_[12]\\.fastq(\\.gz)?$"
+                }
+            }
+        }
     }
 }
+
+
+                "reference_collection": {
+                    "required": true,
+                    "dataclass": "Collection"
+                },
+                "sample": {
+                    "required": true,
+                    "dataclass": "Collection"
+                }
index dfa14c954dd5ff12e0c068a7df5db8525c174e60..abd00715038a55cb799e0b8e7f6e68387277349a 100644 (file)
@@ -1,25 +1,30 @@
-"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"
-        },
+{
+    "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)",
+                    "$(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"
+                },
+                "sample": {
+                    "required": true,
+                    "dataclass": "Collection"
+                }
+            }
+        }
     }
 }