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 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
31 use Maasha::Biopieces;
34 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
37 my ( $run_time_beg, $run_time_end, $options, @genomes, $genome, @formats, $format, %hash, %found, @row );
39 $options = Maasha::Biopieces::parse_options();
41 @genomes = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_DATA' }/genomes" );
43 foreach $genome ( @genomes )
45 next if $genome =~ /\.$/;
47 @formats = Maasha::Filesys::ls_dirs( $genome );
49 foreach $format ( @formats )
51 if ( $format =~ /\/([^\/]+)\/(\w+)$/ )
53 $hash{ $1 }{ $2 } = 1;
62 map { push @row, $_ } sort keys %found;
64 print join( "\t", @row ), "\n";
66 foreach $genome ( sort keys %hash )
70 foreach $format ( sort keys %found )
72 if ( exists $hash{ $genome }{ $format } ) {
79 print join( "\t", @row ), "\n";
83 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
88 $run_time_beg = Maasha::Biopieces::run_time();
90 Maasha::Biopieces::log_biopiece();
95 $run_time_end = Maasha::Biopieces::run_time();
97 Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
101 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<