1 use CatalystX
::GlobalContext
qw( $c );
2 # instead of linking to this, consider just embedding the translations
3 # directly into the relevant detail page
12 my $seq = get_legacy_est( $cgi ) || get_legacy_unigene( $cgi ) || get_direct_seq( $cgi )
13 or $c->throw( message => 'No sequence found.', is_error => 0 );
15 $c->forward_to_mason_view( '/tools/sixframe_translate_standalone.mas',
17 blast_url => '/tools/blast'
21 # ========= helper functions =======
26 my $est_id = $cgi->param('est_id')
29 my $est = $c->dbic_schema('SGN::Schema')
34 return Bio::PrimarySeq->new( -id => "SGN-E".($est_id+0),
35 -seq => $est->hqi_seq,
39 sub get_legacy_unigene {
42 my $unigene_id = $cgi->param('unigene_id')
45 my $unigene = $c->dbic_schema('SGN::Schema')
46 ->resultset('Unigene')
50 return Bio::PrimarySeq->new( -id => 'SGN-U'.( $unigene_id+0 ),
51 -seq => $unigene->seq,
58 my $seq = $cgi->param('seq')
61 my ( $seqid, $sequence ) = split '#', $seq;
62 return Bio::PrimarySeq->new( -id => $seqid, -seq => $seq );