#!/usr/local/bin/perl
###############################################################################
# Program : main.cgi
# $Id: main.cgi 6972 2012-02-28 06:50:02Z dcampbel $
#
# Description : This script authenticates the user, and then
# displays the opening access page.
#
# 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);
use lib qw (../../lib/perl);
use CGI::Carp qw(fatalsToBrowser croak);
use SBEAMS::Connection qw($q $log);
use SBEAMS::Connection::DataTable;
use SBEAMS::Connection::Settings;
use SBEAMS::Connection::Tables;
use SBEAMS::Connection::TabMenu;
use SBEAMS::PeptideAtlas;
use SBEAMS::PeptideAtlas::Settings;
use SBEAMS::PeptideAtlas::Tables;
$sbeams = new SBEAMS::Connection;
$sbeamsMOD = new SBEAMS::PeptideAtlas;
$sbeamsMOD->setSBEAMS($sbeams);
###############################################################################
# Global Variables
###############################################################################
$PROG_NAME = 'MapSearch';
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=>['PeptideAtlas_user','PeptideAtlas_admin',
'PeptideAtlas_readonly', 'PeptideAtlas_exec'],
#connect_read_only=>1,
allow_anonymous_access=>1,
));
#### Read in the default input parameters
my %parameters;
my $n_params_found = $sbeams->parse_input_parameters(
q=>$q,
parameters_ref=>\%parameters
);
if ( $parameters{reset_id} && $parameters{reset_id} eq 'true' ) {
$sbeamsMOD->clearBuildSettings();
}
## get project_id to send to HTMLPrinter display
my $project_id = $sbeamsMOD->getProjectID(
atlas_build_name => $parameters{atlas_build_name},
atlas_build_id => $parameters{atlas_build_id}
);
#### Process generic "state" parameters before we start
$sbeams->processStandardParameters(parameters_ref=>\%parameters);
# $sbeams->printCGIParams($q);
#### Decide what action to take based on information so far
if ($parameters{action} eq "???") {
# Some action
} else {
$sbeamsMOD->display_page_header(project_id => $project_id);
handle_request(ref_parameters=>\%parameters);
$sbeamsMOD->display_page_footer();
}
} # 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};
#### Get the current atlas_build_id based on parameters or session
my $atlas_build_id = $sbeamsMOD->getCurrentAtlasBuildID(
parameters_ref => \%parameters,
);
if (defined($atlas_build_id) && $atlas_build_id < 0) {
#### Don't return. Let the user pick from a valid one.
#return;
}
#### Get the HTML to display the tabs
my $tabMenu = $sbeamsMOD->getTabMenu(
parameters_ref => \%parameters,
program_name => $PROG_NAME,
);
if ($sbeams->output_mode() eq 'html') {
print "
\n";
print $tabMenu->asHTML() if ($sbeams->output_mode() eq 'html');
print "
\n";
}
my $results = $q->param( 'cmd' );
$results =~ s/\s+/ /g;
$results =~ s/ $//g;
$results =~ s/\s+/,/g;
my $selected = '';
my $link = '';
my %s2u = ( Bravo => 'Q92823',
GLDN => 'Q6ZMI3',
ANK2 => 'Q01484',
GFAP => 'P14136',
ALCAM => 'Q13740',
CNTN2 => 'Q02246',
LEF1 => 'Q9UJU2',
PTPB => 'P23467',
NF => 'P21359',
CNTN1 => 'Q12860',
ANK3 => 'Q12955',
'Insulin' => 'P01308',
'TNF_alpha' => 'P01375',
'IL-15' => 'P40933',
'IL-6' => 'P05231',
'IL-23' => 'Q9NPF7',
'IL-2' => 'P60568',
'IL-1RA' => 'P18510',
'IL-12' => 'P29460',
'IL-10' => 'P22301',
'IFN_gamma' => 'P01579',
'IL-1_beta' => 'P01584',
'TGF_beta' => 'P01137,P61812,P10600',
'CD2' => 'P06729',
'A1AT' => 'P01009',
'CD3' => 'P09693,P04234,P07766,P20963',
'TCR' => 'Q13747,Q2L9S7,A7L8C5',
'CD20' => 'P11836'
);
my %title;
for my $key ( keys( %s2u ) ) {
$log->warn( qq~ symbol2sp["$key"] = "$s2u{$key}"; ~ );
$title{$key} = "Add $key ($s2u{$key}) to list";
}
my $build_id = ( $sbeams->isGuestUser() ) ? 146 : 146;
print qq~
Targets of immune intervention in type 1 diabetes
This schematic taken from Bluestone, Herold & Eisenbarth (2010) [Nature, 464, 1293] provides an overview of the pathogenesis of type 1 diabetes, highlighting a number of key pathways that are being targeted by current therapeutics. Although not exhaustive, this figure shows that both non-specific and antigen-specific therapies are being tested, which inhibit effector cells and antigen presentation as well as boost regulatory pathways.
Click on any area outlined with a dashed rectangle to add the protein(s) to the search list; click again to remove. Click SRM Atlas button to search for selected proteins in the SRM Atlas. |
|
$link Selected List |