my ( @dirs, @clades );
Maasha::Common::error( 'BP_WWW not set in environment' ) if not $ENV{ 'BP_WWW' };
- Maasha::Common::error( 'no user specified' ) if not $user;
@dirs = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_WWW' }/Data/Users/$user" );
my ( @dirs, @genomes );
Maasha::Common::error( 'BP_WWW not set in environment' ) if not $ENV{ 'BP_WWW' };
- Maasha::Common::error( 'no user specified' ) if not $user;
- Maasha::Common::error( 'no clade specified' ) if not $clade;
@dirs = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_WWW' }/Data/Users/$user/$clade" );
my ( @dirs, @assemblies );
Maasha::Common::error( 'BP_WWW not set in environment' ) if not $ENV{ 'BP_WWW' };
- Maasha::Common::error( 'no user specified' ) if not $user;
- Maasha::Common::error( 'no clade specified' ) if not $clade;
- Maasha::Common::error( 'no genome specified' ) if not $genome;
@dirs = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_WWW' }/Data/Users/$user/$clade/$genome" );
my ( @dirs, @contigs );
Maasha::Common::error( 'BP_WWW not set in environment' ) if not $ENV{ 'BP_WWW' };
- Maasha::Common::error( 'no user specified' ) if not $user;
- Maasha::Common::error( 'no clade specified' ) if not $clade;
- Maasha::Common::error( 'no genome specified' ) if not $genome;
- Maasha::Common::error( 'no assembly specified' ) if not $assembly;
@dirs = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_WWW' }/Data/Users/$user/$clade/$genome/$assembly" );
my ( @dirs, @tracks );
Maasha::Common::error( 'BP_WWW not set in environment' ) if not $ENV{ 'BP_WWW' };
- Maasha::Common::error( 'no user specified' ) if not $user;
- Maasha::Common::error( 'no clade specified' ) if not $clade;
- Maasha::Common::error( 'no genome specified' ) if not $genome;
- Maasha::Common::error( 'no assembly specified' ) if not $assembly;
- Maasha::Common::error( 'no contig specified' ) if not $contig;
if ( -d "$ENV{ 'BP_WWW' }/Data/Users/$user/$clade/$genome/$assembly/$contig/Tracks" ) {
@dirs = Maasha::Filesys::ls_dirs( "$ENV{ 'BP_WWW' }/Data/Users/$user/$clade/$genome/$assembly/$contig/Tracks" );
# Returns a hash.
- my ( $cookie, $path );
+ my ( $cookie );
$cookie = {};
$cookie->{ 'FEAT_COLOR' } = [ 0, 0, 0 ];
$cookie->{ 'FEAT_MAX' } = 5000;
- $path = "$cookie->{ 'DATA_DIR' }/Users";
-
- $cookie->{ 'LIST_USER' } = Maasha::Filesys::ls_dirs_base( $path ) if -d $path;
-
- $path .= "/$cookie->{ 'USER' }";
-
- $cookie->{ 'LIST_CLADE' } = Maasha::Filesys::ls_dirs_base( $path ) if -d $path;
-
- $path .= "/$cookie->{ 'CLADE' }";
-
- $cookie->{ 'LIST_GENOME' } = Maasha::Filesys::ls_dirs_base( $path ) if -d $path;
-
- $path .= "/$cookie->{ 'GENOME' }";
-
- $cookie->{ 'LIST_ASSEMBLY' } = Maasha::Filesys::ls_dirs_base( $path ) if -d $path;
-
- $path .= "/$cookie->{ 'ASSEMBLY' }";
-
- $cookie->{ 'LIST_CONTIG' } = Maasha::Filesys::ls_dirs_base( $path ) if -d $path;
+ $cookie->{ 'LIST_USER' } = Maasha::BGB::Track::list_users();
+ $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->{ 'CONTIG' } )
{