[Swift-commit] r7147 - in SwiftApps/Swift-MapRed: . Paper blast

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Oct 9 23:10:07 CDT 2013


Author: ketan
Date: 2013-10-09 23:10:07 -0500 (Wed, 09 Oct 2013)
New Revision: 7147

Added:
   SwiftApps/Swift-MapRed/blast/
   SwiftApps/Swift-MapRed/blast/blast.swift
   SwiftApps/Swift-MapRed/blast/formatdbmapper.sh
   SwiftApps/Swift-MapRed/blast/outputmapper.sh
   SwiftApps/Swift-MapRed/blast/sites.xml
   SwiftApps/Swift-MapRed/blast/splitmapper.sh
   SwiftApps/Swift-MapRed/blast/tc.data
Modified:
   SwiftApps/Swift-MapRed/Paper/swifthadoop.tex
Log:
adding blast

Modified: SwiftApps/Swift-MapRed/Paper/swifthadoop.tex
===================================================================
--- SwiftApps/Swift-MapRed/Paper/swifthadoop.tex	2013-10-09 15:07:42 UTC (rev 7146)
+++ SwiftApps/Swift-MapRed/Paper/swifthadoop.tex	2013-10-10 04:10:07 UTC (rev 7147)
@@ -625,14 +625,6 @@
    In this context, the filepointer should be interpreted and the actual files it points
    to should be fetched if not present locally.
 
-   3. 
+3. 
    
-   
-   
 
-
-
-
-
-
-

Added: SwiftApps/Swift-MapRed/blast/blast.swift
===================================================================
--- SwiftApps/Swift-MapRed/blast/blast.swift	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/blast.swift	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,52 @@
+type fastaseq;
+type headerfile;
+type indexfile;
+type seqfile;
+
+type database 
+{
+  headerfile phr;
+  indexfile pin;
+  seqfile psq;
+}
+
+type query;
+type output;
+
+string num_partitions=@arg("n", "8");
+string program_name=@arg("p", "blastp");
+fastaseq dbin <single_file_mapper;file=@arg("d", "database")>;
+query query_file <single_file_mapper;file=@arg("i", "sequence.seq")>;
+string expectation_value=@arg("e", "0.1"); 
+output blast_output_file <single_file_mapper;file=@arg("o", "output.html")>;
+string filter_query_sequence=@arg("F", "F");
+
+fastaseq partition[] <ext;exec="splitmapper.sh",n=num_partitions>;
+
+app (fastaseq out[]) split_database (fastaseq d, string n){
+  fastasplitn @filename(d) n;
+}
+
+app (database out) formatdb (fastaseq i){
+  formatdb "-i" @filename(i);
+}
+
+app (output o) blastapp(query i, fastaseq d, string p, string e, string f, database db){
+  blastall "-p" p "-i" @filename(i) "-d" @filename(d) "-o" @filename(o) "-e" e "-T" "-F" f;
+}
+
+app (output o) blastmerge(output o_frags[]){
+  blastmerge @filename(o) @filenames(o_frags);
+}
+
+partition=split_database(dbin, num_partitions);
+
+database formatdbout[] <ext; exec="formatdbmapper.sh",n=num_partitions>;
+output out[] <ext; exec="outputmapper.sh",n=num_partitions>;
+
+foreach part,i in partition {
+  formatdbout[i] = formatdb(part);
+  out[i]=blastapp(query_file, part, program_name, expectation_value, filter_query_sequence, formatdbout[i]);
+}
+
+blast_output_file=blastmerge(out);

Added: SwiftApps/Swift-MapRed/blast/formatdbmapper.sh
===================================================================
--- SwiftApps/Swift-MapRed/blast/formatdbmapper.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/formatdbmapper.sh	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,18 @@
+#!/bin/bash
+while [ $# -gt 0 ]; do
+    case $1 in
+	-n)          n=$2;;
+	*) echo "$0: bad mapper args" 1>&2
+	    exit 1;;
+    esac
+    shift 2
+done
+
+for i in $(seq 1 $n)
+do
+    printf "[%d].phr frag%03d.phr\n" $i $i;
+    printf "[%d].pin frag%03d.pin\n" $i $i;
+    printf "[%d].psq frag%03d.psq\n" $i $i;
+done
+
+	


Property changes on: SwiftApps/Swift-MapRed/blast/formatdbmapper.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/Swift-MapRed/blast/outputmapper.sh
===================================================================
--- SwiftApps/Swift-MapRed/blast/outputmapper.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/outputmapper.sh	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,16 @@
+#!/bin/bash
+while [ $# -gt 0 ]; do
+    case $1 in
+	-n)          n=$2;;
+	*) echo "$0: bad mapper args" 1>&2
+	    exit 1;;
+    esac
+    shift 2
+done
+
+for i in $(seq 1 $n)
+do
+    printf "[%d] frag%03d.html\n" $i $i;
+done
+
+	


Property changes on: SwiftApps/Swift-MapRed/blast/outputmapper.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/Swift-MapRed/blast/sites.xml
===================================================================
--- SwiftApps/Swift-MapRed/blast/sites.xml	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/sites.xml	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,23 @@
+<config>
+  <pool handle="localhost" sysinfo="INTEL32::LINUX">
+    <gridftp url="local://localhost" />
+    <execution provider="local" url="none" />
+    <workdirectory>/home/lgadelha/swiftwork</workdirectory>
+    <!-- <profile namespace="karajan" key="maxSubmitRate">1</profile> -->
+    <profile namespace="karajan" key="jobThrottle">0.03</profile>
+    <profile namespace="swift"   key="stagingMethod">file</profile>
+  </pool>
+
+
+  <pool handle="sge-local">
+    <gridftp url="local://localhost" />
+    <execution provider="sge" url="localhost" />
+    <profile namespace="globus" key="pe">mpi1</profile> 
+    <profile namespace="globus" key="queue">linux.q</profile>
+    <profile key="jobThrottle" namespace="karajan">6.23</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local" url="none" />
+    <workdirectory>/prj/prjssi/lgadelha/swiftwork</workdirectory> 
+  </pool> 
+</config>
+

Added: SwiftApps/Swift-MapRed/blast/splitmapper.sh
===================================================================
--- SwiftApps/Swift-MapRed/blast/splitmapper.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/splitmapper.sh	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,14 @@
+#!/bin/bash
+while [ $# -gt 0 ]; do
+    case $1 in
+	-n)          n=$2;;
+	*) echo "$0: bad mapper args" 1>&2
+	    exit 1;;
+    esac
+    shift 2
+done
+for i in $(seq 1 $n)
+do
+    printf "[%d] frag%03d\n" $i $i;
+done
+


Property changes on: SwiftApps/Swift-MapRed/blast/splitmapper.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: SwiftApps/Swift-MapRed/blast/tc.data
===================================================================
--- SwiftApps/Swift-MapRed/blast/tc.data	                        (rev 0)
+++ SwiftApps/Swift-MapRed/blast/tc.data	2013-10-10 04:10:07 UTC (rev 7147)
@@ -0,0 +1,27 @@
+#This is the transformation catalog.
+#
+#It comes pre-configured with a number of simple transformations with
+#paths that are likely to work on a linux box. However, on some systems,
+#the paths to these executables will be different (for example, sometimes
+#some of these programs are found in /usr/bin rather than in /bin)
+#
+#NOTE WELL: fields in this file must be separated by tabs, not spaces; and
+#there must be no trailing whitespace at the end of each line.
+#
+# sitename  transformation  path   INSTALLED  platform  profiles
+localhost 	echo 		/bin/echo	INSTALLED	INTEL32::LINUX	null
+localhost 	cat 		/bin/cat	INSTALLED	INTEL32::LINUX	null
+localhost 	ls 		/bin/ls		INSTALLED	INTEL32::LINUX	null
+localhost 	grep 		/bin/grep	INSTALLED	INTEL32::LINUX	null
+localhost 	sort 		/bin/sort	INSTALLED	INTEL32::LINUX	null
+localhost 	paste 		/bin/paste	INSTALLED	INTEL32::LINUX	null
+localhost 	cp 		/bin/cp         INSTALLED	INTEL32::LINUX	null
+localhost 	touch 		/bin/touch      INSTALLED	INTEL32::LINUX	null
+localhost	wc		/usr/bin/wc	INSTALLED	INTEL32::LINUX	null
+localhost	sleep		/bin/sleep	null	null 	null
+localhost	blastall	/opt/local/bin/blastall		null		null		null
+localhost	fastasplitn	/Users/lgadelha/parallelblast/fastasplitn	null		null	null
+localhost	blastmerge	/Users/lgadelha/parallelblast/blastmerge	null		null	null
+localhost	formatdb	/opt/local/bin/formatdb							null		null	null
+
+




More information about the Swift-commit mailing list