changeset 7:0c6b14f3fefc draft

Attempt to fix installation of tool dependencies for UCSC/bigwig generation, and trap for undefined genome build.
author pjbriggs
date Tue, 21 Apr 2015 08:29:16 -0400
parents 344dd37d1704
children 78c15c0a96ae
files macs21_wrapper.py tool_dependencies.xml
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/macs21_wrapper.py	Tue Apr 21 07:53:37 2015 -0400
+++ b/macs21_wrapper.py	Tue Apr 21 08:29:16 2015 -0400
@@ -77,6 +77,10 @@
         # Determine genome build
         chrom_sizes = os.path.basename(chrom_sizes)
         genome_build = chrom_sizes.split('.')[0]
+        if genome_build == '?':
+            # No genome build set
+            sys.stderr.write("ERROR genome build not set, cannot get sizes for '?'\n")
+            sys.exit(1)
         print "Missing chrom sizes file, attempting to fetch for '%s'" % genome_build
         # Run fetchChromSizes
         chrom_sizes = os.path.join(working_dir,chrom_sizes)
--- a/tool_dependencies.xml	Tue Apr 21 07:53:37 2015 -0400
+++ b/tool_dependencies.xml	Tue Apr 21 08:29:16 2015 -0400
@@ -32,6 +32,9 @@
               <action type="chmod">
                 <file mode="755">$INSTALL_DIR/bedGraphToBigWig</file>
               </action>
+              <action type="set_environment">
+                <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR</environment_variable>
+              </action>
 	    </actions>
       </install>
   </package>