[Swift-commit] r8323 - SwiftApps/dsp-swift/galaxy

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Dec 10 20:28:05 CST 2014


Author: ketan
Date: 2014-12-10 20:28:05 -0600 (Wed, 10 Dec 2014)
New Revision: 8323

Modified:
   SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py
   SwiftApps/dsp-swift/galaxy/swiftjumpdsp.xml
Log:
gal

Modified: SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py
===================================================================
--- SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py	2014-12-11 01:06:49 UTC (rev 8322)
+++ SwiftApps/dsp-swift/galaxy/swiftjumpdsp.py	2014-12-11 02:28:05 UTC (rev 8323)
@@ -5,6 +5,15 @@
 "foreach" Galaxy tool and depending on the options specified, builds a
 canonical Swift/K or Swift/T script and runs over specified computational
 environment.
+
+swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
+        "${outlist}"
+
 """
 
 import subprocess
@@ -36,29 +45,14 @@
     myargs = genargs(sys.argv)
     try:
         this=next(myargs)
-        range_or_list = next(myargs)
-        k_or_t = next(myargs)
-        sites = next(myargs)
-        swiftargs = next(myargs)
-        interpreter = next(myargs)
-        executable = next(myargs)
-        stdin = next(myargs)
-
-        if range_or_list == "list":
-            #list of items
-            listfile = next(myargs)
-            n = sum(1 for line in open(listfile))
-        else:
-            # numeric range
-            rstart = next(myargs)
-            rend = next(myargs)
-            stepsize = next(myargs)
-            n = (int(rend) - int(rstart))/int(stepsize)
-            
+        inloc = next(myargs)
+        a = next(myargs)
+        n = next(myargs)
+        p = next(myargs)
+        I = next(myargs)
         outloc = next(myargs)
         outlistfile = next(myargs)
         logfile = next(myargs)
-        stringargs = next(myargs)
     except:
         traceback.print_exc()
         sys.exit(1)

Modified: SwiftApps/dsp-swift/galaxy/swiftjumpdsp.xml
===================================================================
--- SwiftApps/dsp-swift/galaxy/swiftjumpdsp.xml	2014-12-11 01:06:49 UTC (rev 8322)
+++ SwiftApps/dsp-swift/galaxy/swiftjumpdsp.xml	2014-12-11 02:28:05 UTC (rev 8323)
@@ -8,66 +8,16 @@
          5. Add ability to run Swift/T.
          6. Let the localhost option be selected by default        
     -->
-    <description>A generic tool to run executable via Swift foreach parallel construct</description>
+    <description>A Galaxy tool to run Dsp parameter sweeps via Swift foreach parallel construct</description>
 
     <command interpreter="python">
-    #if $rangeorlist.rl == "rng" 
-        swiftforeach.py
-        "range"
-        "${k_or_t}"
-        "${site}" 
-        "${swiftargs}"
-        "${interpret}"
-        "${exec}"
-        "${stdin}"
-        "${rangeorlist.rngstart}"
-        "${rangeorlist.rend}"
-        "${rangeorlist.stepsize}"
-        "${outloc}"
-        "${logfile}"
+        swiftjumpdsp.py
+        "${inlocation}"
+        "${a}" 
+        "${n}"
+        "${p}"
+        "${I}"
         "${outlist}"
-        "${stringargs}"
-        #for $a in $filearg
-            ${a.fileargname}
-        #end for
-    #elif $rangeorlist.rl == "lst"
-        swiftforeach.py
-        "list"
-        "${k_or_t}"
-        "${site}"
-        "${swiftargs}"
-        "${interpret}"
-        "${exec}"
-        "${stdin}"
-        "${rangeorlist.listfile}"
-        "${outloc}"
-        "${logfile}"
-        "${outlist}"
-        "${stringargs}"
-        #for $a in $filearg
-            ${a.fileargname}
-        #end for
-    #else
-        swiftforeach.py
-        "drytest"
-        "${k_or_t}"
-        "${site}"
-        "${swiftargs}"
-        "${interpret}"
-        "${exec}"
-        "${stdin}"
-        "${rangeorlist.rngstart}"
-        "${rangeorlist.rend}"
-        "${rangeorlist.stepsize}"
-        "${rangeorlist.listfile}"
-        "${outloc}"
-        "${logfile}"
-        "${outlist}"
-        "${stringargs}"
-        #for $a in $filearg
-            ${a.fileargname}
-        #end for
-    #end if
     </command>
     <!--
        #if $swiftargs.mode == "advanced"
@@ -77,76 +27,15 @@
        #end if
      -->
     <inputs>
-        <param name="k_or_t" type="select" display="radio" label="choose target execution engine">
-            <option value="swiftK" selected="true">Swift/K</option>
-            <option value="swiftT" >Swift/T</option>
-        </param>
-
-        <param name="site" type="select" multiple="true" label="Execution Location" help="Multi-select list - NOTE: Swift/T option currently supports one site">
-            <option value="localhost" selected="true">Localhost</option>
-            <option value="midway">Midway</option>
-            <option value="blues">Blues</option>
-            <option value="uc3">UC3</option>
-            <option value="stampede">Stampede</option>
-            <option value="tukey">Tukey</option>
-            <option value="vesta">Vesta</option>
-            <option value="mira">Mira</option>
-        </param>
-
-        <param name="interpret" type="select" label="Execution interpreter">
-            <option value="sh">sh</option>
-            <option value="python">python</option>
-            <option value="java">java</option>
-            <option value="R">R</option>
-            <option value="matlab">matlab</option>
-        </param>
-
-        <!--<param format="sh,binexec" name="exec" type="data" label="Executable"/>-->
-        <param name="exec" type="data" label="Executable" help="select executable" />
-
-        <param name="stdin" type="data" label="Standard input file" optional="true" help="select standard input" />
-
-        <conditional name="rangeorlist">
-        <param name="rl" type="select" label="Select range or list">
-        <option value="rng">numeric range</option>
-        <option value="lst">items list</option>
-        <option value="tst">dry test</option>
-        </param>
-
-        <when value="rng">
-        <param name="rngstart" size="2" type="integer"  value="0" label="start"/>
-        <param name="rend" size="2" type="integer"  value="9" label="end"/>
-        <param name="stepsize" size="2" type="integer"  value="1" label="stepsize"/>
-        </when>
-
-        <when value="lst">
-        <param format="data" name="listfile" type="data" label="List file" help="Select list file"/>
-        </when>
-
-        <when value="tst">
-        <param name="rngstart" size="2" type="integer"  value="0" label="start"/>
-        <param name="rend" size="2" type="integer"  value="9" label="end"/>
-        <param name="stepsize" size="2" type="integer"  value="1" label="stepsize"/>
-        <param format="data" name="listfile" type="data" label="List file"/>
-        </when>
-
-        </conditional>
-        
-        <param name="stringargs" size="60" type="text" label="stringargs" help="Add application call commandline arguments here" />
-
-        <repeat name="filearg" title="file arg">
-            <param name="fileargname" type="data" label="filearg" />
-        </repeat>
-
-        <param name="swiftargs" size="60" type="text" label="swiftargs" help="Add Swift level commandline arguments" />
-
-        <param name="outloc" size="50" type="text" value="$HOME/sandbox" label="location for output files" help="Swift will write output files here on disc">
-            <sanitizer sanitize="False" />
-        </param>
+        <param name="inlocation" size="60" type="text" label="inlocation" help="Enter the path of the directory containing input data, eg. /home/ketan/farmer" />
+        <param name="a" size="60" type="text" label="aval" help="Enter the value of a"/>
+        <param name="n" size="60" type="text" label="nval" help="Enter the value of n"/>
+        <param name="p" size="60" type="text" label="pval" help="Enter the value of p"/>
+        <param name="I" size="60" type="text" label="Ival" help="Enter the value of I"/>
     </inputs>
     <outputs>
-        <data format="txt" name="logfile" type="data" label="Swift output" />
-        <data format="txt" name="outlist" type="data" label="Output list" />
+        <data format="txt" name="logfile" type="data" label="Application Output" />
+        <data format="txt" name="outlist" type="data" label="Output List" />
     </outputs>
 
     <!--
@@ -164,31 +53,7 @@
 
 **What it does**
 
-This is a generic Swift tool that runs an executable in parallel over a range of numbers or a list of items from a file.
+This is a tool to run dsp via Swift in parallel over files provided by user.
 
-Execution location allows user to declare where to run the tool. Executable can be any arbitrary executable uploaded by user.
-
-Start, end, and stepsize are integer values. Note that the stepsize cannot be
-less than 1. Optionally, user can add new arguments to be provided to the tool
-executable after the numeric argument. 
-
------
-
-**Example**
-
-Pick up an executable from the Executable list. Enter the start, end and the step size values. Enter an additional argument "hello". 
-
-If an executable is echo.sh with following line:
-
-echo $@
-
-The start, end and step is 0, 9 and 2, the executable will be invoked in parallel 5 times for n where n is 0 2 4 6 8:
-
-echo n hello
-
------
-
-For more help, see: http://swift-lang.org/tutorials/galaxy/tutorial.html
-
 </help>
 </tool>




More information about the Swift-commit mailing list