[Bio] / FortyEight / SeedExport.pm Repository:
ViewVC logotype

Diff of /FortyEight/SeedExport.pm

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

revision 1.3, Wed Jan 31 22:10:06 2007 UTC revision 1.4, Fri Feb 2 20:58:00 2007 UTC
# Line 4  Line 4 
4    
5  use strict;  use strict;
6  use FIG;  use FIG;
7    use FIG_Config;
8  use FIGV;  use FIGV;
9  use URI::Escape;  use URI::Escape;
10  use Bio::FeatureIO;  use Bio::FeatureIO;
# Line 99  Line 100 
100          $bio->{$contig}->add_SeqFeature($feature);          $bio->{$contig}->add_SeqFeature($feature);
101      }      }
102    
103        # get the functional role name -> GO file
104        open(FH, $FIG_Config::data . "/Ontologies/GO/fr2go") or die "could not open fr2go";
105        my $fr2go;
106        while (<FH>) {
107          chomp;
108          my ($fr, $go) = split /\t/;
109          $fr2go->{$fr} = $go;
110        }
111        close FH;
112    
113      # get the pegs      # get the pegs
114      foreach my $peg (sort { &FIG::by_fig_id($a,$b) } $fig->pegs_of($genome), $fig->rnas_of($genome)) {      foreach my $peg (sort { &FIG::by_fig_id($a,$b) } $fig->pegs_of($genome), $fig->rnas_of($genome)) {
115          my $note;          my $note;
116          my $func = $fig->function_of($peg, $user);          my $func = $fig->function_of($peg, $user);
117    
118            # check for a GO number
119            if (exists($fr2go->{$func})) {
120              push @{$note->{"Dbxref"}}, $fr2go->{$func};
121            }
122    
123          # parse out the ec number if there is one          # parse out the ec number if there is one
124          my $ec;          my $ec;
125          if ($func =~ /E\.*C\.*\s+(\d+|-)\.(\d+|-)\.(\d+|-)\.(\d+|-)/) {          if ($func =~ /E\.*C\.*\s+(\d+|-)\.(\d+|-)\.(\d+|-)\.(\d+|-)/) {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3