3 # Copyright (C) 2007-2009 Martin A. Hansen.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # http://www.gnu.org/copyleft/gpl.html
22 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
24 # Display available genomes.
26 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
33 use Maasha::Biopieces;
36 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
39 my ( $options, @genomes, $genome, @formats, $format, %hash, %found, @row );
41 $options = Maasha::Biopieces::parse_options();
43 @genomes = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_DATA' }/genomes" );
45 foreach $genome ( @genomes )
47 next if $genome =~ /\.$/;
49 @formats = Maasha::Filesys::ls_dirs( $genome );
51 foreach $format ( @formats )
53 if ( $format =~ /\/([^\/]+)\/(\w+)$/ )
55 $hash{ $1 }{ $2 } = 1;
64 map { push @row, $_ } sort keys %found;
66 print join( "\t", @row ), "\n";
68 foreach $genome ( sort keys %hash )
72 foreach $format ( sort keys %found )
74 if ( exists $hash{ $genome }{ $format } ) {
75 push @row, colored( "yes", "green" );
77 push @row, colored( "no", "red" );
81 print join( "\t", @row ), "\n";
85 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
90 Maasha::Biopieces::status_set();
96 Maasha::Biopieces::status_log();
100 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<