[Swift-user] ext mapper int params getting coerced to float?

Michael Wilde wilde at mcs.anl.gov
Fri Aug 1 19:04:17 CDT 2008


It seems as if params to the ext mapper are getting coerced to floats.

The mapper is invoked like this:

   DockOut out < ext; exec="map.dockoutput", d=dir, r=run, n=ndir, o=i >;

When the int values i and ndir reach my mapper script they are coming in 
with ".0" after the int values:

map.docoutput: arg: 8 dir: /home/wilde/ligandatlas/dock/ runid: run06 
ndir: 5000.0 outid: 3.0
map.docoutput: arg: 8 dir: /home/wilde/ligandatlas/dock/ runid: run06 
ndir: 5000.0 outid: 1.0
map.docoutput: arg: 8 dir: /home/wilde/ligandatlas/dock/ runid: run06 
ndir: 5000.0 outid: 0.0
map.docoutput: arg: 8 dir: /home/wilde/ligandatlas/dock/ runid: run06 
ndir: 5000.0 outid: 2.0

Is thsis a result of the internal numeric types being uplifted to floats 
for to simplify type checking?

Im assuming this does not happen when ints are expanded into a command 
line inside an app{} construct, so I would have expected it would not 
happen when passed to a mapper.

--

Script is:

type File;

type DockTarget {
   File nrg;
   File bmp;
   File spheres;
}

type Mol2;
type DockOut;

// rundock-core runid ligfile outfile target grid.bmp grid.nrg 
selected.spheres

(DockOut out) rundock ( Mol2 ligand, string targetname, DockTarget t)
{
   app { rundockcore ligand out targetname t.nrg t.bmp t.spheres; }
}

string targetName = "1K4M";
string dir = "/home/wilde/ligandatlas/dock/";
string run = "run06";
int ndir = 5000;

DockTarget targetProtein<ext; exec="map.target">;

Mol2 ligand[] <filesys_mapper; 
location="/disks/gpfs/ligandatlas/databases/KEGG_and_Drugs-test", 
suffix=".mol2">;

foreach compound, i in ligand {
   DockOut out < ext; exec="map.dockoutput", d=dir, r=run, n=ndir, o=i >;
   out = rundock( compound, targetName, targetProtein );
}


--

mapper map.dockoutpout starts with:

#! /bin/bash

while getopts ":d:r:n:o:" options; do
   case $options in
     d) dir=$OPTARG;;
     r) runid=$OPTARG;;
     n) ndir=$OPTARG;;
     o) outid=$OPTARG;;
     *) echo $usage
        exit 1;;
   esac
done

echo map.docoutput: $*
echo map.docoutput: arg: $#  dir: $dir runid: $runid ndir: $ndir outid: 
$outid  >> mapper.log






More information about the Swift-user mailing list