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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Wed Jun 21 18:07:50 2017 UTC (2 years, 5 months ago) by parrello
Branch: MAIN
Changes since 1.1: +7 -0 lines
Changes copied from SEEDtk project.

=head1 List Genome Groups

    p3-list-genome-groups [options]

    List genome groups in your workspace

=cut
use strict;
use Getopt::Long::Descriptive;
use P3WorkspaceClient;
use Data::Dumper;

my($opt, $usage) = describe_options("%c %o",
				    ["help|h" => "Show this help message."]);
print($usage->text), exit 0 if $opt->help;
die($usage->text) if @ARGV != 0;

my $ws = P3WorkspaceClientExt->new();

my $home = $ws->home_workspace;
my $group_path = "$home/Genome Groups";

my $raw_groups = $ws->ls({paths => [$group_path]});
my @groups = sort { $a cmp $b } map { $_->[0] } grep { $_->[1] eq 'genome_group' } @{$raw_groups->{$group_path}};
print "$_\n" foreach @groups;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3