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

Annotation of /FigKernelScripts/fetch_models_for_genomes.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : fangfang 1.1
2 :     use strict;
3 :    
4 :     use FIGMODEL;
5 :     use Data::Dumper;
6 :    
7 :     my $usage = "Usage: fetch_models_for_genomes < genome_id_list > model_id_list";
8 :    
9 :     my $figmodel = FIGMODEL->new();
10 :    
11 :     my @gids = map { /(\d+\.\d+)/ ? $1 : () } @ARGV;
12 :     @gids > 0 or @gids = ( join(" ", <STDIN>) =~ m/(\d+\.\d+)/g );
13 :    
14 :     my @all_models;
15 :    
16 :     foreach my $gid (@gids) {
17 :     my $models = $figmodel->database()->get_objects("model", { genome => $gid });
18 :     next unless $models && @$models > 0;
19 :     my @seed_models = map { $_->source() eq 'SEED' ? $_->id() : () } @$models;
20 :     push @all_models, @seed_models if @seed_models;
21 :     }
22 :    
23 :     print join("\n", @all_models) . "\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3