#!/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

~; } # end showMainPage my $foo = qq~
TNF Alpha IL-15 IL-6 CD3 CD20 CD2 IL-23 IL-12 TGF-Beta IL-10 T-Cell Receptor IL-1 Beta Interferon Gamma IL-1 Receptor Antagonist Insulin IL-2 Alpha-1 Anti-trypsin Image Map
~; __DATA__ a.LINK0 {left:773px; top:46px; background:transparent;} a.LINK0 {display:block; width:115px; height:0; padding-top:52px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK0:hover {background:transparent; border:2px dashed black; color:black;} a.LINK1 {left:855px; top:0px; background:transparent;} a.LINK1 {display:block; width:115px; height:0; padding-top:45px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK1:hover {background:transparent; border:2px dashed black; color:black;} a.LINK2 {left:960px; top:38px; background:transparent;} a.LINK2 {display:block; width:93px; height:0; padding-top:51px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK2:hover {background:transparent; border:2px dashed black; color:black;} a.LINK3 {left:340px; top:397px; background:transparent;} a.LINK3 {display:block; width:93px; height:0; padding-top:51px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK3:hover {background:transparent; border:2px dashed black; color:black;} a.LINK4 {left:91px; top:438px; background:transparent;} a.LINK4 {display:block; width:85px; height:0; padding-top:68px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK4:hover {background:transparent; border:1px dashed black; color:black;} a.LINK5 {left:714px; top:401px; background:transparent;} a.LINK5 {display:block; width:99px; height:0; padding-top:64px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK5:hover {background:transparent; border:1px dashed black; color:black;} a.LINK6 {left:1074px; top:192px; background:transparent;} a.LINK6 {display:block; width:94px; height:0; padding-top:56px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK6:hover {background:transparent; border:1px dashed black; color:black;} a.LINK7 {left:1102px; top:240px; background:transparent;} a.LINK7 {display:block; width:85px; height:0; padding-top:50px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK7:hover {background:transparent; border:1px dashed black; color:black;} a.LINK8 {left:450px; top:584px; background:transparent;} a.LINK8 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK8:hover {background:transparent; border:1px dashed black; color:black;} a.LINK9 {left:381px; top:583px; background:transparent;} a.LINK9 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK9:hover {background:transparent; border:1px dashed black; color:black;} a.LINK10 {left:243px; top:437px; background:transparent;} a.LINK10 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK10:hover {background:transparent; border:1px dashed black; color:black;} a.LINK11 {left:743px; top:157px; background:transparent;} a.LINK11 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK11:hover {background:transparent; border:1px dashed black; color:black;} a.LINK12 {left:719px; top:231px; background:transparent;} a.LINK12 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK12:hover {background:transparent; border:1px dashed black; color:black;} a.LINK13 {left:651px; top:161px; background:transparent;} a.LINK13 {display:block; width:77px; height:0; padding-top:69px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK13:hover {background:transparent; border:1px dashed black; color:black;} a.LINK14 {left:23px; top:228px; background:transparent;} a.LINK14 {display:block; width:88px; height:0; padding-top:86px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK14:hover {background:transparent; border:1px dashed black; color:black;} a.LINK15 {left:525px; top:436px; background:transparent;} a.LINK15 {display:block; width:81px; height:0; padding-top:75px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK15:hover {background:transparent; border:1px dashed black; color:black;} a.LINK16 {left:1040px; top:408px; background:transparent;} a.LINK16 {display:block; width:140px; height:0; padding-top:50px; overflow:hidden; position:absolute; border:1px dashed gray;} a.LINK16:hover {background:transparent; border:1px dashed black; color:black;}