#!/usr/local/bin/perl
###############################################################################
# $Id$
#
# SBEAMS is Copyright (C) 2000-2005 Institute for Systems Biology
# This program is governed by the terms of the GNU General Public License (GPL)
# version 2 as published by the Free Software Foundation. It is provided
# WITHOUT ANY WARRANTY. See the full description of GPL terms in the
# LICENSE file distributed with this software.
###############################################################################
###############################################################################
# Get the script set up with everything it will need
###############################################################################
use strict;
use vars qw ($q $sbeams $sbeamsMOD $PROG_NAME
$current_contact_id $current_username $glyco_query_o);
use lib qw (../../lib/perl);
use CGI::Carp qw(fatalsToBrowser croak);
use Data::Dumper;
use SBEAMS::Connection qw($q $log);
use SBEAMS::Connection::Settings;
use SBEAMS::Connection::Tables;
use SBEAMS::Connection::TabMenu;
use SBEAMS::BioLink::KeggMaps;
use SBEAMS::Glycopeptide;
use SBEAMS::Glycopeptide::Settings;
use SBEAMS::Glycopeptide::Tables;
use SBEAMS::Glycopeptide::Get_glyco_seqs;
use SBEAMS::Glycopeptide::Glyco_query;
$sbeams = new SBEAMS::Connection;
$sbeamsMOD = new SBEAMS::Glycopeptide;
$sbeamsMOD->setSBEAMS($sbeams);
$glyco_query_o = new SBEAMS::Glycopeptide::Glyco_query;
$glyco_query_o->setSBEAMS($sbeams);
my $keggmap = SBEAMS::BioLink::KeggMaps->new();
###############################################################################
# Global Variables
###############################################################################
$PROG_NAME = 'main.cgi';
my $file_name = $$ . "_glyco_predict.png";
my $tmp_img_path = "images/tmp";
my $img_file = "$PHYSICAL_BASE_DIR/$tmp_img_path/$file_name";
my $predicted_track_type = "Predicted Peptides";
my $id_track_type = 'Observed Peptides';
my $glyco_site_track = "N-Glyco Sites";
$sbeams->setSBEAMS_SUBDIR($SBEAMS_SUBDIR);
my $base_url = "$CGI_BASE_DIR/$SBEAMS_SUBDIR/peptideSearch.cgi";
my %search_types = ( gene_symbol => 'Gene Symbol',
gene_name => 'Protein Name/Alias',
swiss_prot => 'SwissProt Accession Number',
accession => 'Accession (ID)',
gene_id => 'Entrez GeneID'
);
my @search_types = qw( accession gene_name swiss_prot gene_symbol gene_id );
my $motif_type;
main();
###############################################################################
# Main Program:
#
# Call $sbeams->Authentication and stop immediately if authentication
# fails else continue.
###############################################################################
sub main
{
#### Do the SBEAMS authentication and exit if a username is not returned
exit unless ($current_username = $sbeams->Authenticate(
#permitted_work_groups_ref=>['Glycopeptide_user','Glycopeptide_admin', 'Glycopeptide_readonly'],
# connect_read_only=>1,
allow_anonymous_access=>1,
));
# for my $p ( $q->param() ) { $log->info( "$p => " . $q->param( $p ) ); }
#### Read in the default input parameters
my %parameters;
my $n_params_found = $sbeams->parse_input_parameters(
q=>$q,
parameters_ref=>\%parameters
);
if ( $parameters{unipep_build_id} ) {
my $build_id = $sbeamsMOD->get_current_build( build_id => $parameters{unipep_build_id} );
if ( $build_id != $parameters{unipep_build_id} ) {
$sbeams->set_page_message( type => 'Error', msg => 'You must log in to access specified build' );
}
}
$motif_type = $sbeamsMOD->get_current_motif_type();
## get project_id to send to HTMLPrinter display
my $project_id = $sbeams->getCurrent_project_id();
#### Process generic "state" parameters before we start
$sbeams->processStandardParameters(parameters_ref=>\%parameters);
#$sbeams->printDebuggingInfo($q);
#### Decide what action to take based on information so far
$sbeamsMOD->display_page_header(project_id => $project_id);
# $sbeams->printStyleSheet();
if ($parameters{action} eq "Show_detail_form" || $parameters{redraw_protein_sequence} == 1) {
clean_params(\%parameters);
my $ipi_data_id = $parameters{'ipi_data_id'};
print $sbeams->getGifSpacer(800);
print $sbeams->getPopupDHTML();
display_detail_form( ref_parameters => \%parameters,
ipi_data_id => $ipi_data_id );
}elsif($parameters{action} eq 'Show_hits_form'){
# $sbeamsMOD->display_page_header(project_id => $project_id);
print $sbeams->getGifSpacer(800);
print $sbeams->getPopupDHTML();
display_hits_form(ref_parameters=>\%parameters);
# $sbeamsMOD->display_page_footer();
} else {
# $sbeamsMOD->display_page_header(project_id => $project_id);
print $sbeams->getGifSpacer(800);
handle_request(ref_parameters=>\%parameters);
# $sbeamsMOD->display_page_footer();
}
$sbeamsMOD->display_page_footer(close_tables=>'NO');
} # end main
###############################################################################
# Show the main welcome page
###############################################################################
sub handle_request {
my %args = @_;
#### Process the arguments list
my $ref_parameters = $args{'ref_parameters'} || die "ref_parameters not passed";
my %parameters = %{$ref_parameters};
my $motif = $sbeamsMOD->get_current_motif_type();
my $title = '';
my $intro = '';
my %example;
my $organism = $sbeamsMOD->get_current_organism();
if ( $motif !~ /phospho/ ) {
$title = "ISB N-glycosylation peptide prediction server";
$intro =<<" END";
"The ISB N-Glyco prediction server shows all the N-linked glycosylation site contained
within predicted and identified tryptic peptides.
The Glyco score indicates how likely the site is glycosylated and the detection score
is an indication on how likely the glycosylated peptide will be detected in a MS/MS run. This is
useful for quantitating proteins of interest.
Click here
for more information."
END
%example = ( name =>'jaguar',
sym => 'jar',
seq => '%ESNGQVEDSPPVIRNGVNDASPMGPNKLISFSQVVSNIASRYLNKSENVRAQQQALGKQK%',
acc => 'FBgn0011225' );
} else {
$title = "ETH/ISB Phosphosite server";
$intro =<<" END";
Database of observed phosphorylation sites
END
if ( $organism eq 'Drosophila' ) {
%example = ( name =>'jaguar',
symbol => 'jar',
seq => '%ESNGQVEDSPPVIRNGVNDASPMGPNKLISFSQVVSNIASRYLNKSENVRAQQQALGKQK%',
esc_seq => '%25ESNGQVEDSPPVIRNGVNDASPMGPNKLISFSQVVSNIASRYLNKSENVRAQQQALGKQK%25',
acc => 'FBgn0011225' );
} elsif ( $organism eq 'Yeast' ) {
%example = ( name =>'S000000920',
synonym => 'SHO1',
symbol => 'SHO1',
seq => '%WIDSFSIKGIRPSPLENSLHRAR%',
esc_seq => '%25WIDSFSIKGIRPSPLENSLHRAR%25',
acc => 'YER118C' );
} elsif ( $organism eq 'C Elegans' ) {
%example = ( name =>'Vitellogenin',
synonym => 'AAA98720.1',
symbol => 'CE06950',
seq => '%HQLTEASGSVCK',
esc_seq => '%25HQLTEASGSVCK%25',
acc => 'C42D8.2a' );
} elsif ( $organism eq 'Human' ) {
%example = ( name =>'Insulin receptor substrate-2',
synonym => 'Insulin receptor substrate-2 (IRS-2).',
symbol => 'IRS2',
seq => '%CSHRSNTPESIAETPPARDG%',
esc_seq => '%25CSHRSNTPESIAETPPARDG%25',
acc => 'IPI00000782' );
} else {
%example = ( name =>'flutflut',
symbol => 'flut',
seq => '%ESNGQVEDSPPVIRNGVNDASPMGPNKLISFSQVVSNIASRYLNKSENVRAQQQALGKQK%',
esc_seq => '%25ESNGQVEDSPPVIRNGVNDASPMGPNKLISFSQVVSNIASRYLNKSENVRAQQQALGKQK%25',
acc => 'GOD_1' );
}
}
print
$q->table({class=>'table_setup'},
$q->Tr({class=>'rev_gray_head'},
$q->td({colspan=>2, class=>'rev_gray_head'}, $title ),
),
$q->Tr(
$q->td({colspan=>2}, $intro
)
),
$q->Tr(
$q->td({colspan=>2},'
')
),
$q->Tr({class=>'rev_gray_head'},
$q->td({colspan=>2, class=>'rev_gray_head'}, "Text Search")
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Choose Search option"),
$q->td(
$q->start_form(),
$q->popup_menu( -name=>'search_type',
-values=> [ @search_types ],
-labels => \%search_types,
-default=>['Accession'],
-size=>1,
)
)
),
$q->Tr(
$q->td({class=>'grey_bg'},'Search Term'),
$q->td(
$q->textfield(-name=>'search_term',
-value=>'',
-size=>50,
-maxlength=>80)
)
),
$q->Tr(
$q->td({class=>'blue_bg_glyco', colspan=>2}, "Wildcard character '%' can be used to broaden the search")
),
$q->Tr(
$q->td({colspan=>2}, " -- or --
")
),
$q->Tr({class=>'rev_gray_head'},
$q->td({colspan=>2, class=>'rev_gray_head'}, "Sequence Search" )
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Search by Protein Sequence"),
$q->td(
$q->textarea(-name=>'sequence_search',
-default=>'',
-rows=>8,
-columns=>50)
)
),
$q->Tr(
$q->td({class=>'blue_bg_glyco', colspan=>2}, "Sequence search wildcard is also '%', sequences will be truncated at 500 residues.")
),
),#end table
$q->submit(),
$q->reset(),
$q->hidden(-name=>'action',
-default=>['Show_hits_form']),
$q->endform();
### add an Example table
my $cgi_url = "$base_url?action=Show_hits_form&search_type";
my $seq_url = "$base_url?action=Show_hits_form;sequence_search";
my $gene_id_row = '';
$gene_id_row = $q->Tr( $q->td({class=>'grey_bg'}, "Gene ID"),
$q->td($q->a({href=>"$cgi_url=GeneID&search_term=214"}, "214") )
) if $example{gene_id};
print
"
",
$q->table(
$q->Tr(
$q->td({class=>'rev_gray_head', colspan=>2}, "Examples")
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Gene Symbol"),
$q->td($q->a({href=>"$cgi_url=gene_symbol&search_term=$example{symbol}"}, $example{symbol}) )
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Protein Name/Alias"),
$q->td($q->a({href=>"$cgi_url=gene_name&search_term=$example{name}"}, "$example{name}") )
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Accession (ID)"),
$q->td($q->a({href=>"$cgi_url=accession&search_term=$example{acc}"}, "$example{acc}") )
),
$q->Tr(
$q->td({class=>'grey_bg'}, "Protein Sequence"),
$q->td($q->a({href=>"$seq_url=$example{esc_seq}"}, "$example{seq}") )
),
$gene_id_row
);
}
###############################################################################
# Show hits form
###############################################################################
sub display_hits_form {
my %args = @_;
#### Process the arguments list
my $params = $args{'ref_parameters'} || die "ref_parameters not passed";
my $sql_data = find_hits($params);
}
###############################################################################
#find_hits
#Check the parameter and figure out what query to run
###############################################################################
sub find_hits{
my $ref_parameters = shift;
#check to see if this is a sequence or text search
my $type = check_search_params( $ref_parameters );
my $resultset = [];
if ($type eq 'text'){
$resultset = $glyco_query_o->keyword_search( %$ref_parameters );
}elsif($type eq 'sequence_search'){
$resultset = $glyco_query_o->protein_seq_query( $ref_parameters->{sequence_search} );
}else{
print_error("Cannot find correct search type to run '$type'");
}
if ( $resultset ){
if ( scalar(@$resultset) == 1 ) {
#pull out the ipi_id and directly display the details page since there is only one hit
my $href_results_info = $resultset->[0];
my $ipi_data_id = $href_results_info->{'ipi_data_id'};
display_detail_form( ipi_data_id => $ipi_data_id,
ref_parameters => $ref_parameters );
} else {
my $motif_type = $sbeamsMOD->get_current_motif_type();
if ( $motif_type eq 'phospho' ) {
print_out_phospho_hits_page(results_set_aref => $resultset,
ref_parameters => $ref_parameters);
} else {
print_out_hits_page(results_set_aref => $resultset,
ref_parameters => $ref_parameters);
}
}
}else{
my $term = $ref_parameters->{search_term} || $ref_parameters->{sequence_search};
print $q->h3( "No hits were found with the query '$term'" );
}
}
###############################################################################
#print_out_hits_page
#
###############################################################################
sub print_out_hits_page{
my %args = @_;
my @results_set = @{ $args{results_set_aref} };
my %parameters = %{ $args{ref_parameters} };
my $html;
if (exists $parameters{similarity_score} && defined $parameters{similarity_score}){
$html .= $q->p(
$q->h3("Protein Similarity Score (Percent Match) " . $parameters{similarity_score} . ""),
);
}
$html .= $q->start_table();
$html .= $q->Tr({class=>'rev_gray_head'},
$q->td('ID'),
$q->td('Protein Name'),
$q->td('Protein Symbol'),
$q->td('Identified Peptides')
);
$log->info( $html );
my $cgi_url = "$base_url?action=Show_detail_form&ipi_data_id";
my $protcnt = 0;
my $pepprotcnt = 0;
my $cutoff = $sbeamsMOD->get_current_prophet_cutoff();
my $pepcnt = 0;
my @symbols;
foreach my $h_ref (@results_set){
my $ipi_id = $h_ref->{ipi_data_id};
my $num_identified = $h_ref->{num_observed};
my $ipi_acc = $h_ref->{ipi_accession_number};
my $protein_name = nice_term_print($h_ref->{protein_name});
my $protein_sym = $h_ref->{protein_symbol};
push @symbols, $protein_sym if $protein_sym;
$protcnt++;
$pepprotcnt++ if $num_identified;
$pepcnt += $num_identified;
$html .= join( "\n", $q->Tr(
$q->td(
$q->a({href=>"$cgi_url=$ipi_id"},$ipi_acc)
),
$q->td($protein_name),
$q->td($protein_sym),
$q->td({ALIGN=>'right'},$num_identified)
)
);
}
$html .= "";
my $organism = 'human';
my $gXML = $sbeams->getGaggleXML( object => 'namelist',
type => 'direct',
name => "Gene symbols",
data => \@symbols,
start => 1,
end => 1,
organism => $organism );
$html .= "\n$gXML\n";
my $type = ( check_search_params(\%parameters) eq 'text' ) ?
$parameters{search_type} :
'sequence';
my $value = '';
if ($type eq 'sequence') {
$value = $parameters{sequence_search};
if ( length($value) > 12 ) {
$value = substr($value, 0, 12) . '...';
}
} else {
$value = $parameters{search_term};
}
my $ofwhich = "of which $pepprotcnt";
my $contain = ( $pepprotcnt > 1 ) ? 'contain' : 'contains';
if ( $pepprotcnt == $protcnt || $pepcnt == 0 ) {
$ofwhich = 'which';
}
my $stats = qq~
Your search for proteins with $type =
'$value' found $protcnt proteins $ofwhich $contain
a total of $pepcnt peptides at a prophet cutoff of $cutoff
~;
print "$stats $html";
}
###############################################################################
#nice_term_print
#put breaks into long lines
###############################################################################
sub nice_term_print{
my $info = shift;
my @html = ();
my $info = substr($info, 0, 75, '...'); #chop things down to 75 or less
my @hold = split /\s/, $info;
my $count = 0;
foreach my $term(@hold){
if ($count <= 5){
push @html, $term;
}else{
$count == 0;
push @html, "$term
";
}
}
return join " ", @html;
}
###############################################################################
#print_error
#print a simple error message
###############################################################################
sub print_error{
my $error = shift;
print $q->header,
$q->start_html,
$q->p($q->h3($error)),
$q->end_html;
exit;
}
###############################################################################
#check_search_params
#Make sure that the params only have a text search or sequence not both
###############################################################################
sub check_search_params{
my $ref_parameters = shift;
if ($ref_parameters->{search_term} =~ /\w/){
if ($ref_parameters->{sequence_search} =~ /\w/ ){
print_error("Cannot have a Text Search and Sequence Search in the same query");
}
}elsif($ref_parameters->{sequence_search} =~ /\w/ ) {
return ('sequence_search');
}
return 'text';
}
###############################################################################
#clean_params
#foreach param this script knows about make sure nothing bad is comming in from the outside
###############################################################################
sub clean_params{
my $ref_parameters = shift;
KEY:foreach my $k (keys %{$ref_parameters}){
if ($k eq 'action'){
$ref_parameters->{$k} = clean_action($ref_parameters->{$k});
}elsif($k eq 'search_type' ){
next KEY if ( $ref_parameters->{'sequence_search'} );# ignore if this is a sequnce search
($ref_parameters->{$k},$ref_parameters->{'search_term'} ) =
check_search_term(type=>$ref_parameters->{$k},
term =>$ref_parameters->{'search_term'});
}elsif($k eq 'search_term'){
next; #already scaned above
}elsif($k eq 'sequence_search'){
$ref_parameters->{$k} = clean_seq($ref_parameters->{$k});
}elsif($k eq 'ipi_data_id'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'similarity_score'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
##Parameters for re-drawing the protien map
}elsif($k eq 'Glyco Site'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'Predicted Peptide'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'Identified Peptide'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'Signal Sequence'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'Trans Membrane Seq'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'redraw_protein_sequence'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}elsif($k eq 'autorun'){
$ref_parameters->{$k} = clean_term($ref_parameters->{$k});
}else{
# Doesn't allow std sbeams params through
#print_error("Unknown Paramater passed in '$k' ")
}
}
return $ref_parameters;
}
###############################################################################
#clean_seq
#Clean the sequence to a single clean AA string, but allow wild cards to pass
###############################################################################
sub clean_seq{
my $seq = shift;
# Does this work on winders?
my @seq_lines = split/\n/, $seq;
chomp @seq_lines;
my @clean_seq = ();
foreach my $line (@seq_lines){
next if( $line =~ /^>/);
$line =~ s/[^A-Z\%]//g;
push @clean_seq, $line
}
my $seq_line = join '', @clean_seq;
$seq_line = substr($seq_line, 0, 500);
return $seq_line;
}
###############################################################################
#check_search_term
#Make sure the search term is appropriate for the search type
###############################################################################
sub check_search_term{
my %args = @_;
my $type = $args{type};
my $term = $args{term};
print_error("Must Supply A Serch Type, you gave '$type'") unless ($type);
print_error("Must Supply A Serch Term, you gave '$term'") unless ($term);
unless ( grep /^$type$/, keys(%search_types) ){
print_error("Search Type '$type' is Not vaild, please fix the problem") unless ($type);
}
my $clean_term = clean_term($term);
##Look at the different search terms and make sure the data looks ok
if ($type eq 'Gene Symbol'){
if ($clean_term =~ /\s/){
print_error("Gene Symobols Cannot have any spaces '$clean_term'");
}
}elsif($type eq 'Swiss Prot Accession Number'){
unless($clean_term =~ /^\w/){
print_error("Swiss Prot Accession Does not look good '$clean_term'");
}
}elsif($type eq 'Accession Number'){
# unless($clean_term =~ /^IPI\d+/){ print_error("IPI Accession Number does not look good '$clean_term'"); }
}
return ($type, $clean_term);
}
###############################################################################
#clean_term
#remove any bad characters
###############################################################################
sub clean_term{
my $term = shift;
$term =~ s/["'*.]//g; #Remove quotes, "*", "."
$term =~ s/^\s+//g; #Remove white space at the start
$term =~ s/\s+$//g; #Remove white space at the end
if ($term =~ /^\%$/){ #check for just a wild card search
print_error("Must provide more than just a wild card '$term' ") unless ($term);
}
#unless ( grep /^$type$/, keys(%search_types) ){
print_error("Search Term '$term' HAS BEEN DELETED") unless ($term);
#}
return $term;
}
###############################################################################
#clean_action
#Make sure this is a param we know about
#Print error if not a good param
###############################################################################
sub clean_action{
my $action_param = shift;
#Add all the possible action parameters here
my @good_actions = qw(Show_hits_form
Show_detail_form
);
if ( (grep {$_ eq $action_param} @good_actions) ){
return $action_param;
}else{
print_error("ACTION PARAMETER '$action_param' IS NOT VALID");
}
}
###############################################################################
#display_detail_form
###############################################################################
sub display_detail_form{
my %args = @_;
if ( $motif_type eq 'phospho' ) {
$log->debug( "Phospho express" );
display_phospho_detail_form( %args );
return;
}
my %parameters = %{$args{ref_parameters}};
my $ipi_data_id = $args{ipi_data_id};
my $organism = $parameters{organism};
print_error("Must provide a ipi_id to display Glyco Info. '$ipi_data_id' is not valid")unless
($ipi_data_id =~ /^\d+$/);
#go an query the db, add the peptide features and make into a big Bio::Seq object
my $glyco_o = new SBEAMS::Glycopeptide::Get_glyco_seqs( ipi_data_id => $ipi_data_id,
_sbeams => $sbeams );
my $protein_map = make_protein_map_graphic ( glyco_o => $glyco_o );
my $swiss_id = get_annotation(glyco_o => $glyco_o,
anno_type => 'swiss_prot'
);
my @prechecked = qw( sseq tmhmm glyco_site );
my $html_protein_seq = $glyco_o->get_html_protein_seq( ref_parameters => \%parameters,
prechecked => \@prechecked
);
my $protein_name = get_annotation(glyco_o => $glyco_o,
anno_type => 'protein_name'
);
my $ipi_acc = $glyco_o->ipi_accession();
my $ipi_url = $glyco_o->make_url(term=> $glyco_o->ipi_accession(),
dbxref_tag => 'EBI_IPI'
);
my $swiss_prot_url = $glyco_o->make_url(term=>$swiss_id,
dbxref_tag => 'SwissProt'
);
my $spacer = $sbeams->getGifSpacer( 600 );
my $protein_url = $glyco_o->get_atlas_link( name => $glyco_o->ipi_accession(),
type => 'image',
onmouseover => 'View Peptide Atlas information' );
## Print out the protein Information
my $prot_info = join( "\n",
$q->Tr(
$q->td({class=>'grey_header', colspan=>2}, "Protein Info"),),
$q->Tr(
$q->td({class=>'rev_gray_head'}, "ID"),
$q->td("$ipi_url [ View in Peptide Atlas: $protein_url ]")),
$q->Tr(
$q->td({class=>'rev_gray_head', nowrap=>1}, "Protein Name"),
$q->td( $protein_name )),
$q->Tr(
$q->td({class=>'rev_gray_head', nowrap=>1},
$glyco_o->linkToColumnText(display => "Protein Symbol",
title => "Protein Symbol Info",
column => "protein_symbol",
table => "GP_ipi_data"
)),
$q->td(get_annotation(glyco_o => $glyco_o,
anno_type => 'symbol'
) . $spacer
)
),
$q->Tr(
$q->td({class=>'rev_gray_head', nowrap=>1},
$glyco_o->linkToColumnText(display => "Subcellular Location",
title =>"Find More Info About the Subcellular Location Call",
column =>"cellular_location_id",
table => "GP_ipi_data"
)),
$q->td(get_annotation(glyco_o => $glyco_o,
anno_type => 'cellular_location' ) )
),
$q->Tr(
$q->td({class=>'rev_gray_head', nowrap=>1}, "Swiss Prot ID"),
$q->td($swiss_prot_url)
),
$q->Tr(
$q->td({class=>'rev_gray_head'},
$glyco_o->linkToColumnText(display => "Synonyms",
title =>"Synonyms Info",
column =>"synonyms",
table => "GP_ipi_data"
)),
$q->td(get_annotation(glyco_o => $glyco_o,
anno_type => 'synonyms'
)
)
),
$q->Tr(
$q->td({class=>'rev_gray_head', nowrap=>1}, "Protein Summary"),
$q->td(get_annotation(glyco_o => $glyco_o, anno_type => 'summary') )
)
); # End prot_info
## Display the predicted Peptide info
my ( $tr, $link ) = $sbeams->make_table_toggle( name => '_gpre_prepep',
visible => 1,
tooltip => 'Show/Hide Section',
imglink => 1,
sticky => 1 );
my $predicted_info = join( "\n",
$q->Tr(
$q->td({class=>'grey_header', colspan=>2}, "$link Predicted N-linked Glycopeptides"),
),
$q->Tr( "
| $link Protein/Peptide Map | |
| $image_html $map | |
|
|
|
~;
}
sub getCytoLink {
my %args = @_;
for my $arg ( qw( acc ) ) {
return "" unless $args{$arg};
}
$args{name} =~ s/(CG\d+)(-P.)*/$1/;
my $img = "$HTML_BASE_DIR/images/cyto_tiny.png";
my $link_base = 'getCytoscapeWebstart?apply_action=gene_list&accession=';
return "
~;
}
sub getKeggLink {
my %args = @_;
for my $arg ( qw( name ) ) {
return "" unless $args{$arg};
}
if( $args{organism} eq 'Drosophila' ) {
$args{name} =~ s/(CG\d+)(-P.)*/$1/;
$args{name} = 'Dmel' . $args{name};
}
my $img = "$HTML_BASE_DIR/images/kegg_sm.gif";
return "