use URI::Escape;
use Data::Dumper;
use Digest::MD5;
+use Time::HiRes;
use Maasha::Common;
use Maasha::Filesys;
use Maasha::Calc;
if ( $cookie->{ 'USER' } and not $cookie->{ 'LOGIN_ERROR' } )
{
$cookie->{ 'LIST_CLADE' } = Maasha::BGB::Track::list_clades( $cookie->{ 'USER' } );
- $cookie->{ 'LIST_GENOME' } = Maasha::BGB::Track::list_genomes( $cookie->{ 'USER' }, $cookie->{ 'CLADE' } );
- $cookie->{ 'LIST_ASSEMBLY' } = Maasha::BGB::Track::list_assemblies( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' } );
- $cookie->{ 'LIST_CONTIG' } = Maasha::BGB::Track::list_contigs( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' }, $cookie->{ 'ASSEMBLY' } );
+
+ if ( $cookie->{ 'CLADE' } )
+ {
+ $cookie->{ 'LIST_GENOME' } = Maasha::BGB::Track::list_genomes( $cookie->{ 'USER' }, $cookie->{ 'CLADE' } );
+
+ if ( $cookie->{ 'GENOME' } )
+ {
+ $cookie->{ 'LIST_ASSEMBLY' } = Maasha::BGB::Track::list_assemblies( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' } );
+
+ if ( $cookie->{ 'ASSEMBLY' } )
+ {
+ $cookie->{ 'LIST_CONTIG' } = Maasha::BGB::Track::list_contigs( $cookie->{ 'USER' }, $cookie->{ 'CLADE' }, $cookie->{ 'GENOME' }, $cookie->{ 'ASSEMBLY' } );
+ }
+ }
+ }
if ( $cookie->{ 'CONTIG' } )
{
{
$new_session->{ 'CLADE' } = $cookie->{ 'CLADE' };
}
- elsif ( $cookie->{ 'PAGE' } eq 'export' )
+ elsif ( $cookie->{ 'PAGE' } =~ /export|dna/ )
{
$new_session->{ 'CLADE' } = $cookie->{ 'CLADE' };
$new_session->{ 'GENOME' } = $cookie->{ 'GENOME' };
__END__
+
+
+ # my $t0 = Time::HiRes::gettimeofday();
+ # my $t1 = Time::HiRes::gettimeofday(); print STDERR "Time: " . ( $t1 - $t0 ) . "\n";