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 $sp_person_id = $c->user() ? $c->user->get_object()->get_sp_person_id() : undef;
28 my $est_id = $cgi->param('est_id')
31 my $est = $c->dbic_schema('SGN::Schema', undef, $sp_person_id)
36 return Bio::PrimarySeq->new( -id => "SGN-E".($est_id+0),
37 -seq => $est->hqi_seq,
41 sub get_legacy_unigene {
44 my $sp_person_id = $c->user() ? $c->user->get_object()->get_sp_person_id() : undef;
46 my $unigene_id = $cgi->param('unigene_id')
49 my $unigene = $c->dbic_schema('SGN::Schema', undef, $sp_person_id)
50 ->resultset('Unigene')
54 return Bio::PrimarySeq->new( -id => 'SGN-U'.( $unigene_id+0 ),
55 -seq => $unigene->seq,
62 my $seq = $cgi->param('seq')
65 my ( $seqid, $sequence ) = split '#', $seq;
66 return Bio::PrimarySeq->new( -id => $seqid, -seq => $seq );