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

Diff of /FigKernelPackages/PinnedRegions.pm

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

revision 1.29, Tue Mar 16 16:01:54 2010 UTC revision 1.30, Fri Apr 2 09:42:27 2010 UTC
# Line 84  Line 84 
84      if ( @{ $pin_desc->{'pegs'} } > 1 )      if ( @{ $pin_desc->{'pegs'} } > 1 )
85      {      {
86          # Input already contains list of pegs, no need for expansion          # Input already contains list of pegs, no need for expansion
87            if ($pin_desc->{'pegs'}->[0] =~ /^\d/) {
88                @pegs = @{ $pin_desc->{'pegs'} };
89            } else {
90          @pegs = grep {$ok_genome_id{$fig->genome_of($_)}} @{ $pin_desc->{'pegs'} };          @pegs = grep {$ok_genome_id{$fig->genome_of($_)}} @{ $pin_desc->{'pegs'} };
91      }      }
92        }
93      else      else
94      {      {
95          # Get PCH pinned pegs          # Get PCH pinned pegs
# Line 383  Line 387 
387    
388      foreach my $peg ( @$pinned_pegs )      foreach my $peg ( @$pinned_pegs )
389      {      {
390          my $genome = $fig->genome_of($peg);          my $genome;
391          my $loc;          my $loc;
392          if ($peg =~ /^fig\|\d+\.\d+\.(.+\_\d+\_\d+)$/) {          if ($peg =~ /^(fig\|)*(\d+\.\d+)[\.\:]{1}(.+\_\d+\_\d+)$/) {
393              $loc = $1;              $loc = $3;
394                $genome = $2;
395          } else {          } else {
396              $loc = $fig->feature_location($peg);              $loc = $fig->feature_location($peg);
397                $genome = $fig->genome_of($peg);
398          }          }
399          # We only proceed if a location was found. Failure to find a location indicates          # We only proceed if a location was found. Failure to find a location indicates
400          # that the feature is deleted.          # that the feature is deleted.
# Line 794  Line 800 
800      {      {
801          # Input is a peg-list, which may be split into multiple sets -- the largest will be called the          # Input is a peg-list, which may be split into multiple sets -- the largest will be called the
802          # "pinned" set.          # "pinned" set.
803          my $i;          my $i = 0;
804          my $max_count = 0;          my $max_count = 0;
805          my %pinned = map {$_ => 1} @$pinned_pegs;          my %pinned = map {$_ => 1} @$pinned_pegs;
806    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3