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

Annotation of /FigKernelScripts/generate_GenomeGroups_for_sprout.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : olson 1.3 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : overbeek 1.1
19 :     use FIG;
20 :     my $fig = new FIG;
21 :    
22 : overbeek 1.2 my $usage = "usage: generate_GenomeGroups_for_sprout GenomesF SproutData";
23 : overbeek 1.1
24 :     (
25 :     ($genomesF = shift @ARGV) &&
26 :     ($sproutD = shift @ARGV)
27 :     )
28 :     || die $usage;
29 :    
30 :     my @genomes = map { $_ =~ /^(\S+)/; $1 } `cat $genomesF`;
31 :    
32 :     open(GENOMEGROUPS,"| sort -u +1 -2 +0n -1 > $sproutD/GenomeGroups") || die "could not open $sproutD/GenomeGroups";
33 :    
34 :     foreach $genome (@genomes)
35 :     {
36 :     if (open(NMPDR,"<$FIG_Config::organisms/$genome/NMPDR") && defined($_ = <NMPDR>))
37 :     {
38 :     chomp;
39 :     print GENOMEGROUPS "$genome\t$_\n";
40 :     close(NMPDR);
41 :     }
42 :     }
43 :     close(GENOMEGROUPS);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3