]> git.donarmstrong.com Git - biopieces.git/commitdiff
added 3 parameters to blast_seq
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 29 Nov 2012 13:12:46 +0000 (13:12 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 29 Nov 2012 13:12:46 +0000 (13:12 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2009 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/blast_seq

index ccca6d42838da08b69ce4d65719d399098f35994..e371b5cfd7ff8a0fb88472dc13b026d85708d11e 100755 (executable)
@@ -44,14 +44,17 @@ $progs_ok = 'blastn,blastp,tblastn,blastx,tblastx';
 
 $options = Maasha::Biopieces::parse_options(
     [
-        { long => 'database',  short => 'd', type => 'file',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
-        { long => 'genome',    short => 'g', type => 'genome', mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
-        { long => 'program',   short => 'p', type => 'string', mandatory => 'no', default => undef, allowed => $progs_ok, disallowed => undef },
-        { long => 'e_val',     short => 'e', type => 'float',  mandatory => 'no', default => 10,    allowed => undef,     disallowed => undef },
-        { long => 'filter',    short => 'f', type => 'string', mandatory => 'no', default => 'no',  allowed => 'yes,no',  disallowed => undef },
-        { long => 'cpus',      short => 'c', type => 'uint',   mandatory => 'no', default => 1,     allowed => undef,     disallowed => 0 },
-        { long => 'no_gaps',   short => 'G', type => 'flag',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
-        { long => 'megablast', short => 'm', type => 'flag',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
+        { long => 'database',         short => 'd', type => 'file',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
+        { long => 'genome',           short => 'g', type => 'genome', mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
+        { long => 'program',          short => 'p', type => 'string', mandatory => 'no', default => undef, allowed => $progs_ok, disallowed => undef },
+        { long => 'e_val',            short => 'e', type => 'float',  mandatory => 'no', default => 10,    allowed => undef,     disallowed => undef },
+        { long => 'filter',           short => 'f', type => 'string', mandatory => 'no', default => 'no',  allowed => 'yes,no',  disallowed => undef },
+        { long => 'cpus',             short => 'c', type => 'uint',   mandatory => 'no', default => 1,     allowed => undef,     disallowed => 0 },
+        { long => 'no_gaps',          short => 'G', type => 'flag',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
+        { long => 'megablast',        short => 'm', type => 'flag',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
+        { long => 'extend_threshold', short => 'E', type => 'uint',   mandatory => 'no', default => 0,     allowed => undef,     disallowed => undef },
+        { long => 'word_size',        short => 'W', type => 'uint',   mandatory => 'no', default => 0,     allowed => undef,     disallowed => undef },
+        { long => 'single_hit',       short => 's', type => 'flag',   mandatory => 'no', default => undef, allowed => undef,     disallowed => undef },
     ]   
 );
 
@@ -105,6 +108,12 @@ if ( $options->{ 'megablast' } ) {
     $options->{ 'megablast' } = 'F';
 }
 
+if ( $options->{ 'single_hit' } ) {
+    $options->{ 'single_hit' } = 1
+} else {
+    $options->{ 'single_hit' } = 0
+}
+
 if ( $options->{ 'verbose' } )
 {
     Maasha::Common::run(
@@ -119,6 +128,9 @@ if ( $options->{ 'verbose' } )
             "-i $tmp_in",
             "-d $options->{ 'database' }",
             "-F $options->{ 'filter' }",
+            "-P $options->{ 'single_hit' }",
+            "-W $options->{ 'word_size' }",
+            "-f $options->{ 'extend_threshold' }",
             "-o $tmp_out",
         ),
         1
@@ -136,6 +148,9 @@ else
             "-i $tmp_in",
             "-d $options->{ 'database' }",
             "-F $options->{ 'filter' }",
+            "-P $options->{ 'single_hit' }",
+            "-W $options->{ 'word_size' }",
+            "-f $options->{ 'extend_threshold' }",
             "-o $tmp_out",
             "> /dev/null 2>&1"
         ),