From 49915827e5d35284f24e7149d039478abd1e2139 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 25 Nov 2009 20:16:24 +0000 Subject: [PATCH] more KISS git-svn-id: http://biopieces.googlecode.com/svn/trunk@773 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/blast_seq | 26 ++++++++++++++++++-------- code_perl/Maasha/KISS/Track.pm | 3 ++- www/cgi-bin/index.cgi | 10 ++++++++-- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/bp_bin/blast_seq b/bp_bin/blast_seq index e567e77..be2b816 100755 --- a/bp_bin/blast_seq +++ b/bp_bin/blast_seq @@ -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' }", diff --git a/code_perl/Maasha/KISS/Track.pm b/code_perl/Maasha/KISS/Track.pm index 77d823b..65769e0 100644 --- a/code_perl/Maasha/KISS/Track.pm +++ b/code_perl/Maasha/KISS/Track.pm @@ -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, diff --git a/www/cgi-bin/index.cgi b/www/cgi-bin/index.cgi index 3d1a118..ef28e26 100755 --- a/www/cgi-bin/index.cgi +++ b/www/cgi-bin/index.cgi @@ -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 ]; -- 2.39.2