[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.752, Mon Feb 23 21:13:39 2009 UTC revision 1.753, Mon Mar 9 17:34:48 2009 UTC
# Line 4729  Line 4729 
4729      return $md5;      return $md5;
4730  }  }
4731    
4732    =head3 get_representative_genome
4733    
4734            my $rep_id = get_representative_genome($id)
4735    
4736    return the representative genome of the set that $id is in
4737    
4738    =over 4
4739    
4740    =item genome_id
4741    
4742    ID of the genome used for set lookup
4743    
4744    =item RETURN
4745    
4746    Return the representative genome of the set that $id is in, 0 if not found
4747    
4748    =back
4749    
4750    =cut
4751    
4752    
4753    sub get_representative_genome {
4754            my($self, $id) = @_;
4755            if (! $self->genus_species($id)) {
4756                    return 0;
4757            }
4758    
4759            my $genome_sets = "$FIG_Config::data/Global/genome.sets";
4760            my @sets = `cat $genome_sets`;
4761    
4762            my @p = (grep (/$id/, @sets));
4763            if (@p == 0) {
4764                    return 0;
4765            }
4766            my ($set) = split(/\s/, $p[0]);
4767            @p = (grep (/^$set/, @sets));
4768            if (@p == 0) {
4769                    return 0;
4770            }
4771            my ($set, $genome) = split(/\s/, $p[0]);
4772            return($genome);
4773    }
4774    
4775  =head3 pegs_with_md5  =head3 pegs_with_md5
4776    
# Line 17177  Line 17219 
17219      my($self,$sub,$no_cluster_based) = @_;      my($self,$sub,$no_cluster_based) = @_;
17220    
17221      my $cat = $self->subsystem_classification($sub);      my $cat = $self->subsystem_classification($sub);
17222        #print STDERR "$sub is $cat->[0]\n";
17223      return (defined($cat->[0]) && $cat->[0] ne '' &&      return (defined($cat->[0]) && $cat->[0] ne '' &&
17224              ($cat->[0] !~ /experimental/i) &&              ($cat->[0] !~ /experimental/i) &&
17225              ((! $no_cluster_based) || ($cat->[0] !~ /Clustering-based/)) &&              ((! $no_cluster_based) || ($cat->[0] !~ /Clustering-based/)) &&

Legend:
Removed from v.1.752  
changed lines
  Added in v.1.753

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3