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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3