14715: keepproxy.service checks for cluster config
[arvados.git] / crunch_scripts / arvados-bcbio-nextgen.py
index bcb2a2c4746799906b30622baf2ba1d7561fd707..b7e19ecddb67061b3addde4a82e8a4a59c969202 100755 (executable)
@@ -1,11 +1,15 @@
 #!/usr/bin/python
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
 
 import arvados
 import subprocess
-import subst
+import crunchutil.subst as subst
 import shutil
 import os
 import sys
+import time
 
 if len(arvados.current_task()['parameters']) > 0:
     p = arvados.current_task()['parameters']
@@ -94,6 +98,9 @@ details:
       # variant_regions: /path/to/your.bed
 ''')
 
+os.unlink("/usr/local/share/bcbio-nextgen/gemini_data")
+os.symlink(arvados.get_job_param_mount("gemini_data"), "/usr/local/share/bcbio-nextgen/gemini_data")
+
 os.chdir(arvados.current_task().tmpdir)
 
 rcode = subprocess.call(["bcbio_nextgen.py", "--workflow", "template", "/tmp/crunch-job/freebayes-variant.yaml", "project1",
@@ -118,6 +125,7 @@ if rcode == 0:
     print("arvados-bcbio-nextgen: start writing output to keep")
 
     done = False
+    api = arvados.api('v1')
     while not done:
         try:
             out = arvados.CollectionWriter()