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

Diff of /FigKernelPackages/FIG.pm

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

revision 1.1, Mon Dec 1 16:54:26 2003 UTC revision 1.2, Wed Dec 3 19:39:29 2003 UTC
# Line 702  Line 702 
702      return @genomes;      return @genomes;
703  }  }
704    
705    sub genome_counts {
706        my($x);
707        my($a,$b,$e,$v) = (0,0,0,0);
708    
709        if (open(TMP,"cat $FIG_Config::organisms/*/TAXONOMY |"))
710        {
711            while (defined($x = <TMP>))
712            {
713                if     ($x =~ /^Eukaryota/)          { $e++ }
714                elsif  ($x =~ /^Bacteria/)           { $b++ }
715                elsif  ($x =~ /^Archaea/)            { $a++ }
716                elsif  ($x =~ /^Vir/)                { $v++ }
717            }
718            close(TMP);
719        }
720        return ($a,$b,$e,$v);
721    }
722    
723  =pod  =pod
724    
725  =head1 genome_version  =head1 genome_version
# Line 927  Line 945 
945    
946  In the case of external proteins, we can usually determine an organism, but not  In the case of external proteins, we can usually determine an organism, but not
947  anything more precise than genus/species (and often not that).  This routine takes  anything more precise than genus/species (and often not that).  This routine takes
948  either a protein ID (which may be a feature ID) and returns "the organism".  a protein ID (which may be a feature ID) and returns "the organism".
949    
950  =cut  =cut
951    
# Line 1999  Line 2017 
2017              }              }
2018              my $delta = $maps_to[0]->[1] - $entry[0]->[1];              my $delta = $maps_to[0]->[1] - $entry[0]->[1];
2019              my @raw_sims = &get_raw_sims($self,$rep_id,$maxN,$maxP);              my @raw_sims = &get_raw_sims($self,$rep_id,$maxN,$maxP);
             foreach $sim (@raw_sims)  
             {  
2020    
2021                  if ($id ne $rep_id)                  if ($id ne $rep_id)
2022                  {                  {
2023                    foreach $sim (@raw_sims)
2024                    {
2025    
2026                      $sim->[0] = $id;                      $sim->[0] = $id;
2027                      $sim->[6] -= $delta;                      $sim->[6] -= $delta;
2028                      $sim->[7] -= $delta;                      $sim->[7] -= $delta;
2029                  }                  }
2030              }              }
2031              @sims = &expand_raw_sims($self,\@raw_sims,$maxP,$select,0);              unshift(@raw_sims,bless([$id,$rep_id,100.00,undef,undef,undef,1,$entry[0]->[1],$delta+1,$maps_to[0]->[1],0.0,,undef,$entry[0]->[1],$maps_to[0]->[1],"blastp",0,0],'Sim'));
2032                @sims = grep { $_->id1 ne $_->id2 } &expand_raw_sims($self,\@raw_sims,$maxP,$select,0);
2033          }          }
2034      }      }
2035      return @sims;      return @sims;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3