[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.10, Thu Apr 17 20:45:23 2008 UTC revision 1.11, Tue Apr 29 05:45:29 2008 UTC
# Line 31  Line 31 
31    
32  sub pinned_regions {  sub pinned_regions {
33      my($fig, $pin_desc, $fast_color, $sims_from, $map_sz, $add_features) = @_;      my($fig, $pin_desc, $fast_color, $sims_from, $map_sz, $add_features) = @_;
34        Trace("Pinned regions method called.") if T(3);
35      # Get list of pegs required by the description in $pin_desc      # Get list of pegs required by the description in $pin_desc
36      my $pinned_pegs = &expand_peg_list($fig, $pin_desc);      my $pinned_pegs = &expand_peg_list($fig, $pin_desc);
37      Trace("Pinned pegs are " . join(", ", @$pinned_pegs) . ".") if T(3);      Trace("Pinned pegs are " . join(", ", @$pinned_pegs) . ".") if T(3);
38        # Filter out the pegs that don't exist.
39      # Get regions around pinned pegs -- boundaries, features, etc.      # Get regions around pinned pegs -- boundaries, features, etc.
40      my $regions = &define_regions($fig, $map_sz, $pinned_pegs);      my $regions = &define_regions($fig, $map_sz, $pinned_pegs);
41      # Filter out overlapping regions caused by gene fusions, frame shifts etc. where multiple PEGs      # Filter out overlapping regions caused by gene fusions, frame shifts etc. where multiple PEGs
# Line 335  Line 336 
336      {      {
337          my $genome = $fig->genome_of($peg);          my $genome = $fig->genome_of($peg);
338          my $loc    = $fig->feature_location($peg);          my $loc    = $fig->feature_location($peg);
339            # We only proceed if a location was found. Failure to find a location indicates
340            # that the feature is deleted.
341            if ($loc) {
342          my($contig, $beg, $end) = $fig->boundaries_of($loc);          my($contig, $beg, $end) = $fig->boundaries_of($loc);
343    
344          my $region_mid = int(($beg + $end)/2);          my $region_mid = int(($beg + $end)/2);
# Line 356  Line 360 
360    
361          push @$regions, $region;          push @$regions, $region;
362      }      }
363        }
364    
365      return $regions;      return $regions;
366  }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3