[Swift-commit] r7413 - SwiftApps/Blast/v2

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Wed Dec 11 13:31:24 CST 2013


Author: wilde
Date: 2013-12-11 13:31:24 -0600 (Wed, 11 Dec 2013)
New Revision: 7413

Added:
   SwiftApps/Blast/v2/blast.swift
   SwiftApps/Blast/v2/run.sh
Removed:
   SwiftApps/Blast/v2/blast2.swift
   SwiftApps/Blast/v2/run2.sh
Modified:
   SwiftApps/Blast/v2/fblastall.sh
   SwiftApps/Blast/v2/mcs-servers.properties
   SwiftApps/Blast/v2/swift.properties
Log:
Code tidying.

Copied: SwiftApps/Blast/v2/blast.swift (from rev 7411, SwiftApps/Blast/v2/blast2.swift)
===================================================================
--- SwiftApps/Blast/v2/blast.swift	                        (rev 0)
+++ SwiftApps/Blast/v2/blast.swift	2013-12-11 19:31:24 UTC (rev 7413)
@@ -0,0 +1,49 @@
+type file;
+
+type fasta;
+type query;
+
+string blast_type      = arg("p", "blastp");
+string database        = arg("d", "nr.sub1");
+string query           = arg("q", "sequence.seq");
+string num_partitions  = arg("n", "10");
+string expectation     = arg("e", "0.1"); 
+string filter_query    = arg("F", "F");
+
+tracef("database=%s\n", database);
+
+query  query_file <single_file_mapper;file=query>;
+
+app (file dblist) split_database (string d, string n){
+  bash "-c" strcat("SPLITFRAGTEMPLATE=/tmp/db%3.3d fastasplitn ", d, " ", n, " 2>&1 ",
+                   "| grep Opening | sed -e 's/^.* //'") stdout=@dblist;
+}
+
+app (file o) fblast(fasta d, query i, string p, string e, string f){
+  fblastall @d "-p" p "-i" @i "-d" "fmtdb" "-o" @o "-e" e "-m" "0" "-F" f;
+}
+
+app (file o) blastmerge(file o_frags[]){
+  blastmerge "-t" @o filenames(o_frags);
+}
+
+# Split the database, file names into db[] array
+
+file dbparts <"dbparts">;
+dbparts=split_database(database, num_partitions);
+
+string db[] = readData(dbparts);
+trace(db);
+
+# BLAST the query against each database partition
+
+file out[];
+foreach partname,i in db {
+  fasta dbpart<single_file_mapper; file=partname>;
+  out[i]=fblast(dbpart, query_file, blast_type, expectation, filter_query);
+}
+
+# Merge the BLAST outputs
+
+file merged <single_file_mapper;file=arg("o", "merged.txt")>;
+merged = blastmerge(out);

Deleted: SwiftApps/Blast/v2/blast2.swift
===================================================================
--- SwiftApps/Blast/v2/blast2.swift	2013-12-11 19:10:19 UTC (rev 7412)
+++ SwiftApps/Blast/v2/blast2.swift	2013-12-11 19:31:24 UTC (rev 7413)
@@ -1,42 +0,0 @@
-type file;
-
-type fasta;
-type query;
-
-string num_partitions  = arg("n", "10");
-string blast_type      = arg("p", "blastp");
-string expectation     = arg("e", "0.1"); 
-string filter_query    = arg("F", "F");
-string database        = arg("d", "nr.sub1");
-string query           = arg("q", "sequence.seq");
-
-tracef("database=%s\n", database);
-
-query  query_file <single_file_mapper;file=query>;
-
-app (file dblist) split_database (string d, string n){
-  bash "-c" strcat("SPLITFRAGTEMPLATE=/tmp/db%3.3d fastasplitn ", d, " ", n, " 2>&1 ",
-                   "| grep Opening | sed -e 's/^.* //'") stdout=@dblist;
-}
-
-app (file o) fblast(fasta d, query i, string p, string e, string f){
-  fblastall @d "-p" p "-i" @i "-d" "fmtdb" "-o" @o "-e" e "-m" "0" "-F" f;
-}
-
-app (file o) blastmerge(file o_frags[]){
-  blastmerge "-t" @o filenames(o_frags);
-}
-
-file dbparts <"dbparts">;
-dbparts=split_database(database, num_partitions);
-string db[] = readData(dbparts);
-trace(db);
-
-file out[];
-foreach partname,i in db {
-  fasta dbpart<single_file_mapper; file=partname>;
-  out[i]=fblast(dbpart, query_file, blast_type, expectation, filter_query);
-}
-
-file merged <single_file_mapper;file=arg("o", "merged.txt")>;
-merged = blastmerge(out);

Modified: SwiftApps/Blast/v2/fblastall.sh
===================================================================
--- SwiftApps/Blast/v2/fblastall.sh	2013-12-11 19:10:19 UTC (rev 7412)
+++ SwiftApps/Blast/v2/fblastall.sh	2013-12-11 19:31:24 UTC (rev 7413)
@@ -1,15 +1,9 @@
 #! /bin/bash
 
-BLASTALL=/root/blast-2.2.26/bin/blastall
-FORMAT=/root/blast-2.2.26/bin/formatdb
-
 BLASTALL=blastall
 FORMAT=formatdb
 
-$FORMAT -i $1 -n $7
+$FORMAT    -i $1 -n $7
 shift
-
 $BLASTALL $*
 
-#  fblastall "-p" p "-i" @filename(i) "-d" @filename(d) "-o" @filename(o) "-e" e "-m" "0" "-F" f;
-

Modified: SwiftApps/Blast/v2/mcs-servers.properties
===================================================================
--- SwiftApps/Blast/v2/mcs-servers.properties	2013-12-11 19:10:19 UTC (rev 7412)
+++ SwiftApps/Blast/v2/mcs-servers.properties	2013-12-11 19:31:24 UTC (rev 7413)
@@ -1,32 +1,21 @@
 
 site.local {
    provider=local:local
-   jobsPerNode=1
+   jobsPerNode=4
    maxWalltime=01:00:00
    initialScore=10000
-#   filesystem=local
-   workdirectory=/home/wilde/swiftwork
+   workdirectory=/tmp/swiftwork
    jobthrottle=0.1999
 }
 
 service.mcs {
    jobsPerNode=4
-   jobThrottle=10
-   work=/home/wilde/swiftwork
-   workers=crush thwomp
+   jobThrottle=45
+   work=/tmp/swiftwork
+   workers=crush thwomp stomp crank steamroller grind churn trounce thrash vanquish
    mode=ssh
 }
 
-# app.local.fastasplitn=/root/parallelblast_2.0.9/fastasplitn
-# app.local.formatdb=/root/blast-2.2.26/bin/formatdb
-# app.local.blastall=/root/blast-2.2.26/bin/blastall
-# app.local.fblastall=/root/blast.svn/v2/fblastall.sh
-# app.local.blastmerge=/root/parallelblast_2.0.9/blastmerge
-
-#app.local.fastasplitn=fastasplitn
-#app.local.formatdb=formatdb
-#app.local.blastall=blastall
-
 site=local,mcs
 
 app.mcs.fblastall=/home/wilde/swift/demo/blast/svn/v2/fblastall.sh

Copied: SwiftApps/Blast/v2/run.sh (from rev 7404, SwiftApps/Blast/v2/run2.sh)
===================================================================
--- SwiftApps/Blast/v2/run.sh	                        (rev 0)
+++ SwiftApps/Blast/v2/run.sh	2013-12-11 19:31:24 UTC (rev 7413)
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+set -x
+
+swift blast.swift -d=$PWD/nr.sub1 -n=10

Deleted: SwiftApps/Blast/v2/run2.sh
===================================================================
--- SwiftApps/Blast/v2/run2.sh	2013-12-11 19:10:19 UTC (rev 7412)
+++ SwiftApps/Blast/v2/run2.sh	2013-12-11 19:31:24 UTC (rev 7413)
@@ -1,3 +0,0 @@
-#swift -sites.file sites.local.xml -config cf -tc.file apps blast2.swift
-
-swift blast2.swift

Modified: SwiftApps/Blast/v2/swift.properties
===================================================================
--- SwiftApps/Blast/v2/swift.properties	2013-12-11 19:10:19 UTC (rev 7412)
+++ SwiftApps/Blast/v2/swift.properties	2013-12-11 19:31:24 UTC (rev 7413)
@@ -1,35 +1,24 @@
 
 site.local {
    provider=local:local
-   jobsPerNode=1
+   jobsPerNode=4
    maxWalltime=01:00:00
    initialScore=10000
-#   filesystem=local
-   workdirectory=/home/wilde/swiftwork
+   workdirectory=$PWD/swiftwork
    jobthrottle=0.1999
 }
 
 service.mcs {
    jobsPerNode=4
-   jobThrottle=10
-   work=/home/wilde/swiftwork
-   workers=crush thwomp
+   jobThrottle=45
+   work=$PWD/swiftwork
+   workers=crush thwomp stomp crank steamroller grind churn trounce thrash vanquish
    mode=ssh
 }
 
-# app.local.fastasplitn=/root/parallelblast_2.0.9/fastasplitn
-# app.local.formatdb=/root/blast-2.2.26/bin/formatdb
-# app.local.blastall=/root/blast-2.2.26/bin/blastall
-# app.local.fblastall=/root/blast.svn/v2/fblastall.sh
-# app.local.blastmerge=/root/parallelblast_2.0.9/blastmerge
-
-#app.local.fastasplitn=fastasplitn
-#app.local.formatdb=formatdb
-#app.local.blastall=blastall
-
 site=local,mcs
 
-app.mcs.fblastall=$HOME/swift/demo/blast/svn/v2/fblastall.sh
+app.mcs.fblastall=/home/wilde/swift/demo/blast/svn/v2/fblastall.sh
 app.local.blastmerge=blastmerge
 app.local.bash=bash
 




More information about the Swift-commit mailing list