[Bio] / FigKernelPackages / Observation.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Observation.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29, Thu Aug 16 16:49:16 2007 UTC revision 1.30, Tue Aug 21 17:05:00 2007 UTC
# Line 7  Line 7 
7  @EXPORT_OK = qw(get_objects);  @EXPORT_OK = qw(get_objects);
8    
9  use FIG_Config;  use FIG_Config;
10  use strict;  #use strict;
11  #use warnings;  #use warnings;
12  use HTML;  use HTML;
13    
# Line 519  Line 519 
519      my ($fid,$datasets_ref, $attributes_ref) = (@_);      my ($fid,$datasets_ref, $attributes_ref) = (@_);
520      my $fig = new FIG;      my $fig = new FIG;
521    
522      my $location_attributes = ['SignalP','CELLO','TMPRED'];      my $location_attributes = ['SignalP','CELLO','TMPRED','Phobius'];
523    
524      my $dataset = {'type' => "loc",      my $dataset = {'type' => "loc",
525                     'class' => 'SIGNALP_CELLO_TMPRED',                     'class' => 'SIGNALP_CELLO_TMPRED',
# Line 529  Line 529 
529      foreach my $attr_ref (@$attributes_ref){      foreach my $attr_ref (@$attributes_ref){
530  #    foreach my $attr_ref ($fig->get_attributes($fid,$location_attributes)) {  #    foreach my $attr_ref ($fig->get_attributes($fid,$location_attributes)) {
531          my $key = @$attr_ref[1];          my $key = @$attr_ref[1];
532          next if (($key !~ /SignalP/) && ($key !~ /CELLO/) && ($key !~ /TMPRED/));          next if (($key !~ /SignalP/) && ($key !~ /CELLO/) && ($key !~ /TMPRED/)  && ($key !~/Phobius/) );
533          my @parts = split("::",$key);          my @parts = split("::",$key);
534          my $sub_class = $parts[0];          my $sub_class = $parts[0];
535          my $sub_key = $parts[1];          my $sub_key = $parts[1];
# Line 545  Line 545 
545                  $dataset->{'signal_peptide_score'} = $value;                  $dataset->{'signal_peptide_score'} = $value;
546              }              }
547          }          }
548    
549          elsif($sub_class eq "CELLO"){          elsif($sub_class eq "CELLO"){
550              $dataset->{'cello_location'} = $sub_key;              $dataset->{'cello_location'} = $sub_key;
551              $dataset->{'cello_score'} = $value;              $dataset->{'cello_score'} = $value;
552          }          }
553    
554            elsif($sub_class eq "Phobius"){
555                if($sub_key eq "transmembrane"){
556                    $dataset->{'phobius_tm_locations'} = $value;
557                }
558                elsif($sub_key eq "signal"){
559                    $dataset->{'phobius_signal_location'} = $value;
560                }
561            }
562    
563          elsif($sub_class eq "TMPRED"){          elsif($sub_class eq "TMPRED"){
564              my @value_parts = split(/\;/,$value);              my @value_parts = split(/\;/,$value);
565              $dataset->{'tmpred_score'} = $value_parts[0];              $dataset->{'tmpred_score'} = $value_parts[0];
# Line 1327  Line 1338 
1338      $self->{cello_score} = $dataset->{'cello_score'};      $self->{cello_score} = $dataset->{'cello_score'};
1339      $self->{tmpred_score} = $dataset->{'tmpred_score'};      $self->{tmpred_score} = $dataset->{'tmpred_score'};
1340      $self->{tmpred_locations} = $dataset->{'tmpred_locations'};      $self->{tmpred_locations} = $dataset->{'tmpred_locations'};
1341        $self->{phobius_signal_location} = $dataset->{'phobius_signal_location'};
1342        $self->{phobius_tm_locations} = $dataset->{'phobius_tm_locations'};
1343    
1344      bless($self,$class);      bless($self,$class);
1345      return $self;      return $self;
# Line 1348  Line 1361 
1361      my $tmpred_score = $thing->tmpred_score;      my $tmpred_score = $thing->tmpred_score;
1362      my @tmpred_locations = split(",",$thing->tmpred_locations);      my @tmpred_locations = split(",",$thing->tmpred_locations);
1363    
1364        my $phobius_signal_location = $thing->phobius_signal_location;
1365        my @phobius_tm_locations = split(",",$thing->phobius_tm_locations);
1366    
1367      my $lines = [];      my $lines = [];
1368    
1369      #color is      #color is
# Line 1416  Line 1432 
1432          $gd->add_line($line_data, $line_config);          $gd->add_line($line_data, $line_config);
1433      }      }
1434    
1435        if((scalar(@phobius_tm_locations) > 0) || $phobius_signal_location){
1436            my $line_data =[];
1437            my $line_config = { 'title' => 'Localization Evidence',
1438                                'short_title' => 'Phobius',
1439                                'basepair_offset' => '1' };
1440    
1441            foreach my $tm_loc (@phobius_tm_locations){
1442                my $descriptions = [];
1443                my $description_phobius_tm_locations = {"title" => 'Phobius TM Location',
1444                                 "value" => $tm_loc};
1445                push(@$descriptions,$description_phobius_tm_locations);
1446    
1447                my ($begin,$end) =split("-",$tm_loc);
1448    
1449                my $element_hash = {
1450                "title" => "phobius transmembrane location",
1451                "start" => $begin + 1,
1452                "end" =>  $end + 1,
1453                "color"=> '6',
1454                "zlayer" => '4',
1455                "type" => 'bigbox',
1456                "description" => $descriptions};
1457    
1458                push(@$line_data,$element_hash);
1459    
1460            }
1461    
1462            if($phobius_signal_location){
1463                my $descriptions = [];
1464                my $description_phobius_signal_location = {"title" => 'Phobius Signal Location',
1465                                 "value" => $phobius_signal_location};
1466                push(@$descriptions,$description_phobius_signal_location);
1467    
1468    
1469                my ($begin,$end) =split("-",$phobius_signal_location);
1470                my $element_hash = {
1471                "title" => "phobius signal locations",
1472                "start" => $begin + 1,
1473                "end" =>  $end + 1,
1474                "color"=> '1',
1475                "zlayer" => '5',
1476                "type" => 'box',
1477                "description" => $descriptions};
1478                push(@$line_data,$element_hash);
1479            }
1480    
1481            $gd->add_line($line_data, $line_config);
1482        }
1483    
1484    
1485      $color = "1";      $color = "1";
1486      if($signal_peptide_score){      if($signal_peptide_score){
1487          my $line_data = [];          my $line_data = [];
# Line 1494  Line 1560 
1560    return $self->{cello_score};    return $self->{cello_score};
1561  }  }
1562    
1563    sub phobius_signal_location {
1564      my ($self) = @_;
1565      return $self->{phobius_signal_location};
1566    }
1567    
1568    sub phobius_tm_locations {
1569      my ($self) = @_;
1570      return $self->{phobius_tm_locations};
1571    }
1572    
1573    
1574    
1575  #########################################  #########################################
1576  #########################################  #########################################

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3