[Swift-commit] r8369 - SwiftApps/ematter/galaxy

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Jan 21 12:43:42 CST 2015


Author: ketan
Date: 2015-01-21 12:43:42 -0600 (Wed, 21 Jan 2015)
New Revision: 8369

Added:
   SwiftApps/ematter/galaxy/smeagol0.swift
   SwiftApps/ematter/galaxy/swiftsmeagol0.py
Modified:
   SwiftApps/ematter/galaxy/smeagol0.xml
Log:
smeagol0

Added: SwiftApps/ematter/galaxy/smeagol0.swift
===================================================================
--- SwiftApps/ematter/galaxy/smeagol0.swift	                        (rev 0)
+++ SwiftApps/ematter/galaxy/smeagol0.swift	2015-01-21 18:43:42 UTC (rev 8369)
@@ -0,0 +1,34 @@
+type file;
+
+
+app (file _tio2auhm, file _tio2audm,
+     file _out)                  smeagol0_app ( file _au3dm, file _au3hst, file _aupsf,
+                                 file _ausicpsf, file _bulklft, file _bulkrgt,
+                                 file _inputfdf, file _opsf, file _osicpsf,
+                                 file _tipsf, file _tisicpsf )
+{
+  mpiexec  "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out;
+}
+
+file au3dm <single_file_mapper; file=arg("au3dm")>;
+file au3hst <single_file_mapper; file=arg("au3hst")>;
+file aupsf <single_file_mapper; file=arg("aupsf")>;
+file ausicpsf <single_file_mapper; file=arg("ausicpsf")>;
+file bulklft <single_file_mapper; file=arg("bulklft")>;
+file bulkrgt <single_file_mapper; file=arg("bulkrgt")>;
+file inputfdf <single_file_mapper; file=arg("inputfdf")>;
+file opsf <single_file_mapper; file=arg("opsf")>;
+file osicpsf <single_file_mapper; file=arg("osicpsf")>;
+file tipsf <single_file_mapper; file=arg("tipsf")>;
+file tisicpsf <single_file_mapper; file=arg("tisicpsf")>;
+
+file tio2auhm <single_file_mapper; file=arg("tio2auhm")>;
+file tio2audm <single_file_mapper; file=arg("tio2audm")>;
+file out <single_file_mapper; file=arg("out")>;
+
+
+(file tio2auhm, file tio2audm, file out) = smeagol0_app (file au3dm, file au3hst, file aupsf,
+                                                         file ausicpsf, file bulklft, file bulkrgt,
+                                                         file inputfdf, file opsf, file osicpsf,
+                                                         file tipsf, file tisicpsf);
+                               

Modified: SwiftApps/ematter/galaxy/smeagol0.xml
===================================================================
--- SwiftApps/ematter/galaxy/smeagol0.xml	2015-01-21 16:22:49 UTC (rev 8368)
+++ SwiftApps/ematter/galaxy/smeagol0.xml	2015-01-21 18:43:42 UTC (rev 8369)
@@ -1,31 +1,37 @@
-<tool id="swiftsmeagol_lead" name="smeagol lead swift">
+<tool id="swiftsmeagol0" name="smeagol0 swift">
     
     <!--
          ToDo:
          1. 
     -->
 
-    <description>A Galaxy tool to run the smeagol lead tool via Swift</description>
+    <description>A Galaxy tool to run the smeagol0 tool via Swift</description>
 
     <command interpreter="python">
-        swiftsmeagol_lead.py
+        swiftsmeagol0.py
+        "${_au3dm}"
+        "${_au3hst}"
         "${_aupsf}"
         "${_ausicpsf}" 
+        "${_bulklft}"
+        "${_bulkrgt}"
         "${_inputfdf}"
         "${_opsf}"
         "${_osicpsf}"
         "${_tipsf}"
         "${_tisicpsf}"
-        "${_au3dm}"
-        "${_au3hst}"
-        "${_bulklft}"
-        "${_bulkrgt}"
+        "${_tio2auhm}"
+        "${_tio2audm}"
         "${_out}"
         "${local_or_compute}"
     </command>
     <inputs>
+        <param name="_au3dm" size="30" type="data" label="au3dm" help="Select data for au3dm" />
+        <param name="_au3hst" size="30" type="data" label="au3hst" help="Select data for au3hst" />
         <param name="_aupsf" size="30" type="data" label="aupsf" help="Select data for aupsf" />
         <param name="_ausicpsf" size="30" type="data" label="ausicpsf" help="Select data for ausicpsf" />
+        <param name="bulklft" size="30" type="data" label="bulklft" help="Select data for bulklft" />
+        <param name="bulkrgt" size="30" type="data" label="bulkrgt" help="Select data for bulkrgt" />
         <param name="_inputfdf" size="30" type="data" label="inputfdf" help="Select data for inputfdf" />
         <param name="_opsf" size="30" type="data" label="opsf" help="Select data for opsf" />
         <param name="_osicpsf" size="30" type="data" label="osicpsf" help="Select data for osicpsf" />
@@ -38,11 +44,9 @@
         </param>
     </inputs>
     <outputs>
-        <data format="txt" name="_au3dm" type="data" label="au3 DM output" />
-        <data format="txt" name="_au3hst" type="data" label="au3 HST output" />
-        <data format="txt" name="_bulklft" type="data" label="bulk left output" />
-        <data format="txt" name="_bulkrgt" type="data" label="bulk right output" />
-        <data format="txt" name="_out" type="data" label="smeagol lead output" />
+        <data format="txt" name="_tio2auhm" type="data" label="tio2auhm output" />
+        <data format="txt" name="_tio2audm" type="data" label="tio2audm output" />
+        <data format="txt" name="_out" type="data" label="smeagol0 output" />
     </outputs>
     
 <help>
@@ -51,16 +55,3 @@
 </help>
 </tool>
 
-<!--
-/* == Smeagol lead app definition == */
-app (file _au3dm, file _au3hst, 
-     file _bulklft, file _bulkrgt,
-     file _out) smeagol_lead_app (file _aupsf, file _ausicpsf,
-                                  file _inputfdf, file _opsf,
-                                  file _osicpsf, file _tipsf,
-                                  file _tisicpsf)
-{
-   mpiexec "/home/heinonen/smeagol-1.2-Feb-2014/smeagol-1.2_blues/Src/smeagol-1.2_csg" stdin=@_inputfdf stdout=@_out; 
-}
-
--->

Added: SwiftApps/ematter/galaxy/swiftsmeagol0.py
===================================================================
--- SwiftApps/ematter/galaxy/swiftsmeagol0.py	                        (rev 0)
+++ SwiftApps/ematter/galaxy/swiftsmeagol0.py	2015-01-21 18:43:42 UTC (rev 8369)
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+
+"""
+This is the Swift driver for Galaxy. It receives inputs from the Swift
+Galaxy tool and depending on the options specified, builds a
+canonical Swift/K or Swift/T script and runs over specified computational
+environment.
+
+  swiftsmeagol0.py
+   "${_au3dm}"
+   "${_au3hst}"
+   "${_aupsf}"
+   "${_ausicpsf}" 
+   "${_bulklft}"
+   "${_bulkrgt}"
+   "${_inputfdf}"
+   "${_opsf}"
+   "${_osicpsf}"
+   "${_tipsf}"
+   "${_tisicpsf}"
+   "${_tio2auhm}"
+   "${_tio2audm}"
+   "${_out}"
+   "${local_or_compute}"
+
+"""
+
+import subprocess
+import sys
+import os
+import distutils.spawn
+import traceback
+import fnmatch
+import re
+from os.path import expanduser
+
+def genargs(args):
+    for a in args:
+        yield a
+
+def main():
+    myargs = genargs(sys.argv)
+    try:
+        this=next(myargs)
+        au3dm = next(myargs)
+        au3hst = next(myargs)
+        aupsf = next(myargs)
+        ausicpsf = next(myargs)
+        bulklft = next(myargs)
+        bulkrgt = next(myargs)
+        inputfdf = next(myargs)
+        opsf = next(myargs)
+        osicpsf = next(myargs)
+        tipsf = next(myargs)
+        tisicpsf = next(myargs)
+        tio2auhm = next(myargs)
+        tio2audm = next(myargs)
+        out = next(myargs)
+        local_or_compute = next(myargs)
+    except:
+        traceback.print_exc()
+        sys.exit(1)
+
+    homedir = expanduser("~")
+        
+    baseloc = homedir+"/SwiftApps/ematter/galaxy"
+    
+    #which swift
+    swift = homedir+"/swift-0.95/cog/modules/swift/dist/swift-svn/bin/swift"
+    swiftargs="-au3dm="+au3dm+" -au3hst="+au3hst+" -aupsf="+aupsf+" -ausicpsf="+ausicpsf+" -bulklft="+bulklft+" -bulkrgt="+bulkrgt+" -inputfdf="+inputfdf+" -opsf="+opsf+" -osicpsf="+osicpsf+" -tipsf="+tipsf+" -tisicpsf="+tisicpsf+" -tio2auhm="+tio2auhm+" -tio2audm="+tio2audm+" -out="+out
+    
+    siteval=baseloc+"/sites.local.xml"
+
+    if local_or_compute == "compute":
+        siteval=baseloc+"/sites.blues.xml"
+
+    #Invocation
+    exitcode=subprocess.check_call([swift, "-sites.file", siteval, "-tc.file", baseloc+"/apps", "-config", baseloc+"/cf", baseloc+"/smeagol0.swift", swiftargs])
+    #print exitcode
+
+if __name__=='__main__':
+    main()
+    


Property changes on: SwiftApps/ematter/galaxy/swiftsmeagol0.py
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list