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

Diff of /FigKernelPackages/FIG.pm

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

revision 1.121, Sun Jun 27 22:49:49 2004 UTC revision 1.122, Mon Jun 28 20:11:14 2004 UTC
# Line 3421  Line 3421 
3421    
3422  #  #
3423  # Looks up and returns assignments made; return is a list of  # Looks up and returns assignments made; return is a list of
3424  # tuples [peg, date, assignment, who]  # tuples [peg, assignment, date, who]
3425  #  #
3426    
3427  sub assignments_made_full {  sub assignments_made_full {
# Line 3487  Line 3487 
3487      return @assignments;      return @assignments;
3488  }  }
3489    
3490    sub assignments_made_for_protein {
3491        my($self, $fid) = @_;
3492        my($relational_db_response,$entry,$fileno,$seek,$len,$ann);
3493        my($epoch_date,$when,%sofar,$x);
3494    
3495        my @assignments = ();
3496        my $rdbH = $self->db_handle;
3497    
3498        $relational_db_response = $rdbH->SQL("SELECT fid, dateof, fileno, seek, len  FROM annotation_seeks WHERE (fid = '$fid')");
3499    
3500        if ($relational_db_response && (@$relational_db_response > 0))
3501        {
3502            foreach $entry (@$relational_db_response)
3503            {
3504                ($fid,$when,$fileno,$seek,$len) = @$entry;
3505                if ($len < 4)
3506                {
3507                    print STDERR "BAD: fid=$fid when=$when fileno=$fileno seek=$seek len=$len\n";
3508                    next;
3509                }
3510                $ann = $self->read_annotation($fileno,$seek,$len);
3511    
3512                if (my ($peg, $when, $who, $what, $func) =
3513                    $ann =~ /^(fig\|\d+\.\d+\.peg\.\d+)\n(\d+)\n(\S+)\nSet ([^\n]*)function[^\n]*\n(\S[^\n]+\S)/s)
3514                {
3515                    push(@assignments, [$peg, $when, $who, $what, $func]);
3516                }
3517            }
3518        }
3519        return @assignments;
3520    }
3521    
3522  =pod  =pod
3523    
3524  =head1 annotations_made  =head1 annotations_made
# Line 5236  Line 5268 
5268          foreach $peg (sort { &FIG::by_fig_id($a,$b) } keys(%seqs))          foreach $peg (sort { &FIG::by_fig_id($a,$b) } keys(%seqs))
5269          {          {
5270              my @aliases = grep { $_ =~ /^(sp\||gi\||pirnr\||kegg\||N[PGZ]_)/ } $self->feature_aliases($peg);              my @aliases = grep { $_ =~ /^(sp\||gi\||pirnr\||kegg\||N[PGZ]_)/ } $self->feature_aliases($peg);
5271              push(@$spreadsheet,join("\t",($peg,join(",",@aliases),$self->genus_species($self->genome_of($peg)),scalar $self->function_of($peg))) . "\n");  
5272                my $alias_txt = join(",",@aliases);
5273                my $gs_txt = $self->genus_species($self->genome_of($peg));
5274                my $func_txt = scalar $self->function_of($peg);
5275    
5276                push(@$spreadsheet, join("\t", ($peg,
5277                                                $alias_txt,
5278                                                $gs_txt,
5279                                                $func_txt)) . "\n");
5280          }          }
5281          push(@$spreadsheet,"//\n");          push(@$spreadsheet,"//\n");
5282    

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3