[Bio] / FigKernelScripts / generate_intergenic_blocks.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/generate_intergenic_blocks.pl

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

revision 1.1, Sun May 15 11:49:37 2005 UTC revision 1.2, Sun May 15 12:00:19 2005 UTC
# Line 36  Line 36 
36  open(REGIONS,">$dir/intergenic_region.tbl") || die "could not open intergenic_region.tbl";  open(REGIONS,">$dir/intergenic_region.tbl") || die "could not open intergenic_region.tbl";
37    
38    
39  #open(NEIGH,">neigh") || die "aborted";  open(NEIGH,">neigh") || die "aborted";
40  #foreach $peg (keys(%in))  foreach $peg (keys(%in))
41    {
42        ($peg1,$peg2) = &conn($peg);
43    
44        $n = $in{$peg}->[0];
45        if ($peg1 && ($n1 = $in{$peg1}))  { $precedes{$n}->{$n1->[0]}++ }
46        if ($peg2 && ($n1 = $in{$peg2}))  { $follows{$n}->{$n1->[0]}++ }
47        $peg1 = $peg1 ? $peg1 : "";
48        $peg2 = $peg2 ? $peg2 : "";
49        print NEIGH "$peg\t$peg1\t$peg2\n";
50    }
51    #close(NEIGH);
52    
53    ####################
54    #open(NEIGH,"<neigh") || die "aborted";
55    #while (defined($_ = <NEIGH>))
56  #{  #{
57  #    ($peg1,$peg2) = &conn($peg);  #    if ($_ =~ /^(\S+)\t(\S+)\t(\S+)/)
58    #    {
59    #       ($peg,$peg1,$peg2) = ($1,$2,$3);
60  #  #
61  #    $n = $in{$peg}->[0];  #    $n = $in{$peg}->[0];
62  #    if ($peg1 && ($n1 = $in{$peg1}))  { $precedes{$n}->{$n1->[0]}++ }  #    if ($peg1 && ($n1 = $in{$peg1}))  { $precedes{$n}->{$n1->[0]}++ }
63  #    if ($peg2 && ($n1 = $in{$peg2}))  { $follows{$n}->{$n1->[0]}++ }  #    if ($peg2 && ($n1 = $in{$peg2}))  { $follows{$n}->{$n1->[0]}++ }
64  #    $peg1 = $peg1 ? $peg1 : "";  #    }
 #    $peg2 = $peg2 ? $peg2 : "";  
 #    print NEIGH "$peg\t$peg1\t$peg2\n";  
65  #}  #}
66  #close(NEIGH);  #close(NEIGH);
   
 ####################  
 open(NEIGH,"<neigh") || die "aborted";  
 while (defined($_ = <NEIGH>))  
 {  
     if ($_ =~ /^(\S+)\t(\S+)\t(\S+)/)  
     {  
         ($peg,$peg1,$peg2) = ($1,$2,$3);  
   
        $n = $in{$peg}->[0];  
        if ($peg1 && ($n1 = $in{$peg1}))  { $precedes{$n}->{$n1->[0]}++ }  
        if ($peg2 && ($n1 = $in{$peg2}))  { $follows{$n}->{$n1->[0]}++ }  
     }  
 }  
 close(NEIGH);  
67  ####################  ####################
68    
69  foreach $n (keys(%follows))  foreach $n (keys(%follows))

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3