[Bio] / FigKernelScripts / p3-list-genome-groups.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/p3-list-genome-groups.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : parrello 1.2 =head1 List Genome Groups
2 :    
3 :     p3-list-genome-groups [options]
4 :    
5 :     List genome groups in your workspace
6 :    
7 :     =cut
8 : olson 1.1 use strict;
9 :     use Getopt::Long::Descriptive;
10 :     use P3WorkspaceClient;
11 :     use Data::Dumper;
12 :    
13 :     my($opt, $usage) = describe_options("%c %o",
14 :     ["help|h" => "Show this help message."]);
15 :     print($usage->text), exit 0 if $opt->help;
16 :     die($usage->text) if @ARGV != 0;
17 :    
18 :     my $ws = P3WorkspaceClientExt->new();
19 :    
20 :     my $home = $ws->home_workspace;
21 :     my $group_path = "$home/Genome Groups";
22 :    
23 :     my $raw_groups = $ws->ls({paths => [$group_path]});
24 :     my @groups = sort { $a cmp $b } map { $_->[0] } grep { $_->[1] eq 'genome_group' } @{$raw_groups->{$group_path}};
25 :     print "$_\n" foreach @groups;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3