[Swift-user] how to map arrays of structs?

Allan Espinosa aespinosa at cs.uchicago.edu
Tue Mar 31 20:39:42 CDT 2009


I know i should be using the csv_mapper. but can an extern mapper also
handle structs?

of course the script below does not compile :)

type output;
type error;

type BlastDatabase;
type BlastQuery;

type BlastResult {
  output out;
  error err;
}

(BlastResult out) blastall(BlastQuery i, BlastDatabase db[]) {
  app {
    blastall "-p" "blastp" "-F" "F" "-d" @filename(db[10])
	    "-i" @filename(i) "-v" "300" "-b" "300" "-m8"
		"-o" @filename(out) stderr=@filename(err);
  }
}

BlastDatabase pir[]
<filesys_mapper;location="/disks/ci-gpfs/swift/blast/pir",
pattern="UNIPROT_for_blast_14.0.seq*">;
BlastResult out[];
out[].out<ext;exec="mapper-out.sh">;
out[].err <ext;exec="mapper-err.sh">;
BlastQuery input[] <ext;exec="mapper-in.sh">;

BlastResult out_test <"test.out">;
BlastQuery in_test <"test.in">;

-Allan

-- 
Allan M. Espinosa <http://allan.88-mph.net/blog>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>



More information about the Swift-user mailing list