Code Search for Developers
 
 
  

AnnotationAccount.pl from eXtensible Genome Data Broker at Krugle


Show AnnotationAccount.pl syntax highlighted

#!/usr/bin/perl
#use strict "vars";

use vars qw(
$GV
$GVportal
$PRM
@modes
$DBH
$zeroPos
$UCAcgiPATH
$IMAGEDIR
$GENSCAN_speciesModel
	    );

require 'UCAconf.pl';
require 'functions.pl';

&{$GV->{InitFunction}};

$PRM->{USERid} = &{$GV->{getUserIdFunction}};

# if from XGDB, open into new window
my $linkTarget = ($ENV{HTTP_REFERER} !~ /PlantGDB/) ? " target='_blank' ": "";
my $reloadParent = (param("lastPage") !~ /PlantGDB/) ? "<script>window.opener.submitTo('');</script>" : "";

if(!$PRM->{USERid}){
  ## Request user login for annotation creation
 bailOut("You must login first before using this tool. $GV->{dbTitle}");
}

%statusHash = (
          'aREVIEW' => '0',
	  'ACCEPTED' => '0',
	  'REJECTED' => '0'
);

$sql = "select uid,geneId,modDate,status,USERid,chr,l_pos,r_pos from user_gene_annotation where USERid = '$PRM->{USERid}' order by status, modDate desc";

$UCAref = $GV->{ADBH}->selectall_arrayref($sql);


$page .= "<span class=mainT><font style='font-weight:bold;font-size:24px'>User Contributed Annotation System<br>
&nbsp; &nbsp; &nbsp;Annotation Account - $PRM->{USERid}</font><br>
<font style='font-weight:bold;font-size:14px'>&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$specieName &nbsp;&nbsp;($GV->{dbTitle})</font><br><br>
<br><br>

<br></span><br><Br><br>";


$page .= "<table class=mainT border=1><tr class='headRow'><td>Annotation ID</td><td>Last Modified</td><td>Chromosome:Region</td><td>Edit Annotation</td><td>Genome Context View</td></tr>";
$tablePage = "";
$beenHere = 0;
for (my $i=0;$i<scalar(@$UCAref);$i++){
  my ($uid,$geneId,$modDate,$status,$owner,$chr,$l_pos,$r_pos) = @{$UCAref->[$i]}; 
  if ($statusHash{$status}==0){
    #$tablePage .= ($beenHere) ? "\n</div>\n" : "";
    $beenHere = 1;
    $tablePage .= "<tr class='catRow'><td colpsan=5>$status</td></tr>\n";
#    $tablePage .= "<div id='$status' style='height:20px;width:400px;overflow:auto;background:blue;'>\n";
    $statusHash{$status} = 1;
  }
  if ( !$$ownedRef{$uid} || ($$ownedRef{$uid} eq $PRM->{USERid})){
    $tablePage .= "<tr><td><a  target=\"_blank\" onClick=\"checkout('$uid');\">$geneId </a></td>";
  }else{
    $tablePage .= "<tr class='checked'><td>$geneId</td>";
  }
  $tablePage .= "<td>$modDate</td><td>$chr $l_pos $r_pos</td>";

  $tablePage .= "<td>".( ($status ne "ACCEPTED") ? "<a $linkTarget href='$GV->{CGIPATH}AnnotationTool.pl?uid=$uid'>edit</a>" : "")."</td>"; 
  $tablePage .= "<td><a $linkTarget href='".(&{$GV->{GenomeContextLinkFunction}}($chr,$l_pos,$r_pos))."'>context</a></td>";


  $tablePage .= "</tr>\n";
}

# for empty status
for my $k (keys %statusHash){
    if ($statusHash{$k} == 0){
      $tablePage .= "<tr><td class='catRow' colpsan=5>$k</td></tr>\n";
      $statusHash{$k} = 1;	
    }
}

#$tablePage .= "</div>";
$tablePage .= "</table><br><br><br>";

$page .= $tablePage;
print header();

$HTML_head = <<END_OF_HEAD;
<html>
<head>
<title>UCA - $PRM->{USERid}'s Account</title>
<style>

    .myLink a {background:white; color:black; text-decoration:none;}
    .myLink a:hover {background:#f4a30c; cursor:pointer;}

    .mainT {font-family:Arial;font-size:11px;padding:5;}
    .checked {font-family:Arial;font-size:11px;background-color:lightyellow}
    .headRow {font-family:Arial;font-size:14px;font-weight:bold}
    .catRow {font-family:Arial;font-size:14px;background-color:lightblue}

    
</style>
$reloadParent


</head>
<body !onLoad="openANN();"><form name='tFrm' method=post>
END_OF_HEAD

print $HTML_head;
print $page;
print "<input type=submit value='Reload Page'><br>";
print "</form></body></html>";




See more files for this project here

eXtensible Genome Data Broker

The xGDB project provides scientists with an online portal for the integration of diverse sources of genomic data. Portals allow researchers to effectively target a specific scientific question by customizing their interactions with available data.

Project homepage: http://sourceforge.net/projects/xgdb
Programming language(s): JavaScript,Perl,PHP
License: other

  GeneSeqerPortal/
    GSQportal.pl
    GSQside.pl
    UCAgs.cgi
    UCAgsview.pl
    diff.UCAgs.cgi.2.PlantGDBgs.cgi
  das/
    dasFunctions.pl
    dasLookUp.pl
    dasQuery.pl
    dasSelect.pl
    legend.pl
    makeImage.pl
    selColor.pl
  old/
    BioGraphicsExample.pl
    FeatureFileExample.pl
    UCAcheckout.pl
    baktmp.pl
    byExon.pl
    checkUser.pl
    good_makeImage.pl
    goodmakeImage.pl
    intermediate.header.pl
  originals/
    GMportal.pl
    GSQportal.pl
    GSQside.pl
    GSportal.pl
    ORFportal.pl
    ResultSummary.pl
    UCAcheckout.pl
    UCAexport.pl
    UCAexport2.pl
    UCAgsview.pl
    UCAheader.pl
    UCAview.pl
    portalHeader.pl
    portalTrap.pl
    seqExport.pl
  portals/
    GMportal.pl
    GSQportal.pl
    GSportal.pl
    ORFportal.pl
  AdminAnnotation.pl
  AnnotationAccount.pl
  AnnotationDetail.pl
  AnnotationTool.pl
  SeqEdit.pl
  TEMPLATE_UCAconf.pl
  functions.pl