]> git.donarmstrong.com Git - biopieces.git/commitdiff
more KISS
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 25 Nov 2009 20:16:24 +0000 (20:16 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 25 Nov 2009 20:16:24 +0000 (20:16 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@773 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/blast_seq
code_perl/Maasha/KISS/Track.pm
www/cgi-bin/index.cgi

index e567e77954050b9566ca44e22d0cd43e363d7af7..be2b8163cd99bdc6e2f9f7f8da14d4f4bda37a0f 100755 (executable)
@@ -38,17 +38,20 @@ use Maasha::Fasta;
 
 
 my ( $options, $in, $out, $tmp_dir, $tmp_in, $tmp_out, $q_type, $s_type, $record, $entry,
-     $fh_in, $fh_out, $program );
+     $fh_in, $fh_out, $progs_ok, $program );
+
+$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 => 'blastn,blastp,tblastn,blastx,tblastx', 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 => '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 },
     ]   
 );
 
@@ -96,6 +99,12 @@ if ( $options->{ 'no_gaps' } ) {
     $options->{ 'gapped' } = 'T';
 }
 
+if ( $options->{ 'megablast' } ) {
+    $options->{ 'megablast' } = 'T';
+} else {
+    $options->{ 'megablast' } = 'F';
+}
+
 if ( $options->{ 'verbose' } )
 {
     Maasha::Common::run(
@@ -105,6 +114,7 @@ if ( $options->{ 'verbose' } )
             "-e $options->{ 'e_val' }",
             "-a $options->{ 'cpus' }",
             "-g $options->{ 'gapped' }",
+            "-n $options->{ 'megablast' }",
             "-m 8",
             "-i $tmp_in",
             "-d $options->{ 'database' }",
index 77d823b1b20f0d4799a8332ac0da410fc1e47555..65769e0365c1c0e4c171a0dfda0326ed49d0b634 100644 (file)
@@ -212,7 +212,8 @@ sub track_feature_linear
                 type       => 'rect',
                 line_width => $draw_metrics->{ 'FEAT_WIDTH' },
                 color      => $draw_metrics->{ 'FEAT_COLOR' },
-                title      => $entry->{ 'Q_ID' },
+                title      => "Q_ID: $entry->{ 'Q_ID' } S_BEG: $entry->{ 'S_BEG' } S_END: $entry->{ 'S_END' } STRAND: $entry->{ 'STRAND' }",
+                id         => $entry->{ 'Q_ID' },
                 x1         => $x1,
                 y1         => $y1,
                 x2         => $x1 + $w,
index 3d1a11832427ea3a0b36f5a194bf47ca1512fcb5..ef28e2645828b72814b8a6ef3269cb8fd223d25b 100755 (executable)
@@ -386,7 +386,11 @@ sub page
 
     $list = "LIST_" . uc $cookie->{ 'PAGE' };
 
-    if ( $cookie->{ 'PAGE' } ne 'browse' )
+    if ( $cookie->{ 'PAGE' } eq 'export' )
+    {
+        push @html, Maasha::XHTML::h2( txt => "Export", class => 'center' );
+    }
+    elsif ( $cookie->{ 'PAGE' } ne 'browse' )
     {
         push @html, Maasha::XHTML::h2( txt => "Select $cookie->{ 'PAGE' }", class => 'center' );
 
@@ -604,7 +608,7 @@ sub sec_browse
             next if $elem->{ 'type' } eq 'text';
 
             push @img, Maasha::XHTML::area(
-                href   => "www.dmi.dk",
+                href   => page_href( $cookie, "export" ) . "&Q_ID=$elem->{ 'id' }",
                 shape  => "rect",
                 coords => "$elem->{ x1 }, $elem->{ y1 }, $elem->{ x2 }, $elem->{ y2 }", title => "$elem->{ 'title' }",
             );
@@ -634,6 +638,8 @@ sub palette
         [ 130, 130, 50 ],
         [ 130, 90, 130 ],
         [ 130, 70, 70 ],
+        [ 70, 170, 130 ],
+        [ 130, 170, 50 ],
     ];
 
     $color = $palette->[ $i ];