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

Annotation of /FigKernelScripts/get_subsystem_properties.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : overbeek 1.1
2 :     use FIG;
3 :     my $fig = new FIG;
4 :    
5 :     foreach $sub_name ($fig->all_subsystems)
6 :     {
7 :     my $sub = new Subsystem($sub_name,$fig);
8 :     $curator = $sub->get_curator;
9 :     $curator =~ s/master://;
10 :     $created = $sub->get_created;
11 :     $created_readable = $fig->epoch_to_readable($created);
12 :     $last_updated = $sub->get_last_updated;
13 :     $last_updated_readable = $fig->epoch_to_readable($last_updated);
14 :     @genomes = $sub->get_genomes;
15 :     $genomesN = @genomes;
16 :     $vcodes = &get_vcodes($sub);
17 :     $notes = $sub->get_notes;
18 :     $len_notes = $notes ? length($notes) : 0;
19 :     $desc = $sub->get_description;
20 :     $len_desc = $desc ? length($desc) : 0;
21 :     $diagrams = $sub->get_diagrams;
22 :     $class = join("; ",@{$sub->get_classification;});
23 :    
24 :    
25 :     print join("\t",($sub_name,$curator,$created,$created_readable,$last_updated,$last_updated_readable,$genomesN,$vcodes,$len_notes,$len_desc,$diagrams,$class)),"\n";
26 :    
27 :     }
28 :    
29 :     sub get_vcodes {
30 :     my($sub) = @_;
31 :    
32 :     my @variants = $sub->get_variant_codes;
33 :     my %vcodes;
34 :     foreach my $vc (@variants)
35 :     {
36 :     $vcodes{$vc}++;
37 :     }
38 :     my $set_vc = join("; ",map { "$_,$vcodes{$_}" } keys(%vcodes));
39 :     return $set_vc;
40 :     }
41 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3