[Swift-user] readdata or csv_mapper problem

Michael Wilde wilde at mcs.anl.gov
Mon Jul 14 14:43:16 CDT 2008


I think the readdata problem is that you need whitespace between the var 
names in line 1. The Users Guide says:

"For structs of scalars, the file should contain two rows. The first row 
should be structure member names separated by whitespace. The second row 
should be the corresponding values for each structure member, separated 
by whitespace, in the same order as the header row."

On 7/14/08 2:34 PM, Zhengxiong Hou wrote:
> Hello,
>   When I try to run many dock jobs on the osg grid sites, 
> there are problems for using readdata or csv_mapper. Please 
> help to solve it. Here is the experiment at localhost:
> 
>   The swift code is as follows:
> ***********************************************************
> [houzx at communicado dock]$ cat grid-many-dock6-string.swift
> type file;
> (file t) dockcompute (string ligandsfile, string targetlist) 
> {
>   app {
>     rundock ligandsfile targetlist stdout=@filename(t);
>     }
> }
> 
> type params {
>       string  ligandsfile;
>       string  targetlist;
> }
> 
> #params pset[] <csv_mapper;file="paramslist.txt">;
> doall(params pset[])
> {
>   foreach params,i in pset {
>   #string mol2file <single_file_mapper; file=pset
> [i].ligandsfile>;
>   #string target <single_file_mapper; file=pset
> [i].targetlist>;
>   file sout <single_file_mapper; file=@strcat
> ("/home/houzx/dock-run/databases/results/",pset
> [i].targetlist,"-",i,"-stdout.txt")>;
>   sout =  dockcompute(pset[i].ligandsfile,pset
> [i].targetlist);
>  }
> }
> 
> params p[];
> p = readdata("paramslist.txt");
> doall(p);
> ***********************************************************  
> 
> The content of "paramslist.txt" is as follows:
> [houzx at communicado dock]$ cat paramslist.txt
> ligandsfile,targetlist
> /home/houzx/dock-
> run/databases/KEGG_and_Drugs/D00180.mol2,1F9Y
> /home/houzx/dock-
> run/databases/KEGG_and_Drugs/D00181.mol2,1F9Y
> /home/houzx/dock-
> run/databases/KEGG_and_Drugs/D00182.mol2,1F9Y
> 
> 
> (1) Use this "readdata" code, and the log file is in the 
> attachment "grid-many-dock6-string-20080714-readdata.log".
> 
> [houzx at communicado dock]$ swift grid-many-dock6-string.swift
> Swift v0.4 swift-r1718 cog-r1934
> 
> RunID: 20080714-1405-letz6tcb
> Progress:
> Execution failed:
>         File header does not match type. Expected the 
> following header items (in no particular order): 
> [ligandsfile, targetlist]. Instead, the header was (again, 
> in no particular order): [ligandsfile,targetlist]
> 
> 
> (2) Use csv_mapper, and the log file is in the attachment
> "grid-many-dock6-string-20080714-1417-csv.log"
> [houzx at communicado dock]$ swift grid-many-dock6-string.swift
> Swift v0.4 swift-r1718 cog-r1934
> 
> RunID: 20080714-1417-pmo8hsjf
> Progress:
> rundock started
> rundock started
> rundock started
> rundock completed
> rundock completed
> rundock completed
> Final status:  Finished:3
> *********************************************************** 
> [houzx at communicado dock]$ cat grid-many-dock6-string.swift
> type file;
> (file t) dockcompute (string ligandsfile, string targetlist) 
> {
>   app {
>     rundock ligandsfile targetlist stdout=@filename(t);
>     }
> }
> 
> type params {
>       string  ligandsfile;
>       string  targetlist;
> }
> 
> params pset[] <csv_mapper;file="paramslist.txt">;
> 
> foreach params,i in pset {
>   file sout <single_file_mapper; file=@strcat
> ("/home/houzx/dock-run/databases/results/",pset
> [i].targetlist,"-",i,"-stdout.txt")>;
>   sout =  dockcompute(pset[i].ligandsfile,pset
> [i].targetlist);
>  }
> *********************************************************** 
> 
>  But, in the "/home/houzx/dock-run/databases/results/", the 
> created files are: null-0-stdout.txt, null-1-stdout.txt,null-
> 2-stdout.txt.
>  It means that "pset[i].targetlist" is set to be "null", not 
> the data "1F9Y" from paramslist.txt!
>  If I use "Swift v0.3", the created files are:true-0-
> stdout.txt,true-1-stdout.txt, true-2-stdout.txt.
> 
> 
> Thanks!
> B.R.
> zhengxiong
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user



More information about the Swift-user mailing list