]> git.donarmstrong.com Git - biopieces.git/blobdiff - www/index.cgi
cleaned up BGB track code
[biopieces.git] / www / index.cgi
index 0e01a25f4b7e9e4c0c91d37e371e6aa31a1d6e89..3ccd79b04fc951c098a4fc3cf2c795e06df6c99a 100755 (executable)
@@ -85,7 +85,7 @@ sub cookie_default
 
     # Returns a hash.
 
-    my ( $cookie, $path );
+    my ( $cookie );
 
     $cookie = {};
 
@@ -153,25 +153,11 @@ sub cookie_default
     $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' } )
     {