[ARVADOS] updated: 1875ddb761e4ae2909d2afe0718f3d0ad5f3ce0f

git at public.curoverse.com git at public.curoverse.com
Mon Jul 7 09:46:16 EDT 2014


Summary of changes:
 crunch_scripts/arvados-bcbio-nextgen.py | 105 ++++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100755 crunch_scripts/arvados-bcbio-nextgen.py

       via  1875ddb761e4ae2909d2afe0718f3d0ad5f3ce0f (commit)
       via  c5c5bc06270222f811fa75bc714fa912882ae279 (commit)
       via  4a040b5eb8e506a51376582093ad4e4c223450db (commit)
       via  42acc196ca8f5908f3cc214d5f715eb1db82c7a8 (commit)
       via  f4d92dbb53d31a3577f0b52a7b54c92762090cdc (commit)
       via  ec0278bcf9affbbe9f88c413116f6aaa2713e0f6 (commit)
       via  004bbae6c7ddfb8c952270781974591407502279 (commit)
       via  c0f1da371e57752ac48d314264fdd445a05192cb (commit)
       via  9060fbf9984b5e05081931c4c30846fd304ebced (commit)
       via  f888eee63ff962201154114efae87f3342ec2aa7 (commit)
       via  f99d19546774d0204249affe0961000043a2ad11 (commit)
       via  fa3fbd543823400c58d14df2e800a4a447bd3ee0 (commit)
       via  5f5ef11b0cfc6f6125e9e5316933156049c43b76 (commit)
      from  847459b3c257aba65df3e0cbf6777f7148542af2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1875ddb761e4ae2909d2afe0718f3d0ad5f3ce0f
Merge: 847459b c5c5bc0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 7 09:46:11 2014 -0400

    Merge branch 'bcbio-nextgen' refs #2991


commit c5c5bc06270222f811fa75bc714fa912882ae279
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 7 09:45:16 2014 -0400

    Add -n cores to run bcbio in parallel on a multicore node.

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index fe3c6eb..cb5eafe 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -102,4 +102,4 @@ os.chdir("project1/work")
 
 os.symlink("/usr/local/share/bcbio-nextgen/galaxy/tool-data", "tool-data")
 
-rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml"])
+rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml", "-n", os.environ('CRUNCH_NODE_SLOTS')])

commit 4a040b5eb8e506a51376582093ad4e4c223450db
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 20:34:20 2014 -0400

    fix bwa_index

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 8781087..fe3c6eb 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -55,19 +55,19 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool_data_table_conf.xml", "w")
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bowtie2_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))\n"))
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bwa_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_indices))"))
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bwa_index.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_index))\n"))
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/gatk_sorted_picard_index.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))\n"))
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/picard_index.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))"))
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))\n"))
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))
+    f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))\n"))
 
 with open("/tmp/crunch-job/gatk-variant.yaml", "w") as f:
     f.write('''

commit 42acc196ca8f5908f3cc214d5f715eb1db82c7a8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:48:38 2014 -0400

    Backed that out, make a symlink to tool-data instead

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index ea2e7b4..8781087 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -11,13 +11,65 @@ if len(arvados.current_task()['parameters']) > 0:
 else:
     p = arvados.current_job()['script_parameters']
 
+t = arvados.current_task().tmpdir
+
 os.unlink("/usr/local/share/bcbio-nextgen/galaxy")
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy")
 shutil.copy("/usr/local/share/bcbio-nextgen/config/bcbio_system.yaml", "/usr/local/share/bcbio-nextgen/galaxy")
 
-os.chdir(arvados.current_task().tmpdir)
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool_data_table_conf.xml", "w") as f:
+    f.write('''<tables>
+    <!-- Locations of indexes in the BWA mapper format -->
+    <table name="bwa_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bwa_index.loc" />
+    </table>
+    <!-- Locations of indexes in the Bowtie2 mapper format -->
+    <table name="bowtie2_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bowtie2_indices.loc" />
+    </table>
+    <!-- Locations of indexes in the Bowtie2 mapper format for TopHat2 to use -->
+    <table name="tophat2_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bowtie2_indices.loc" />
+    </table>
+    <!-- Location of SAMTools indexes and other files -->
+    <table name="sam_fa_indexes" comment_char="#">
+        <columns>index, value, path</columns>
+        <file path="tool-data/sam_fa_indices.loc" />
+    </table>
+    <!-- Location of Picard dict file and other files -->
+    <table name="picard_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/picard_index.loc" />
+    </table>
+    <!-- Location of Picard dict files valid for GATK -->
+    <table name="gatk_picard_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/gatk_sorted_picard_index.loc" />
+    </table>
+</tables>
+''')
+
+os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bowtie2_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bwa_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_indices))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/gatk_sorted_picard_index.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/picard_index.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))
 
-with open("gatk-variant.yaml", "w") as f:
+with open("/tmp/crunch-job/gatk-variant.yaml", "w") as f:
     f.write('''
 # Template for whole genome Illumina variant calling with GATK pipeline
 ---
@@ -40,27 +92,14 @@ details:
       # variant_regions: /path/to/your.bed
 ''')
 
-rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "gatk-variant.yaml", "project1",
+os.chdir(arvados.current_task().tmpdir)
+
+rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "/tmp/crunch-job/gatk-variant.yaml", "project1",
                          subst.do_substitution(p, "$(file $(R1))"),
                          subst.do_substitution(p, "$(file $(R2))")])
 
 os.chdir("project1/work")
 
-os.mkdir("tool-data")
-
-with open("tool-data/bowtie2_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
-
-with open("tool-data/bwa_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_indices))"))
-
-with open("tool-data/gatk_sorted_picard_index.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
-
-with open("tool-data/picard_index.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))"))
-
-with open("tool-data/sam_fa_indices.loc", "w") as f:
-    f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))
+os.symlink("/usr/local/share/bcbio-nextgen/galaxy/tool-data", "tool-data")
 
 rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml"])

commit f4d92dbb53d31a3577f0b52a7b54c92762090cdc
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:41:57 2014 -0400

    tool-data in work

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 5281737..ea2e7b4 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -11,50 +11,13 @@ if len(arvados.current_task()['parameters']) > 0:
 else:
     p = arvados.current_job()['script_parameters']
 
-t = arvados.current_task().tmpdir
-
 os.unlink("/usr/local/share/bcbio-nextgen/galaxy")
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy")
 shutil.copy("/usr/local/share/bcbio-nextgen/config/bcbio_system.yaml", "/usr/local/share/bcbio-nextgen/galaxy")
 
-os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
-
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.xml", "w") as f:
-    f.write('''<tables>
-    <!-- Locations of indexes in the BWA mapper format -->
-    <table name="bwa_indexes" comment_char="#">
-        <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/bwa_index.loc" />
-    </table>
-    <!-- Locations of indexes in the Bowtie2 mapper format -->
-    <table name="bowtie2_indexes" comment_char="#">
-        <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/bowtie2_indices.loc" />
-    </table>
-    <!-- Locations of indexes in the Bowtie2 mapper format for TopHat2 to use -->
-    <table name="tophat2_indexes" comment_char="#">
-        <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/bowtie2_indices.loc" />
-    </table>
-    <!-- Location of SAMTools indexes and other files -->
-    <table name="sam_fa_indexes" comment_char="#">
-        <columns>index, value, path</columns>
-        <file path="tool-data/sam_fa_indices.loc" />
-    </table>
-    <!-- Location of Picard dict file and other files -->
-    <table name="picard_indexes" comment_char="#">
-        <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/picard_index.loc" />
-    </table>
-    <!-- Location of Picard dict files valid for GATK -->
-    <table name="gatk_picard_indexes" comment_char="#">
-        <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/gatk_sorted_picard_index.loc" />
-    </table>
-</tables>
-''')
+os.chdir(arvados.current_task().tmpdir)
 
-with open("/tmp/crunch-job/gatk-variant.yaml", "w") as f:
+with open("gatk-variant.yaml", "w") as f:
     f.write('''
 # Template for whole genome Illumina variant calling with GATK pipeline
 ---
@@ -77,27 +40,27 @@ details:
       # variant_regions: /path/to/your.bed
 ''')
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bowtie2_indices.loc", "w") as f:
+rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "gatk-variant.yaml", "project1",
+                         subst.do_substitution(p, "$(file $(R1))"),
+                         subst.do_substitution(p, "$(file $(R2))")])
+
+os.chdir("project1/work")
+
+os.mkdir("tool-data")
+
+with open("tool-data/bowtie2_indices.loc", "w") as f:
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bwa_indices.loc", "w") as f:
+with open("tool-data/bwa_indices.loc", "w") as f:
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_indices))"))
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/gatk_sorted_picard_index.loc", "w") as f:
+with open("tool-data/gatk_sorted_picard_index.loc", "w") as f:
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/picard_index.loc", "w") as f:
+with open("tool-data/picard_index.loc", "w") as f:
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))"))
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc", "w") as f:
+with open("tool-data/sam_fa_indices.loc", "w") as f:
     f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))
 
-os.chdir(arvados.current_task().tmpdir)
-
-rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "/tmp/crunch-job/gatk-variant.yaml", "project1",
-                         subst.do_substitution(p, "$(file $(R1))"),
-                         subst.do_substitution(p, "$(file $(R2))")])
-
-os.chdir("project1/work")
-
 rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml"])

commit ec0278bcf9affbbe9f88c413116f6aaa2713e0f6
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:37:20 2014 -0400

    fix sub R1 R2

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 692ace3..5281737 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -95,8 +95,8 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc",
 os.chdir(arvados.current_task().tmpdir)
 
 rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "/tmp/crunch-job/gatk-variant.yaml", "project1",
-                         subst.do_substitution(p, "$(R1)"),
-                         subst.do_substitution(p, "$(R2)")])
+                         subst.do_substitution(p, "$(file $(R1))"),
+                         subst.do_substitution(p, "$(file $(R2))")])
 
 os.chdir("project1/work")
 

commit 004bbae6c7ddfb8c952270781974591407502279
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:35:35 2014 -0400

    refer template directly

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 070e8cd..692ace3 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -54,9 +54,7 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.
 </tables>
 ''')
 
-os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/templates")
-
-with open("/usr/local/share/bcbio-nextgen/galaxy/templates/gatk-variant.yaml", "w") as f:
+with open("/tmp/crunch-job/gatk-variant.yaml", "w") as f:
     f.write('''
 # Template for whole genome Illumina variant calling with GATK pipeline
 ---
@@ -96,7 +94,7 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc",
 
 os.chdir(arvados.current_task().tmpdir)
 
-rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "gatk-variant", "project1",
+rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "/tmp/crunch-job/gatk-variant.yaml", "project1",
                          subst.do_substitution(p, "$(R1)"),
                          subst.do_substitution(p, "$(R2)")])
 

commit c0f1da371e57752ac48d314264fdd445a05192cb
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:32:20 2014 -0400

    write template

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index feb8ce0..070e8cd 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -54,6 +54,31 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.
 </tables>
 ''')
 
+os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/templates")
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/templates/gatk-variant.yaml", "w") as f:
+    f.write('''
+# Template for whole genome Illumina variant calling with GATK pipeline
+---
+details:
+  - analysis: variant2
+    genome_build: GRCh37
+    # to do multi-sample variant calling, assign samples the same metadata / batch
+    # metadata:
+    #   batch: your-arbitrary-batch-name
+    algorithm:
+      aligner: bwa
+      mark_duplicates: picard
+      recalibrate: gatk
+      realign: gatk
+      variantcaller: gatk-haplotype
+      platform: illumina
+      quality_format: Standard
+      coverage_interval: genome
+      # for targetted projects, set the region
+      # variant_regions: /path/to/your.bed
+''')
+
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bowtie2_indices.loc", "w") as f:
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
 

commit 9060fbf9984b5e05081931c4c30846fd304ebced
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:24:44 2014 -0400

    open for writing

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index b8fb76f..feb8ce0 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -19,7 +19,7 @@ shutil.copy("/usr/local/share/bcbio-nextgen/config/bcbio_system.yaml", "/usr/loc
 
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
 
-with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.xml") as f:
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.xml", "w") as f:
     f.write('''<tables>
     <!-- Locations of indexes in the BWA mapper format -->
     <table name="bwa_indexes" comment_char="#">

commit f888eee63ff962201154114efae87f3342ec2aa7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:23:45 2014 -0400

    fix config copy

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 30a1e2f..b8fb76f 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -15,7 +15,7 @@ t = arvados.current_task().tmpdir
 
 os.unlink("/usr/local/share/bcbio-nextgen/galaxy")
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy")
-shutil.copy("/usr/local/share/bcbio-nextgen/galaxy/config/bcbio_system.yaml", "/usr/local/share/bcbio-nextgen/galaxy")
+shutil.copy("/usr/local/share/bcbio-nextgen/config/bcbio_system.yaml", "/usr/local/share/bcbio-nextgen/galaxy")
 
 os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
 

commit f99d19546774d0204249affe0961000043a2ad11
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:22:38 2014 -0400

    fixed syntax error

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
index 13b1ef9..30a1e2f 100755
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -77,4 +77,4 @@ rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "gatk-var
 
 os.chdir("project1/work")
 
-rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml")])
+rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml"])

commit fa3fbd543823400c58d14df2e800a4a447bd3ee0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 16:21:52 2014 -0400

    Fixed +x

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
old mode 100644
new mode 100755
index cd17a13..13b1ef9
--- a/crunch_scripts/arvados-bcbio-nextgen.py
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -64,7 +64,7 @@ with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/gatk_sorted_picard_in
     f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/picard_index.loc", "w") as f:
-    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_indices))"))
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_index))"))
 
 with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc", "w") as f:
     f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))

commit 5f5ef11b0cfc6f6125e9e5316933156049c43b76
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Jul 2 15:39:52 2014 -0400

    First try at bcbio-nextgen script

diff --git a/crunch_scripts/arvados-bcbio-nextgen.py b/crunch_scripts/arvados-bcbio-nextgen.py
new file mode 100644
index 0000000..cd17a13
--- /dev/null
+++ b/crunch_scripts/arvados-bcbio-nextgen.py
@@ -0,0 +1,80 @@
+#!/usr/bin/python
+
+import arvados
+import subprocess
+import subst
+import shutil
+import os
+
+if len(arvados.current_task()['parameters']) > 0:
+    p = arvados.current_task()['parameters']
+else:
+    p = arvados.current_job()['script_parameters']
+
+t = arvados.current_task().tmpdir
+
+os.unlink("/usr/local/share/bcbio-nextgen/galaxy")
+os.mkdir("/usr/local/share/bcbio-nextgen/galaxy")
+shutil.copy("/usr/local/share/bcbio-nextgen/galaxy/config/bcbio_system.yaml", "/usr/local/share/bcbio-nextgen/galaxy")
+
+os.mkdir("/usr/local/share/bcbio-nextgen/galaxy/tool-data")
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/tool_data_table_conf.xml") as f:
+    f.write('''<tables>
+    <!-- Locations of indexes in the BWA mapper format -->
+    <table name="bwa_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bwa_index.loc" />
+    </table>
+    <!-- Locations of indexes in the Bowtie2 mapper format -->
+    <table name="bowtie2_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bowtie2_indices.loc" />
+    </table>
+    <!-- Locations of indexes in the Bowtie2 mapper format for TopHat2 to use -->
+    <table name="tophat2_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/bowtie2_indices.loc" />
+    </table>
+    <!-- Location of SAMTools indexes and other files -->
+    <table name="sam_fa_indexes" comment_char="#">
+        <columns>index, value, path</columns>
+        <file path="tool-data/sam_fa_indices.loc" />
+    </table>
+    <!-- Location of Picard dict file and other files -->
+    <table name="picard_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/picard_index.loc" />
+    </table>
+    <!-- Location of Picard dict files valid for GATK -->
+    <table name="gatk_picard_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/gatk_sorted_picard_index.loc" />
+    </table>
+</tables>
+''')
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bowtie2_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(dir $(bowtie2_indices))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/bwa_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(bwa_indices))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/gatk_sorted_picard_index.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(gatk_sorted_picard_index))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/picard_index.loc", "w") as f:
+    f.write(subst.do_substitution(p, "GRCh37\tGRCh37\tHuman (GRCh37)\t$(file $(picard_indices))"))
+
+with open("/usr/local/share/bcbio-nextgen/galaxy/tool-data/sam_fa_indices.loc", "w") as f:
+    f.write(subst.do_substitution(p, "index\tGRCh37\t$(file $(sam_fa_indices))"))
+
+os.chdir(arvados.current_task().tmpdir)
+
+rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "gatk-variant", "project1",
+                         subst.do_substitution(p, "$(R1)"),
+                         subst.do_substitution(p, "$(R2)")])
+
+os.chdir("project1/work")
+
+rcode = subprocess.call(["bcbio_nextgen.py", "../config/project1.yaml")])

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list