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

Diff of /FigKernelPackages/FIGV.pm

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

revision 1.7, Wed Nov 29 09:18:26 2006 UTC revision 1.8, Wed Nov 29 15:19:19 2006 UTC
# Line 65  Line 65 
65      $meth =~ s/.*:://;      $meth =~ s/.*:://;
66    
67      my $fig = $self->{_fig};      my $fig = $self->{_fig};
68      my $args = Dumper(\@args);  #    my $args = Dumper(\@args);
69      if (wantarray)      if (wantarray)
70      {      {
71          my @res = $fig->$meth(@args);          my @res = $fig->$meth(@args);
# Line 80  Line 80 
80      }      }
81  }  }
82    
83    sub FIG
84    {
85        my($self) = @_;
86        return $self;
87    }
88    
89    
90  #  #
91  # To retrieve a subsystem in FIGV, we create the subsystem as normal via $fig->get_subsystem,  # To retrieve a subsystem in FIGV, we create the subsystem as normal via $fig->get_subsystem,
92  # then insert the row for the virtual org dir we are processing.  # then insert the row for the virtual org dir we are processing.
# Line 96  Line 103 
103      my $ss = $fig->get_subsystem($ssa);      my $ss = $fig->get_subsystem($ssa);
104      return undef unless $ss;      return undef unless $ss;
105    
106        #
107        # Find the variant code and role/peg mappings for this genome.
108        #
109    
110        open(S, "<$newGdir/Subsystems/bindings") or die "Cannot open $newGdir/Subsystems/bindings: $!";
111    
112        my %bindings;
113        while (<S>)
114        {
115            chomp;
116            my($sname, $role, $peg) = split(/\t/);
117            if ($sname eq $ssa)
118            {
119                push(@{$bindings{$role}}, $peg);
120    #           print "Pushing $role=>$peg for $ssa\n";
121            }
122            else
123            {
124    #           print "Not pushing $sname $role=>$peg for $ssa\n";
125            }
126        }
127        close(S);
128    
129        open(S, "<$newGdir/Subsystems/subsystems") or die "Cannot open $newGdir/Subsystems/subsystems: $!";
130        my $variant;
131        while (<S>)
132        {
133            chomp;
134            my($sname, $v) = split(/\t/);
135            if ($sname eq $ssa)
136            {
137                $variant = $v;
138                last;
139            }
140        }
141        close(S);
142    
143    #    warn "Adding virtual genome " . Dumper(\%bindings);
144        $ss->add_virtual_genome($self->genus_species(), $newG, $variant, \%bindings);
145    
146      return $ss;      return $ss;
147  }  }
148    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3