galaxy-dev
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- 10007 discussions
26 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/842af32c4e73
changeset: 2458:842af32c4e73
user: guru
date: Thu Jun 25 15:34:05 2009 -0400
description:
A tiny bug fix for Sort tool - the delimiter is now defaulted to tab.
2 file(s) affected in this change:
tools/filters/sorter.py
tools/filters/sorter.xml
diffs (21 lines):
diff -r 8dfe971fcc27 -r 842af32c4e73 tools/filters/sorter.py
--- a/tools/filters/sorter.py Thu Jun 25 15:29:24 2009 -0400
+++ b/tools/filters/sorter.py Thu Jun 25 15:34:05 2009 -0400
@@ -103,7 +103,7 @@
# Launch sort.
environ['LC_ALL'] = 'POSIX'
- commandline = "sort -f"+style+"-k "+str(column)+" -o "+outputfile+" "+inputfile+order
+ commandline = "sort -f"+style+"-k "+str(column)+" -t $'\t' -o "+outputfile+" "+inputfile+order
errorcode, stdout = commands.getstatusoutput(commandline)
diff -r 8dfe971fcc27 -r 842af32c4e73 tools/filters/sorter.xml
--- a/tools/filters/sorter.xml Thu Jun 25 15:29:24 2009 -0400
+++ b/tools/filters/sorter.xml Thu Jun 25 15:34:05 2009 -0400
@@ -1,4 +1,4 @@
-<tool id="sort1" name="Sort">
+<tool id="sort1" name="Sort" version="1.0.1">
<description>data in ascending or descending order</description>
<command interpreter="python">sorter.py -i $input -o $out_file1 -cols $column -order $order -style $style</command>
<inputs>
1
0
26 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/8dfe971fcc27
changeset: 2457:8dfe971fcc27
user: guru
date: Thu Jun 25 15:29:24 2009 -0400
description:
Extract genomic DNA tool now uses only alignseq.loc to access sequence files. The twobit.loc file will henceforth be unnecessary, and all sequences from it should be moved to alignseq.loc.
1 file(s) affected in this change:
tools/extract/extract_genomic_dna.py
diffs (92 lines):
diff -r d3abf05d9272 -r 8dfe971fcc27 tools/extract/extract_genomic_dna.py
--- a/tools/extract/extract_genomic_dna.py Fri Jun 19 11:21:13 2009 -0400
+++ b/tools/extract/extract_genomic_dna.py Thu Jun 25 15:29:24 2009 -0400
@@ -4,7 +4,7 @@
-1, --cols=N,N,N,N: Columns for start, end, strand in input file
-d, --dbkey=N: Genome build of input file
-o, --output_format=N: the data type of the output file
- -g, --GALAXY_DATA_INDEX_DIR=N: the directory containing alignseq.loc and twobit.loc
+ -g, --GALAXY_DATA_INDEX_DIR=N: the directory containing alignseq.loc
"""
from galaxy import eggs
import pkg_resources
@@ -29,33 +29,20 @@
reversed_s.reverse()
return "".join( reversed_s )
-def check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR ):
- nib_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR
- nib_path = ''
- for line in open( nib_file ):
+def check_seq_file( dbkey, GALAXY_DATA_INDEX_DIR ):
+ seq_file = "%s/alignseq.loc" % GALAXY_DATA_INDEX_DIR
+ seq_path = ''
+ for line in open( seq_file ):
line = line.rstrip( '\r\n' )
if line and not line.startswith( "#" ) and line.startswith( 'seq' ):
fields = line.split( '\t' )
if len( fields ) < 3:
continue
if fields[1] == dbkey:
- nib_path = fields[2].strip()
+ seq_path = fields[2].strip()
break
- return nib_path
+ return seq_path
-def check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR ):
- twobit_file = "%s/twobit.loc" % GALAXY_DATA_INDEX_DIR
- twobit_path = ''
- for line in open( twobit_file ):
- line = line.rstrip( '\r\n' )
- if line and not line.startswith( "#" ):
- fields = line.split( '\t' )
- if len( fields ) < 2:
- continue
- if fields[0] == dbkey:
- twobit_path = fields[1].strip()
- break
- return twobit_path
def __main__():
options, args = doc_optparse.parse( __doc__ )
@@ -72,9 +59,8 @@
strand = None
nibs = {}
twobits = {}
- nib_path = check_nib_file( dbkey, GALAXY_DATA_INDEX_DIR )
- twobit_path = check_twobit_file( dbkey, GALAXY_DATA_INDEX_DIR )
- if not os.path.exists( nib_path ) and not os.path.exists( twobit_path ):
+ seq_path = check_seq_file( dbkey, GALAXY_DATA_INDEX_DIR )
+ if not os.path.exists( seq_path ):
# If this occurs, we need to fix the metadata validator.
stop_err( "No sequences are available for '%s', request them by reporting this error." % dbkey )
@@ -116,11 +102,11 @@
strand = '+'
sequence = ''
- if nib_path and os.path.exists( "%s/%s.nib" % ( nib_path, chrom ) ):
+ if seq_path and os.path.exists( "%s/%s.nib" % ( seq_path, chrom ) ):
if chrom in nibs:
nib = nibs[chrom]
else:
- nibs[chrom] = nib = bx.seq.nib.NibFile( file( "%s/%s.nib" % ( nib_path, chrom ) ) )
+ nibs[chrom] = nib = bx.seq.nib.NibFile( file( "%s/%s.nib" % ( seq_path, chrom ) ) )
try:
sequence = nib.get( start, end-start )
except:
@@ -131,11 +117,11 @@
first_invalid_line = i + 1
invalid_line = line
continue
- elif twobit_path and os.path.exists( twobit_path ):
+ elif seq_path and os.path.exists( seq_path ):
if chrom in twobits:
t = twobits[chrom]
else:
- twobits[chrom] = t = bx.seq.twobit.TwoBitFile( file( twobit_path ) )
+ twobits[chrom] = t = bx.seq.twobit.TwoBitFile( file( seq_path ) )
try:
sequence = t[chrom][start:end]
except:
1
0
Hello,
I recently had to add a tool which generates a variable number of output
files, and I used the HTML / output directory trick as (very concisely)
explained here: http://g2.trac.bx.psu.edu/wiki/AddingToolsFAQ
This is a very cool feature!
It took some time to get right, so I'm attaching a complete working
example for future reference (you can add it to the wiki, if you'd like).
Using an <IFRAME> inside the output HTML, I can even show the multiple
output files in the main HTML page, in a report-like way.
Thanks, and keep up the good work.
Gordon.
1
0
Hello,
Here's a tip for connecting galaxy to mysql on localhost
(if it didn't work for you out of the box):
## Get a clean copy of galaxy
$ hg clone http://www.bx.psu.edu/hg/galaxy galaxy
## Create dedicated MySQL database for galaxy,
## with user 'galaxy' and password '12345'
$ mysql -u root -p
password:
mysql> create database galaxy ;
mysql> use galaxy ;
mysql> grant all on galaxy.* to 'galaxy'@'localhost' identified by '12345';
## Setup Galaxy
$ sh setup.sh
## Change universe_wsgi.ini, to use the new database
database_connection = mysql://galaxy:12345@localhost/galaxy
## Run Galaxy
$ sh run.sh
-----------------
But here's the catch:
On a standard debian system, mysql puts the unix socket file in
/var/run/mysqld/mysqld.sock
However, SqlAlchemy assumes the socket is in /tmp/mysql.sock.
So when I run galaxy, I get the following exception:
OperationalError: (OperationalError) (2002, "Can't connect to local
MySQL server through socket '/tmp/mysql.sock' (2)") None None
Two possible solutions for that:
1. Change the socket file in /etc/mysql/my.cnf (not recommended)
or
2. Add the following incantation to the SQLAlchemy string in
universe_wsgi.ini:
database_connection =
mysql://galaxy:12345@localhost/galaxy?unix_socket=/var/run/mysqld/mysqld.sock
With this change, Galaxy runs fine with mysql on localhost.
-Gordon.
1
0
19 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/d3abf05d9272
changeset: 2456:d3abf05d9272
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Jun 19 11:21:13 2009 -0400
description:
Fix for importing history items ( datasets ) that include child datasets into a library.
1 file(s) affected in this change:
lib/galaxy/model/__init__.py
diffs (42 lines):
diff -r 075c0fd5b1d5 -r d3abf05d9272 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Thu Jun 18 12:10:36 2009 -0400
+++ b/lib/galaxy/model/__init__.py Fri Jun 19 11:21:13 2009 -0400
@@ -628,7 +628,7 @@
hda.set_peek()
hda.flush()
return hda
- def to_library_dataset_dataset_association( self, target_folder, replace_dataset=None, parent_id=None ):
+ def to_library_dataset_dataset_association( self, target_folder, replace_dataset=None, parent_id=None, user=None ):
if replace_dataset:
# The replace_dataset param ( when not None ) refers to a LibraryDataset that is being replaced with a new version.
library_dataset = replace_dataset
@@ -637,6 +637,8 @@
# LibraryDataset, and the current user's DefaultUserPermissions will be applied to the associated Dataset.
library_dataset = LibraryDataset( folder=target_folder, name=self.name, info=self.info )
library_dataset.flush()
+ if not user:
+ user = self.history.user
ldda = LibraryDatasetDatasetAssociation( name=self.name,
info=self.info,
blurb=self.blurb,
@@ -649,7 +651,7 @@
deleted=self.deleted,
parent_id=parent_id,
copied_from_history_dataset_association=self,
- user=self.history.user )
+ user=user )
ldda.flush()
# Permissions must be the same on the LibraryDatasetDatasetAssociation and the associated LibraryDataset
# Must set metadata after ldda flushed, as MetadataFiles require ldda.id
@@ -660,7 +662,10 @@
library_dataset.library_dataset_dataset_association_id = ldda.id
library_dataset.flush()
for child in self.children:
- child_copy = child.to_library_dataset_dataset_association( target_folder=target_folder, replace_dataset=replace_dataset, parent_id=ldda.id )
+ child_copy = child.to_library_dataset_dataset_association( target_folder=target_folder,
+ replace_dataset=replace_dataset,
+ parent_id=ldda.id,
+ user=ldda.user )
if not self.datatype.copy_safe_peek:
# In some instances peek relies on dataset_id, i.e. gmaj.zip for viewing MAFs
ldda.set_peek()
1
0
18 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/075c0fd5b1d5
changeset: 2455:075c0fd5b1d5
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Thu Jun 18 12:10:36 2009 -0400
description:
Fix for detecting metadata column types in tabular files, the number of lines read for detecting column types will always be the max setting, with previously detected column types being overridden if appropriate ( e.g., int overridden with float ). This will only occur in files whose data varies between types within the same column.
1 file(s) affected in this change:
lib/galaxy/datatypes/tabular.py
diffs (14 lines):
diff -r d83b9225b5dd -r 075c0fd5b1d5 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py Tue Jun 16 13:54:33 2009 -0400
+++ b/lib/galaxy/datatypes/tabular.py Thu Jun 18 12:10:36 2009 -0400
@@ -121,8 +121,8 @@
#"column_types": ["int", "int", "str", "list"]
first_line_column_types = column_types
column_types = [ None for col in first_line_column_types ]
- elif ( column_types and None not in column_types ) or i > num_check_lines:
- #found and set all known columns, or we exceeded our max check lines
+ elif i > num_check_lines:
+ # We exceeded our max check lines
break
#we error on the larger number of columns
1
0
18 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/d83b9225b5dd
changeset: 2454:d83b9225b5dd
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Tue Jun 16 13:54:33 2009 -0400
description:
Add the hostname of the Galaxy instance to error reports.
2 file(s) affected in this change:
lib/galaxy/web/controllers/dataset.py
lib/galaxy/web/framework/base.py
diffs (54 lines):
diff -r e899101e63d1 -r d83b9225b5dd lib/galaxy/web/controllers/dataset.py
--- a/lib/galaxy/web/controllers/dataset.py Tue Jun 16 09:55:15 2009 -0400
+++ b/lib/galaxy/web/controllers/dataset.py Tue Jun 16 13:54:33 2009 -0400
@@ -16,7 +16,10 @@
GALAXY TOOL ERROR REPORT
------------------------
-This error report is in reference to output dataset ${dataset_id}.
+This error report was sent from the Galaxy instance hosted on the server
+"${remote_hostname}"
+-----------------------------------------------------------------------------
+This is in reference to output dataset ${dataset_id}.
-----------------------------------------------------------------------------
The user '${email}' provided the following information:
${message}
@@ -51,7 +54,7 @@
return job.stderr
@web.expose
- def report_error( self, trans, id, email="no email provided", message="" ):
+ def report_error( self, trans, id, email='', message="" ):
smtp_server = trans.app.config.smtp_server
if smtp_server is None:
return trans.show_error_message( "Sorry, mail is not configured for this galaxy instance" )
@@ -61,9 +64,12 @@
# Get the dataset and associated job
dataset = model.HistoryDatasetAssociation.get( id )
job = dataset.creating_job_associations[0].job
+ # Get the name of the server hosting the Galaxy instance from which this report originated
+ remote_hostname = trans.request.remote_hostname
# Build the email message
msg = MIMEText( string.Template( error_report_template )
- .safe_substitute( dataset_id=dataset.id,
+ .safe_substitute( remote_hostname=remote_hostname,
+ dataset_id=dataset.id,
email=email,
message=message,
job_id=job.id,
diff -r e899101e63d1 -r d83b9225b5dd lib/galaxy/web/framework/base.py
--- a/lib/galaxy/web/framework/base.py Tue Jun 16 09:55:15 2009 -0400
+++ b/lib/galaxy/web/framework/base.py Tue Jun 16 13:54:33 2009 -0400
@@ -230,6 +230,12 @@
except socket.error:
return self.remote_addr
@lazy_property
+ def remote_hostname( self ):
+ try:
+ return socket.gethostbyaddr( self.remote_addr )[0]
+ except socket.error:
+ return self.remote_addr
+ @lazy_property
def cookies( self ):
return get_cookies( self.environ )
@lazy_property
1
0
Hello Len,
This is not currently possible in a clean fashion, and providing this
feature will take a bit longer than I had originally thought, so I've
opened the following ticket for this. You can "follow" the issue in
bitbucket if you want. Thanks for sending this.
http://bitbucket.org/galaxy/galaxy-central/issue/97/enable-ability-to-have-…
Greg Von Kuster
Galaxy Development Team
lentaing(a)jimmy.harvard.edu wrote:
> Hi Greg,
>
> We have a program that can either output 1 (a bed file) or 2 files (a bed
> and a wig file). We'd like to give the user the option to select whether
> they want 1 or 2 files; in galaxy, is there a way to make the NUMBER of
> outputs dependent on a variable? I tried this, but it didn't work--when i
> select "False" for $two_out, galaxy still generates two output files:
>
> ...
> <command interpreter="bash">test_cond_out.sh $output1
> </command>
> <inputs>
> <param name="two_out" type="select" display="radio">
> <option value="true">True</option>
> <option value="false">False</option>
> </param>
> </inputs>
> <outputs>
> #if $two_out == "true":
> <data format="bed" name="output1" />
> <data format="bed" name="output2" />
> #else:
> <data format="bed" name="output1" />
> #end if
> </outputs>
> ...
>
> Thanks,
>
> Len
>
>
>
1
0
16 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/e899101e63d1
changeset: 2453:e899101e63d1
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Tue Jun 16 09:55:15 2009 -0400
description:
Fixes and functional tests for uploading directories of files from both the Admin view and the Libraries view ( requires new config setting ).
In addition to the config setting "library_import_dir" for the Admin view, the new config setting "user_library_import_dir" for the Libraries view will allow non-amin users to upload a directory of files.
The configured directory must contain sub-directories named the same as the non-admin user's Galaxy login ( email ). The non-admin user is restricted to uploading files or sub-directories of files contained in their directoy.
10 file(s) affected in this change:
lib/galaxy/config.py
lib/galaxy/web/controllers/library_dataset.py
templates/admin/library/new_dataset.mako
templates/library/new_dataset.mako
test-data/users/test1(a)bx.psu.edu/1.fasta
test-data/users/test3(a)bx.psu.edu/run1/2.fasta
test/base/twilltestcase.py
test/functional/__init__.py
test/functional/test_security_and_libraries.py
universe_wsgi.ini.sample
diffs (1056 lines):
diff -r c44567359a03 -r e899101e63d1 lib/galaxy/config.py
--- a/lib/galaxy/config.py Fri Jun 12 09:56:23 2009 -0400
+++ b/lib/galaxy/config.py Tue Jun 16 09:55:15 2009 -0400
@@ -81,6 +81,9 @@
self.library_import_dir = kwargs.get( 'library_import_dir', None )
if self.library_import_dir is not None and not os.path.exists( self.library_import_dir ):
raise ConfigurationError( "library_import_dir specified in config (%s) does not exist" % self.library_import_dir )
+ self.user_library_import_dir = kwargs.get( 'user_library_import_dir', None )
+ if self.user_library_import_dir is not None and not os.path.exists( self.user_library_import_dir ):
+ raise ConfigurationError( "user_library_import_dir specified in config (%s) does not exist" % self.user_library_import_dir )
# Configuration options for taking advantage of nginx features
self.nginx_x_accel_redirect_base = kwargs.get( 'nginx_x_accel_redirect_base', False )
self.nginx_upload_location = kwargs.get( 'nginx_upload_store', False )
diff -r c44567359a03 -r e899101e63d1 lib/galaxy/web/controllers/library_dataset.py
--- a/lib/galaxy/web/controllers/library_dataset.py Fri Jun 12 09:56:23 2009 -0400
+++ b/lib/galaxy/web/controllers/library_dataset.py Tue Jun 16 09:55:15 2009 -0400
@@ -1,4 +1,4 @@
-import os, shutil, urllib, StringIO, re, gzip, tempfile, shutil, zipfile
+import os, os.path, shutil, urllib, StringIO, re, gzip, tempfile, shutil, zipfile
from galaxy.web.base.controller import *
from galaxy import util, jobs
from galaxy.datatypes import sniff
@@ -193,7 +193,7 @@
file_format = params.get( 'file_format', 'auto' )
data_file = params.get( 'file_data', '' )
url_paste = params.get( 'url_paste', '' )
- server_dir = params.get( 'server_dir', None )
+ server_dir = util.restore_text( params.get( 'server_dir', '' ) )
if replace_dataset is not None:
replace_id = replace_dataset.id
else:
@@ -222,10 +222,17 @@
elif upload_option == 'upload_directory':
if server_dir in [ None, 'None', '' ]:
err_redirect = True
- if trans.app.config.library_import_dir:
- msg = 'Select a server directory'
- else:
- msg = '"library_import_dir" is not defined in the Galaxy configuration file'
+ # See if our request is from the Admin view or the Libraries view
+ if trans.request.browser_url.find( 'admin' ) >= 0:
+ import_dir = trans.app.config.library_import_dir
+ import_dir_desc = 'library_import_dir'
+ else:
+ import_dir = trans.app.config.user_library_import_dir
+ import_dir_desc = 'user_library_import_dir'
+ if import_dir:
+ msg = 'Select a directory'
+ else:
+ msg = '"%s" is not defined in the Galaxy configuration file' % import_dir_desc
if err_redirect:
trans.response.send_redirect( web.url_for( controller=controller,
action='library_dataset_dataset_association',
@@ -264,7 +271,7 @@
created_ldda_ids = str( created_ldda.id )
except Exception, e:
log.exception( 'exception in upload_dataset using file_name %s: %s' % ( str( file_name ), str( e ) ) )
- return self.upload_empty( trans, controller, library_id, "Error:", str( e ) )
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", str( e ) )
elif url_paste not in [ None, "" ]:
if url_paste.lower().find( 'http://' ) >= 0 or url_paste.lower().find( 'ftp://' ) >= 0:
url_paste = url_paste.replace( '\r', '' ).split( '\n' )
@@ -292,7 +299,7 @@
created_ldda_ids = '%s,%s' % ( created_ldda_ids, str( created_ldda.id ) )
except Exception, e:
log.exception( 'exception in upload_dataset using url_paste %s' % str( e ) )
- return self.upload_empty( trans, controller, library_id, "Error:", str( e ) )
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", str( e ) )
else:
is_valid = False
for line in url_paste:
@@ -318,13 +325,36 @@
created_ldda_ids = '%s,%s' % ( created_ldda_ids, str( created_ldda.id ) )
except Exception, e:
log.exception( 'exception in add_file using StringIO.StringIO( url_paste ) %s' % str( e ) )
- return self.upload_empty( trans, controller, library_id, "Error:", str( e ) )
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", str( e ) )
elif server_dir not in [ None, "", "None" ]:
- full_dir = os.path.join( trans.app.config.library_import_dir, server_dir )
+ # See if our request is from the Admin view or the Libraries view
+ if trans.request.browser_url.find( 'admin' ) >= 0:
+ import_dir = trans.app.config.library_import_dir
+ import_dir_desc = 'library_import_dir'
+ full_dir = os.path.join( import_dir, server_dir )
+ else:
+ imrport_dir = trans.app.config.user_library_import_dir
+ import_dir_desc = 'user_library_import_dir'
+ # From the Libraries view, users are restricted to the directory named the same as
+ # their email within the configured user_library_import_dir. If this directory contains
+ # sub-directories, server_dir will be the name of the selected sub-directory. Otherwise
+ # server_dir will be the user's email address.
+ if server_dir == trans.user.email:
+ full_dir = os.path.join( import_dir, server_dir )
+ else:
+ full_dir = os.path.join( import_dir, trans.user.email, server_dir )
+ files = []
try:
- files = os.listdir( full_dir )
- except:
- log.debug( "Unable to get file list for configured library_import_dir %s" % full_dir )
+ for entry in os.listdir( full_dir ):
+ # Only import regular files
+ if os.path.isfile( os.path.join( full_dir, entry ) ):
+ files.append( entry )
+ except Exception, e:
+ msg = "Unable to get file list for configured %s, error: %s" % ( import_dir_desc, str( e ) )
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", msg )
+ if not files:
+ msg = "The directory '%s' contains no valid files" % full_dir
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", msg )
for file in files:
full_file = os.path.join( full_dir, file )
if not os.path.isfile( full_file ):
@@ -346,7 +376,7 @@
created_ldda_ids = '%s,%s' % ( created_ldda_ids, str( created_ldda.id ) )
except Exception, e:
log.exception( 'exception in add_file using server_dir %s' % str( e ) )
- return self.upload_empty( trans, controller, library_id, "Error:", str( e ) )
+ return self.upload_empty( trans, controller, library_id, folder_id, "Error:", str( e ) )
if created_ldda_ids:
created_ldda_ids = created_ldda_ids.lstrip( ',' )
return created_ldda_ids
@@ -425,11 +455,12 @@
if chunk is None:
temp.close()
return False
- def upload_empty( self, trans, controller, library_id, err_code, err_msg ):
+ def upload_empty( self, trans, controller, library_id, folder_id, err_code, err_msg ):
msg = err_code + err_msg
return trans.response.send_redirect( web.url_for( controller=controller,
- action='browse_library',
- id=library_id,
+ action='library_dataset_dataset_association',
+ library_id=library_id,
+ folder_id=folder_id,
msg=util.sanitize_text( msg ),
messagetype='error' ) )
class BadFileException( Exception ):
diff -r c44567359a03 -r e899101e63d1 templates/admin/library/new_dataset.mako
--- a/templates/admin/library/new_dataset.mako Fri Jun 12 09:56:23 2009 -0400
+++ b/templates/admin/library/new_dataset.mako Tue Jun 16 09:55:15 2009 -0400
@@ -2,13 +2,15 @@
<%namespace file="/message.mako" import="render_msg" />
<%namespace file="/admin/library/common.mako" import="render_available_templates" />
-<% import os %>
+<% import os, os.path %>
<b>Create new library datasets</b>
<a id="upload-librarydataset--popup" class="popup-arrow" style="display: none;">▼</a>
<div popupmenu="upload-librarydataset--popup">
<a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_file' )}">Upload files</a>
- <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_directory' )}">Upload directory of files</a>
+ %if trans.app.config.library_import_dir and os.path.exists( trans.app.config.library_import_dir ):
+ <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_directory' )}">Upload directory of files</a>
+ %endif
<a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='import_from_history' )}">Import datasets from your current history</a>
</div>
<br/><br/>
@@ -26,135 +28,149 @@
<div class="toolForm" id="new_dataset">
%if upload_option == 'upload_file':
<div class="toolFormTitle">Upload files</div>
- %elif upload_option == 'upload_directory':
+ %else:
<div class="toolFormTitle">Upload a directory of files</div>
%endif
- %if upload_option == 'upload_directory' and not trans.app.config.library_import_dir:
- <p/>
- "library_import_dir" is not defined in the Galaxy configuration file
- <p/>
- %else:
- <div class="toolFormBody">
- <form name="tool_form" action="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id )}" enctype="multipart/form-data" method="post">
- <input type="hidden" name="folder_id" value="${folder_id}"/>
- <input type="hidden" name="upload_option" value="${upload_option}"/>
- %if replace_dataset:
- <input type="hidden" name="replace_id" value="${replace_dataset.id}"/>
- <div class="form-row">
- You are currently selecting a new file to replace '<a href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, id=replace_dataset.library_dataset_dataset_association.id )}">${replace_dataset.name}</a>'.
- <div style="clear: both"></div>
- </div>
- %endif
- %if upload_option == 'upload_file':
- <div class="form-row">
- <label>File:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="file" name="file_data"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>URL/Text:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="url_paste" rows="5" cols="35"></textarea>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Specify a list of URLs (one per line) or paste the contents of a file.
- </div>
- <div style="clear: both"></div>
- </div>
- %elif upload_option == 'upload_directory':
- <div class="form-row">
- <label>Server Directory</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <select name="server_dir">
- <option>None</option>
- %for dir in os.listdir( trans.app.config.library_import_dir ):
- <option>${dir}</option>
- %endfor
- </select>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Upload all files in a subdirectory of <strong>${trans.app.config.library_import_dir}</strong> on the Galaxy server.
- </div>
- <div style="clear: both"></div>
- </div>
- %endif
+ <div class="toolFormBody">
+ <form name="tool_form" action="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id )}" enctype="multipart/form-data" method="post">
+ <input type="hidden" name="folder_id" value="${folder_id}"/>
+ <input type="hidden" name="upload_option" value="${upload_option}"/>
+ %if replace_dataset:
+ <input type="hidden" name="replace_id" value="${replace_dataset.id}"/>
<div class="form-row">
- <label>Convert spaces to tabs:</label>
+ You are currently selecting a new file to replace '<a href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, id=replace_dataset.library_dataset_dataset_association.id )}">${replace_dataset.name}</a>'.
+ <div style="clear: both"></div>
+ </div>
+ %endif
+ %if upload_option == 'upload_file':
+ <div class="form-row">
+ <label>File:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <div>
- <input type="checkbox" name="space_to_tab" value="Yes"/>Yes
- </div>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Use this option if you are manually entering intervals.
+ <input type="file" name="file_data"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
- <label>File Format:</label>
+ <label>URL/Text:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <select name="file_format">
- <option value="auto" selected>Auto-detect</option>
- %for file_format in file_formats:
- <option value="${file_format}">${file_format}</option>
- %endfor
- </select>
+ <textarea name="url_paste" rows="5" cols="35"></textarea>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ Specify a list of URLs (one per line) or paste the contents of a file.
</div>
<div style="clear: both"></div>
</div>
+ %elif upload_option == 'upload_directory':
<div class="form-row">
- <label>Genome:</label>
+ <%
+ # See if we have any contained sub-directories, if not the only option
+ # in the server_dir select list will be library_import_dir
+ contains_directories = False
+ for entry in os.listdir( trans.app.config.library_import_dir ):
+ if os.path.isdir( os.path.join( trans.app.config.library_import_dir, entry ) ):
+ contains_directories = True
+ break
+ %>
+ <label>Server Directory</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <select name="dbkey">
- %for dbkey in dbkeys:
- %if dbkey[1] == last_used_build:
- <option value="${dbkey[1]}" selected>${dbkey[0]}</option>
- %else:
- <option value="${dbkey[1]}">${dbkey[0]}</option>
- %endif
- %endfor
+ <select name="server_dir">
+ %if contains_directories:
+ <option>None</option>
+ %for entry in os.listdir( trans.app.config.library_import_dir ):
+ ## Do not include entries that are not directories
+ %if os.path.isdir( os.path.join( trans.app.config.library_import_dir, entry ) ):
+ <option>${entry}</option>
+ %endif
+ %endfor
+ %else:
+ <option>${trans.app.config.library_import_dir}</option>
+ %endif
</select>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ %if contains_directories:
+ Upload all files in a sub-directory of <strong>${trans.app.config.library_import_dir}</strong> on the Galaxy server.
+ %else:
+ Upload all files in <strong>${trans.app.config.library_import_dir}</strong> on the Galaxy server.
+ %endif
</div>
<div style="clear: both"></div>
</div>
- <div class="form-row">
- <label>Message:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="message" rows="3" cols="35"></textarea>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This information will be displayed in the "Information" column for this dataset in the library browser
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <label>Restrict dataset access to specific roles:</label>
- <select name="roles" multiple="true" size="5">
- %for role in roles:
- <option value="${role.id}">${role.name}</option>
- %endfor
- </select>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Multi-select list - hold the appropriate key while clicking to select multiple roles. More restrictions can be applied after the upload is complete. Selecting no roles makes a dataset public.
+ %endif
+ <div class="form-row">
+ <label>Convert spaces to tabs:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <div>
+ <input type="checkbox" name="space_to_tab" value="Yes"/>Yes
</div>
</div>
+ <div class="toolParamHelp" style="clear: both;">
+ Use this option if you are manually entering intervals.
+ </div>
<div style="clear: both"></div>
- <% folder = trans.app.model.LibraryFolder.get( folder_id ) %>
- %if folder.library_folder_info_template_associations:
- ${render_available_templates( folder, library_id, restrict=True, upload=True )}
- %else:
- ${render_available_templates( folder, library_id, restrict=False, upload=True )}
- %endif
- <div class="form-row">
- <input type="submit" class="primary-button" name="new_dataset_button" value="Upload to library"/>
+ </div>
+ <div class="form-row">
+ <label>File Format:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <select name="file_format">
+ <option value="auto" selected>Auto-detect</option>
+ %for file_format in file_formats:
+ <option value="${file_format}">${file_format}</option>
+ %endfor
+ </select>
</div>
- </form>
- </div>
- %endif
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>Genome:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <select name="dbkey">
+ %for dbkey in dbkeys:
+ %if dbkey[1] == last_used_build:
+ <option value="${dbkey[1]}" selected>${dbkey[0]}</option>
+ %else:
+ <option value="${dbkey[1]}">${dbkey[0]}</option>
+ %endif
+ %endfor
+ </select>
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>Message:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <textarea name="message" rows="3" cols="35"></textarea>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ This information will be displayed in the "Information" column for this dataset in the library browser
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <label>Restrict dataset access to specific roles:</label>
+ <select name="roles" multiple="true" size="5">
+ %for role in roles:
+ <option value="${role.id}">${role.name}</option>
+ %endfor
+ </select>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ Multi-select list - hold the appropriate key while clicking to select multiple roles. More restrictions can be applied after the upload is complete. Selecting no roles makes a dataset public.
+ </div>
+ </div>
+ <div style="clear: both"></div>
+ <% folder = trans.app.model.LibraryFolder.get( folder_id ) %>
+ %if folder.library_folder_info_template_associations:
+ ${render_available_templates( folder, library_id, restrict=True, upload=True )}
+ %else:
+ ${render_available_templates( folder, library_id, restrict=False, upload=True )}
+ %endif
+ <div class="form-row">
+ <input type="submit" class="primary-button" name="new_dataset_button" value="Upload to library"/>
+ </div>
+ </form>
+ </div>
</div>
%elif upload_option == 'import_from_history':
<div class="toolForm">
diff -r c44567359a03 -r e899101e63d1 templates/library/new_dataset.mako
--- a/templates/library/new_dataset.mako Fri Jun 12 09:56:23 2009 -0400
+++ b/templates/library/new_dataset.mako Tue Jun 16 09:55:15 2009 -0400
@@ -2,13 +2,15 @@
<%namespace file="/message.mako" import="render_msg" />
<%namespace file="/library/common.mako" import="render_available_templates" />
-<% import os %>
+<% import os, os.path %>
<b>Create new library datasets</b>
<a id="upload-librarydataset--popup" class="popup-arrow" style="display: none;">▼</a>
<div popupmenu="upload-librarydataset--popup">
<a class="action-button" href="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_file' )}">Upload files</a>
- <a class="action-button" href="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_directory' )}">Upload directory of files</a>
+ %if trans.app.config.user_library_import_dir and os.path.exists( os.path.join( trans.app.config.user_library_import_dir, trans.user.email ) ):
+ <a class="action-button" href="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_directory' )}">Upload directory of files</a>
+ %endif
<a class="action-button" href="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='import_from_history' )}">Import datasets from your current history</a>
</div>
<br/><br/>
@@ -31,135 +33,153 @@
<div class="toolForm" id="new_dataset">
%if upload_option == 'upload_file':
<div class="toolFormTitle">Upload files</div>
- %elif upload_option == 'upload_directory':
+ %else:
<div class="toolFormTitle">Upload a directory of files</div>
%endif
- %if upload_option == 'upload_directory' and not trans.app.config.library_import_dir:
- <p/>
- "library_import_dir" is not defined in the Galaxy configuration file
- <p/>
- %else:
- <div class="toolFormBody">
- <form name="tool_form" action="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id )}" enctype="multipart/form-data" method="post">
- <input type="hidden" name="folder_id" value="${folder_id}"/>
- <input type="hidden" name="upload_option" value="${upload_option}"/>
- %if replace_dataset:
- <input type="hidden" name="replace_id" value="${replace_dataset.id}"/>
- <div class="form-row">
- You are currently selecting a new file to replace '<a href="${h.url_for( controller='library', action='library_dataset', id=replace_dataset.id )}">${replace_dataset.name}</a>'.
- <div style="clear: both"></div>
- </div>
- %endif
- %if upload_option == 'upload_file':
- <div class="form-row">
- <label>File:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="file" name="file_data"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>URL/Text:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="url_paste" rows="5" cols="35"></textarea>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Specify a list of URLs (one per line) or paste the contents of a file.
- </div>
- <div style="clear: both"></div>
- </div>
- %elif upload_option == 'upload_directory':
- <div class="form-row">
- <label>Server Directory</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <select name="server_dir">
- <option>None</option>
- %for dir in os.listdir( trans.app.config.library_import_dir ):
- <option>${dir}</option>
- %endfor
- </select>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Upload all files in a subdirectory of <strong>${trans.app.config.library_import_dir}</strong> on the Galaxy server.
- </div>
- <div style="clear: both"></div>
- </div>
- %endif
+ <div class="toolFormBody">
+ <form name="tool_form" action="${h.url_for( controller='library', action='library_dataset_dataset_association', library_id=library_id )}" enctype="multipart/form-data" method="post">
+ <input type="hidden" name="folder_id" value="${folder_id}"/>
+ <input type="hidden" name="upload_option" value="${upload_option}"/>
+ %if replace_dataset:
+ <input type="hidden" name="replace_id" value="${replace_dataset.id}"/>
<div class="form-row">
- <label>Convert spaces to tabs:</label>
+ You are currently selecting a new file to replace '<a href="${h.url_for( controller='library', action='library_dataset', id=replace_dataset.id )}">${replace_dataset.name}</a>'.
+ <div style="clear: both"></div>
+ </div>
+ %endif
+ %if upload_option == 'upload_file':
+ <div class="form-row">
+ <label>File:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <div>
- <input type="checkbox" name="space_to_tab" value="Yes"/>Yes
- </div>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Use this option if you are manually entering intervals.
+ <input type="file" name="file_data"/>
</div>
<div style="clear: both"></div>
</div>
<div class="form-row">
- <label>File Format:</label>
+ <label>URL/Text:</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <select name="file_format">
- <option value="auto" selected>Auto-detect</option>
- %for file_format in file_formats:
- <option value="${file_format}">${file_format}</option>
- %endfor
- </select>
+ <textarea name="url_paste" rows="5" cols="35"></textarea>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ Specify a list of URLs (one per line) or paste the contents of a file.
</div>
<div style="clear: both"></div>
</div>
+ %elif upload_option == 'upload_directory':
<div class="form-row">
- <label>Genome:</label>
+ <%
+ # Directories of files from the Libraries view are restricted to a
+ # sub-directory named the same as the current user's email address
+ # contained within the configured setting for user_library_import_dir
+ user_library_import_dir = os.path.join( trans.app.config.user_library_import_dir, trans.user.email )
+ # See if we have any contained sub-directories, if not the only option
+ # in the server_dir select list will be user_library_import_dir
+ contains_directories = False
+ for entry in os.listdir( user_library_import_dir ):
+ if os.path.isdir( os.path.join( user_library_import_dir, entry ) ):
+ contains_directories = True
+ break
+ %>
+ <label>Server Directory</label>
<div style="float: left; width: 250px; margin-right: 10px;">
- <select name="dbkey">
- %for dbkey in dbkeys:
- %if dbkey[1] == last_used_build:
- <option value="${dbkey[1]}" selected>${dbkey[0]}</option>
- %else:
- <option value="${dbkey[1]}">${dbkey[0]}</option>
- %endif
- %endfor
+ <select name="server_dir">
+ %if contains_directories:
+ <option>None</option>
+ %for entry in os.listdir( user_library_import_dir ):
+ ## Do not include entries that are not directories
+ %if os.path.isdir( os.path.join( user_library_import_dir, entry ) ):
+ <option>${entry}</option>
+ %endif
+ %endfor
+ %else:
+ <option>${trans.user.email}</option>
+ %endif
</select>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ %if contains_directories:
+ Upload all files in a subdirectory of <strong>${user_library_import_dir}}</strong> on the Galaxy server.
+ %else:
+ Upload all files in <strong>${user_library_import_dir}}</strong> on the Galaxy server.
+ %endif
</div>
<div style="clear: both"></div>
</div>
- <div class="form-row">
- <label>Message:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <textarea name="message" rows="3" cols="35"></textarea>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- This information will be displayed in the "Information" column for this dataset in the library browser
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <label>Restrict dataset access to specific roles:</label>
- <select name="roles" multiple="true" size="5">
- %for role in roles:
- <option value="${role.id}">${role.name}</option>
- %endfor
- </select>
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Multi-select list - hold the appropriate key while clicking to select multiple roles. More restrictions can be applied after the upload is complete. Selecting no roles makes a dataset public.
+ %endif
+ <div class="form-row">
+ <label>Convert spaces to tabs:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <div>
+ <input type="checkbox" name="space_to_tab" value="Yes"/>Yes
</div>
</div>
+ <div class="toolParamHelp" style="clear: both;">
+ Use this option if you are manually entering intervals.
+ </div>
<div style="clear: both"></div>
- <% folder = trans.app.model.LibraryFolder.get( folder_id ) %>
- %if folder.library_folder_info_template_associations:
- ${render_available_templates( folder, library_id, restrict=True, upload=True )}
- %else:
- ${render_available_templates( folder, library_id, restrict=False, upload=True )}
- %endif
- <div class="form-row">
- <input type="submit" class="primary-button" name="new_dataset_button" value="Upload to library"/>
+ </div>
+ <div class="form-row">
+ <label>File Format:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <select name="file_format">
+ <option value="auto" selected>Auto-detect</option>
+ %for file_format in file_formats:
+ <option value="${file_format}">${file_format}</option>
+ %endfor
+ </select>
</div>
- </form>
- </div>
- %endif
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>Genome:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <select name="dbkey">
+ %for dbkey in dbkeys:
+ %if dbkey[1] == last_used_build:
+ <option value="${dbkey[1]}" selected>${dbkey[0]}</option>
+ %else:
+ <option value="${dbkey[1]}">${dbkey[0]}</option>
+ %endif
+ %endfor
+ </select>
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <label>Message:</label>
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <textarea name="message" rows="3" cols="35"></textarea>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ This information will be displayed in the "Information" column for this dataset in the library browser
+ </div>
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
+ <div style="float: left; width: 250px; margin-right: 10px;">
+ <label>Restrict dataset access to specific roles:</label>
+ <select name="roles" multiple="true" size="5">
+ %for role in roles:
+ <option value="${role.id}">${role.name}</option>
+ %endfor
+ </select>
+ </div>
+ <div class="toolParamHelp" style="clear: both;">
+ Multi-select list - hold the appropriate key while clicking to select multiple roles. More restrictions can be applied after the upload is complete. Selecting no roles makes a dataset public.
+ </div>
+ </div>
+ <div style="clear: both"></div>
+ <% folder = trans.app.model.LibraryFolder.get( folder_id ) %>
+ %if folder.library_folder_info_template_associations:
+ ${render_available_templates( folder, library_id, restrict=True, upload=True )}
+ %else:
+ ${render_available_templates( folder, library_id, restrict=False, upload=True )}
+ %endif
+ <div class="form-row">
+ <input type="submit" class="primary-button" name="new_dataset_button" value="Upload to library"/>
+ </div>
+ </form>
+ </div>
</div>
%elif upload_option == 'import_from_history':
<div class="toolForm">
diff -r c44567359a03 -r e899101e63d1 test-data/users/test1(a)bx.psu.edu/1.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/users/test1(a)bx.psu.edu/1.fasta Tue Jun 16 09:55:15 2009 -0400
@@ -0,0 +1,2 @@
+>hg17
+gtttgccatcttttgctgctctagggaatccagcagctgtcaccatgtaaacaagcccaggctagaccaGTTACCCTCATCATCTTAGCTGATAGCCAGCCAGCCACCACAGGCAtgagtcaggccatattgctggacccacagaattatgagctaaataaatagtcttgggttaagccactaagttttaggcatagtgtgttatgtaTCTCACAAACATATAAGACTGTGTGTTTGTTGACTGGAGGAAGAGATGCTATAAAGACCACCTTTTAAAACTTCCC-------------------------------AAATACT-GCCACTGATGTCCTG-----ATGGAGGTA-------TGAA-------------------AACATCCACTAAAATTTGTGGTTTATTCATTTTTCATTATTTTGTTTAAGGAGGTCTATAGTGGAAGAGGGAGATATTTGGggaaatt---ttgtatagactagctttcacgatgttagggaattattattgtgtgataatggtcttgcagttaca-cagaaattcttccttattttttgggaa---gcaccaaag----tagggat---aaaatgtcatgatgtgtgcaatacactttaaaatgtttttg-----ccaaaataatt----------------aatgaagc--aaatatggaaa-ataataattattaaatctaggtgatgggtatattgtagttcactatagtattgcacacttttctgtatgtttaaatttttcatttaaaaaaaaactttgagc-----tagacaccaggctatgagctaggagcatagcaatgaccaa----------------------------------------------------------------------------------------------atagactcctaccaa----------------------------------------------
----ctc-aaagaatgcacattctCTGGGAAACATGTTTCCATTAGGAAGCCTCGAATGCAATGTGACTGTGGTCTCCAGGACCTG-TGTGATCCTGGCTTTTCCTGTTCCCTCCG---CATCATCACTGCAGGTGTGTTTTCCCAAGTTTTAAACATTTA------CCTTCCCAGTGGCCTTGCGTCTAGAGGAATCCCTGTATAGTGGT-ACATGAATATAACACATAACAAA-AATCATCTCTATGGTGTGTGTTGTTCCTGGGGTTCAattcagcaaattttccctg-ggcacccatgtgttcttggcactggaaaagtaccgggactgaaacagttgatggccca-atccctgtcctct---taaaacctaagggaggagaTGGAAAGGGG-CACCCAACCCAGACTGAGAGACAGGAATTAGCTGCAAGGGGAACTAGGAAAAGCTTCTTTA---AGGATGGAGAGGCCCTAGTGGAAT-GGGGAGATTCTTCCGGGAGAAGCGATGGATGCACAGTTGGGCATCCCCACAGACGGACTGGAAAGAAAAAAGGCCTGGAGGAATCAATGTG-------CAATGTATGTGTGTTCCCTGGTTcaagggctgg-gaactttctcta-aagggccaggtagaaaacattttaggctttctaagccaag--gcaaaat-tgaggatattacatgggtacttatacaacaagaataaacaatt---tacacaattttttgttgacagaattcaaaactttat----agacacagaaatgcaaatttcctgtaattttcccat-gagaactattcttct--tttgttttgttttgcgacAGGGTTGCGCtgatcctcccgcctcagtctccctaagtgctgagatgttgcaggaagtcagggaccccgaacagagagatcggctggagccgtggcagaggaacataaattttgaagatttcattttaatatggacacttatcagttccc
aaataatacttttataattttttatgcctgtctttgctttaatctcttaatcctgttatcttcataagctaaggatgtacgtcacctcaggaccactgtgataattgtgttaactgtacagattgattgcaaaacatgtgtgtttgaacaatatgaaatcagtgcaccttgaaaaagagcagaataacagcaatttttagggaacaagggaagacaactataaggtctgactgcctgcggggtcgggcaaagggagccatatttttcttcttgcagagagcctataaatagacctgcaagtaggagagatattgctaatttcttttgctagcatggaatattaatattaacaccctgggaaaggaatgcattcctggggggaggtctataaatggccgctctgggaatgtctatcctacgcaatggagataaggactgagatacgccctggtctcctgcagtaccctcaggcttactagggtggtgaaaaactccgccctggtaaatttgtggtcagaccagttttctgctctcgaacactgttttctgttgtttaagatgtttatcaagacaatacgtgcaccgctgaacacagacccttatcagtagttctcctttttgccctttgaagcatgtgatctactccctgttttacaccccctcaccttttgaaacccttaataaaaaacttgctggttt-gaggctcaggtgggcatcacagtactaccgatatgtgatgtcacccccggcggcccagctgtaaaattcctctctttgtactctctctctttatttctcagccagctgacacttatggaaaatagaaagaacctacgttgaaatattgggggcaggttcccccaataTCTGGTGCCCAACGTGGGAtactgagattacaagcatgagccactgcatctggcctcttcttttgatttttttttttcaaacttttacaaatgtagaaaccattcttagcttttgggcatta
ccaaacccggcagtgg-caggctcggttcaccaacgtcatttgcagttccccgCTTTATGTTATGGgttttgttttgttttgtttttttt-attgagacagagtttcactcttgttgcccaggctgtagtgcaatggtctgatcttggctcactgcaacctccacttcccaggttcaagccattctcctgcctcagcctctcaagtagctgggattacagacactcaccaccacacctggctaattttgtatttttagtagagatgaggtttcaccatgttggccaggctggtctcgaaatcctgacctcaggtgatccacccaccttggcctcccaaagtgctgggattacaggcttgagctaccacgcctggctGGGTTGGTTCTCAATGGAGTGGTTTGTTTTTGGAGCTGCTCT-GCGCAGtggggaccagaataggcctg-------------------ggttcctagcccattgctattcctt----accagctgtggattctaaggaaagtcatttaacctcgctggaccttag-attcctcatccctgaaGCCCAAGGGTaaaacaaaacaaaacaaaacaaaacaaaccaaCCCATCATGTAAAGCGGGGAACTACAAACGATACAGGTGAAACATGCCTACCACACCACTCACAGGCT--ATGATGACAAAAACGTGGCTACATCTGGGACCACCCCCCAACCCCCACTTTGTACGTAGGAAATACGGAGTTGAGGATGGAGACCCACAGTATGTCCAGAGTGTCCCCAAAGGCCACAGTGCCCGCCTGGAGCCCTCCAGAGAGCGTGCACTCCCTGGGGTGCCAGCCAGAGACAACTTGCCCTGAGGCTTGGAACTCGATTCTCCGCGTGCCAGAGAAGGGGTGGGACTTCAGAACCCCCAACCCCGCAATCTGGGTCGGGGAGCCTGGCGCACTGCGGGCCGCTCCCTCTAACCCTGGGCTTCCCTG------GCGT
CCAGGGCCGTCGG-----------GGCCGAGTCCCGATTCGCTCCCACCCCGAAGCCGCGCCAGGACCAACGAGGGCGCAGCCGTATGCCCCAGCCCGCTCCGCGGAGCCCCTCACAGCCAcccccgccccgaccgcgccccgcgcggcTCGAAGCACCTTCCCAAGGGGCTGGTCCTTGC----------GCCATAGTCGCGCCGGAGCCTCTGGAGGGACATCAAGGATTTCTC-GCTCCTACCAGCCACCCCCAAATTTTTGGGAGGTACCCAAGGGTGCGCGCGTGGCTCCTGGCGCGCCGAGGCCCTCCCTCGAGGCCCCGCGAGGTGCACACTGC---------GGGCCCAGGGCTAGCAGCCGCCCGGCACGTCGCTACCCTGAGGGGCGGGGCGGGAGCTGGCGCTAGAAATGCGCCGGGGCCTGCGGGGCAGTTGCGCAAGTTGTGATCGGGCCGCTATAAGAGGGGCGGGCAGGCATGGAGCCCCGTAGGAATCGCAGCGCCAGCGGTTGCAAGGTAAGGCCC-CGGCGCGCTCCTTCCTCCTTCTCTGCTGGTCTTTCTTGGCAGGCCACAGGGCCCCACACAACTCTGGATCCCGGGGAAACTGAGTCAGG-AGGGATGCAGGGCGGATGGCTTAGTTCTGGACTATGATAGCTTTGTACCGAG-----TTCTAGCCAGATAGAAGGTTACCGGGAGCTGGGGAGCGTTGGATTTGCTGCTGGGCTGTGCCGGTGCCCAGAAGGCA------GGACCTTGCAGAACCAGCCAGGTCCCTGGGAGACTGTCAGACCCACCAACCTGGTGGCATTCGCAGAGCTGAGATGCATTGGAAATTGCCTTGGGCACATCCCCAAAGATCAGGATGTCCCACCCCAGTCTGAAGGAGA---TAAAGTTGGGGGTAGGAGAGACGCAG-ATGCAAGTGATCAGTCTC---AGTCCCAGACATTGCCTTGCTCTGCGGGTAGGAAT
TCAGGATTCATTTTCCAGGGAAG--------TTCCTGACCTCTGAATGAGAGGGGCTGTGTAAGGCCAATGCCTGGG-AGGAAGGCAAGGATGAGTAGAGGTGGGGGGAAACAAGTGTCAGGAAGA--------------------------------------------CTCAAA---------ATCTTC--------------------------------------------------------------CAGAGAAATTGT-----GCAGGGTCTTACCAGATCTGTCCTCAAAGCCATGCAAATTGCCTTCTTTGCAATGCAT-ACAATGAGGTGTCTCTGGGGGTCAGAACTGG-----------------------TTATTAGGGAACTTCTAGCCAGGACTGCTAAATACGCGCTGTTGG---------CCCACCAGGCTCACCTATAGCCT-TCCTTCAGTCTGGGCTTGGTTTGGATTTCACTGTGGGTGCCATCGCCTTTACACTCCTGTTTCTATAGTTTAAAGATAGTGGTGCTTTGGGAAAG---TGACTCCTTAAATACAGTTAGGTCCAAGTGA-GACAAGTGGCCTGGCTGTCATTTCAGAATAGCAGCTTCCAAGAGG----------TGATTAATTTCTGTTGGAAGGGTGAT-CTTTGGGGAGGT--GGGTGAAGAGCAGAGACTTGGTGGTACCGTTCCAGGAGCACAGGCTCTCT-----TCCTTTGCA--GTGCAGAATGACCTCTGGCAGCCGGAGTTGTGTTTGTT--------CTGTAGGATTCTGAGGTGGGCCATGGGCAGCTGGAACTGGG-----GAATTTTGCCAATCTCTTTCATATTAGGATTGTCTGCAGAACCAGATATGGAGG------CTTCTAGCAACGTGAGTGCTCCTGTTCTAATGCCCTTAGAAACAAGAAGGCCACACTGATCATTTCTCTCACTTAGGCAGGGAG
ACAAGGCAAGAGAGAAACAGT-----------------GGATGC--TTTTAGGTTCTTTCCCTTCCCAAGCAGTTGTGGACATTGGGCTGA-GGGGAACATTTCCACATTGGCTAAAGGAGCGTCCTCCTCATATTTTGTACATTTTATACCCAA--AATAA-CTCTTCTTGGTATTT-GGGGAAATATTTTCCTCCCCGTCC------------ATTCCAGGAAATGGCTCCAAGTGCCAAGGACAGAGCCAGGGAAGTTGCAATGAATTCCTGCCCGTCAGCCCCAGGCAGATGCCTTGCACGTCTGAGTGGCCCATGCAGAGCGTGGAGGTGGCCGCC----------------ACGGAACC-TGGGTCAATGT-CCCACCCCCG----CTTAGATGCCA-CCAGGGG--CGTGGGAGCCAAGGAG--AGAAGAGGGGCTCCAGGAAGGTAGAGTCCTTGTGTCTTGTGCATCTGTGAACAGCACTGGTATGATTTAAAGGAAAATTGAGCCAAATTTTCCGGCAGTCAGTT-----ACCCCATCCCCACCGGGGTAGGAGTCTGGCAGCCGCAGCTCCATTCTGGCCAGTCGGCAGAGAGCCTTGAAATTCTTCTTTGTCCACACAGTTGTCTCAGAGAAACAG--AGAGGTT-GTTTCTGCTTAAAAACAACACACTTGGTGTCTGGGCCCACAGACTCCTTTGCACTTATTCCACGTGTGACAGCCAATGTGCCTCGTTGCTTAGCAGACAGCATGTTACCGTCTTTCCTGCTCAGTTTGTTAG--------------CTCTATGGAATGGAATTTATAATCAATGCCCATACCAACATTTCACTAATATCATAGGAGATTTAGTCTCCATCTGGGTGTACATTACATTTGC--TCTGGGG-TGCTCCAGGC--TGGGGGGTTGCCAAGGAAGAGAAGAGAAACCGCAGAGAAGAC---GGGAGGGCAGGGCAGGGGTCTCTG
AGAAGGGGAGGGGTCCCAGAGTGCAGGAGCAGGAGCCAGGCTC---------ATGAAAGGGGCCACGGGCGGGAGTATCCAGGGACGGCAGTCAAGATGGAGCACAGCTTAGG--AAGCTGAAGGGAATCCTGGCCCACCTGGGTGCTAGAGGGCACATAGGAAGTGCAGGAAGCAGACCAAGGTCCCCAAGAGAGGGAGACCTGGACGCTGAAGCATTTTCTGTCTTTATTAAG-------------ACAACTCCGTAAGAATTCCTGCTGGGCCAAAGTGAATTCTAGGATGCGACTTTAAGATGGGAGCAAGCGAACCATTGAGGAGGCAGGTTACCCTAGTTAGCCAATGCAGATCGAGAATGGGAAATCTTTCatttattcatgcaacagatatttaacgaagccctgccgtgttccaggcctgtgatagatgctggaacaggtacagaga----------tAc-------aggtgtcattaattgatcaggg--caacctctc---cttctgagt--cttgctggagcttcagatgc-ccctcacacagagctcgagggagcctc-aacaattgatcagaagtcaggcaccatggctcacgcatataatcccagcactttgggaggccaaggcaggtggatcactggagcccaggagttccagatcagctggggcaacatggcaaaaccccatctctattaaaaaaaaaaaaagtaactggatgtgatggtacacacctgtagtcccagctacttgggaggctgagaggtgggagaattgcttgagcccgggaagtcgggggtccagtgagccttgatcacaccactgcactccagcctgagtgacagagcaagaccctgacacacacacacacacacacacacacacacacacagattagagctgaaacaggagtagaaacctatctg-tatctctgATGA-GATCAGATC---------TTTCTGATGAACAGAAAGAATG
TAACCCCTGTACTCACACCCTCTCTGCTGGTTACATATGTTAACACGATTTCTCAAATGAGGCTTTTGGTTGCAAATAAGAGAAAATCACTCACGCT-GGCCCTGTG--TTTTTCAAATTGTTTATTGTGATCAACATTTGAAAAAAGAGCCGAGACTCTCAAGAGTGCATTACCCACGGTAAGGGTGAATTTT-ACTTCTTGACACTTATTTCTCTTACATGTATCTATCTGTCTC-----AAATGAAAAATATATTTAGAAAGTTGAAAGCTATCCAAGTGAGTATAAGAAAAGAGTATCTCACCCTGAAGGCTAAGGACAGGGAGGGC---------------------------CACCAGGCCTCACGAGGACCCAGGAACCACAAAGAAGGCT-AGGAAGGAGCACAGGCGGTGACCATACTCTGGCTCAGTGGCTATGTGGGCTCTGGTCTCTCTCAGCTGTTCCATGCATATGAGGCCAAATGTGGCTACCCTAGAGCTTCTGAGCCCTCAACAGAGATGAACTGGACTCTCTGCAGCCCCACTCTAAATTCCTAAGAGAGAAGTTGATTGACCCAATCAGGGTCAGGAGAAGGAAGGGAGGAGGAAAGGGAGGAGAGAAGAGCCTCTTCGTCTCTTGCCTACCACTGGCCAGGCAATTGTAGCCAAGGGGGCTGGAGTGTAAATGCAAACATAGCCATCAAGGGTtgtgtatgtgtgtgtgtgtgtctgtgtgtgtgtatgtgtgtCTCTTGGGTAGGTTAGA-TCTCCCAGGAGGTCCCTACTAAACAGACTTAAGCCCGCAAAATTTTAGCTCTCCAGCCTCACACACTCCACCCCTCTACCATATTGAATCTTCCCAAACCAACTATGGCTTTCCCTAACTCCGGAGc------ttggcctggaatgccctgcttcccctctttcccctggggaacgcctgtccttcaggcctcagttcacacactgcctcccttgca
aagctctccTCCCATCCCCGGAGTCCCT--CTTCCCCTTTGTTCTTTGGGTTCTATGCTTCTTCCCTCATAACTCCCACCAGGTTGTGTTAAAATGAGTTGTTCAAGGTCCTGTCTGTTCCACTAGATTCTGAGCAACTTGGAGAACGAAGATCCAAACTTCGCTGCCTTTATTTCCTCCTTTGTTCTTTTCTCATCCCCAAGTCCCTTCCAACTTGGAGTTATgaagaaaggaaggaaggaagggtgggagggaagaaCAGGAGGGGATCCCACAGG-AGAATGTGTATAGGGAGAGGACTCAGACTAGCTAAAGCTTTTCCCTCATAATTAATAGCAAATACCATGTTACCTGAATTTAATTCACAGTAGCATACAAAAGACTCGCTTTGTTCT-------CCCCA---------TTGATGTCATCAGAGG--------------------GCTGTGGG--------------CAGGCCTAATCTTGGCTCAGGAGGCCCTCCAGCCTGGATCTAAAGAGCAGCAGATGggccaggctcggtggctcatgcctgtaatcccagcattttgggaggccgaggcgggtggatcacgaggtcaggagtttgagaccagcctggccaagatggtgaagcctcgtctctactaaaaatacaaaaattagccaggtgcggtggtgggcgcctgtatttccagctacccgggaggctgaggaggctgaggcaggagaatcgcttgaacccgggaggcggaggttgcagtgagccgaggtcacgccactgcactctagcctgggcaacagagcaagactccgtcaaaaaaaaaataaaaaaataaaaaaataaaaaaaataaaGAGGAGCACACATCTCTGCCCATCCTAACTCCCACTTTGACATTGAGGTCCCCAGGATGGAGGGTCTGCCTCCATCTGCCTTGTCCCCTG-CAATGGTGGGAAGGTGATGGAGCTCAAGTCTAGAGGCCACC
AGCTTCTTAGGGAGG--TAGGAGGTG---------------GAGGGTGGGGTGC-GGGCCCTGCACACAACTGCCAAGTGAGGATGGGGGTGGG-GTCCACCTGAGGATAAGTAACAGTGAGGCTGGTGCAGAGGACCCAGGTGGAGGTAGACAGCAGAATTTGTGGTGGGGT--GGATGGCAC-ATTATATAAGCCTCTCTTGC------TGCCCTGT---TTACTGAGATTGTTTCAttatcttttttggcttttgtttttaagagatggggtcttgctgtgtcacacaggctggagtgcactgtgtgatcatacctcactgcagcctcgacatcctgggctcaggcaaacctcccaccttggcctcccaagtagctgggaccacaagcgtttgccaccacactcagctatttttatttttattttta--ttttttttagagatggggtcttgctgtgtcgcccaggctggtcttgaactcctgggctcaagcgatcctcctgccttggcctcccaaagccctgggattataggctgagccaccacacccagccACATTTCATCTGTGCAGCTCCAGGGGCTCCACATTCT-ACTCTTCTCATTTCTTCTCCAGGGTACCC----------ATGGCAAGGGATGAGGGT--AGAAGATGGGGCA--GCCAGGCCTTGATTAAAGGAGAAGGAAGGCAGCCTGTGGAGAGG---GCAGCC---C---AGGGAG---TGCAGAGAGAAGTGGGCCATGAGGGAGA---CAGCAGAGTGCAGGCTGCGTCC---CAAATGAGCATACAGCCCACTGTGAGCCCACC--ATCTTCCTAGA-GA--CCCCTCTCCTCTCC-AGGAGCTGCTTCAGTAGCACTCA---------GAGGAAAGAATGATGC--------TGTATCAACATTTCAGCAGCTCATCTTTTAACTCTAAGAAAATGGCAGCTCCTAAATGTTCAA--AACTGCTTTG
GAAACTTCT---GGAGAGAGGTTTTGCAGCTCAGGCAGACAGCTGATCGCGGCCTTTCTTCCACCCCAACCCATGCTCTCCCCATGCT--CTCCTGCCACAGCTGCAGCGGGCCCCTGGGTCCTACATTTGCAG-CCCTTTGTCTCTGAGCT-----CAGACTTCCAATTCCAAGCGGCAGCTGGGCAGGCTCACCAGCATGT---CCAGCCAGTACTAGGACATCAGCAGGAGC----CCAACCACCTCTTTCCAAAATCTCTCCTCATGTCTCTCCTAGTTTCCATCTCCATCCTTCTAGTCAGCCAGGCTGAAAACATT-----------------TGCTCCTCAGGGTGCAGAAGGGAAAGCTTTGCCTCCCTTCCTGGTGCTCACTGCCCCTGCGATTCCAGCCCAAGCCCTCCCCGGCTCCTCACC----------CTGGTGTCAGCTGGAAGCCACCATCTCCTAAACCCACCTGtgttcttccacctctgc--------cagggctgc-cctctcctccaccttcacaaactcaattcctacccattctcaggtcccttatcaaatgccatctcctccatgatgcctccctgattccccTGCTGGAaataatggtgataacagctaag--gcattggggttggctacgtgccaggcaaggagttggcactttacatgctttatctcatttcagccacataacatcgacaggt-ggcattatgattcatatcatccccatctgatagccaggaaaactgagtcccagagaggttagc-cactttcctagggccCTGTGCTCTGACTCAAGCATAGCTCTGAGGAACTCTAGCATTCATCAGTTTAAGCACCATGACTTTCTTTGCTGAGTCACCCAAGGCAT-TTCTTCATTTAAATGTTCTTCCTTGGCCAGGCGCAGTGGCTCAggcccaatgcggtggctcacgcctgtaatctcaacactttgggaggccgaggtggg
cagataatctgaggtcaggagttcaagaccagcctggccaacatggtgaaaccccatctctactaaaaatacaaaaaaatgaggctgggcgtgatgactcacacctgtaatcccagcactttgggaggccaaggcaggtggattacatgaggtcaggagttcgagaccagcctggccaacatggtgaaatcctatctctattaaaaatacaaaaaattagccaggcatggtggcaggcacctgtaatcccagctacttgggaggctgaggcaggaaaatggcttgaacccgggaggtggaggttgcagtgagccaaggttgcaccattgcactccagcctgggcaaaaagagggaaacatcgtctaaaaaagaaaaaaaaaaaattagccaggctgggtggtgcatgcccgtaattccagctactcaggaggatgaagcaagagaattgcttgaacccaggaggcagagattacagtgagctgagatcacaacactgcactccagcctaggtaaagaacaagactccatctcaaaaataaataaataaaaataaaTGTTCTTCCTTGCAATGAAGTTAAATATGTAAATTCTCAAACCAGTTGCTTAAGGGCACAGTTTTGTTCTTTACCTATATTTTTAACAAATATTTTATGTAAGTAGTTGAC-AAAATCAAATACTGT-GTACACTACCGAGGCTTCCCTGGGAAAGCCATCAG-CCTCTGCCCCATCCCTTCCCACTCCTGATT-CCACTTTCCTGTGTTTCCATATCTTTTTCATGTCTGTTTCTGGCCCACAGTGGGCGATCAATACATGTTAGCCACCAACCATCAAACCTATATTGAGTAATTATGGTATGTCAGGCACTATGCTCAATGAAATTGTAttaggcttgtacaaaagtaattgtggtttttaagagtaatggcaaaaacggcagttactttcgcaccaacTATTTGCTGCCTTGAATTATTCCTCCTCTC-C
TCATCCCTAAACCCTGCTCCTCCCAGCCATTCTTCCTCCCCTTCTTGGGCCATGGCCAGGCCCCACCCAGGTACTAAGACTCAGGTGAACCAAGGAAGACTTAATGCCCACTCTTTTCTGATGCCCATGTT--GGCATGTGTTAAGtcggttagcattaagtttggctgcatttagcagagacccaaaagaacagtgccttttaaaaggcagaggttatgtctctcacacacacccagcacaagtccaag-------------------------accagcatggcatctcagctccatcaa--cctcaggaaccgagctcctgcagctccctgccctgcagttgataaggtgaggtctttgtcctcctggttcaagatggtgctagaatgttggctaccatatctatagtccaggcatcagaatggagcaagggatgaaaaaggaagagatgaaggcacacgacaggttcctgagagctggcacaggacacttctgcttatatttcactggccagaacttagtcacatggtcacacctagttgggagactctgagaagtaa----agtatttattctagatggccatatccctacc-taagacttggagttttctatgactggggaagaacggaagacaagatattgggaaagactagcagcctctactaAAAGGGTGATCtgtgttgatgtgcgtgtgtgtgtgatgtttgtatg---agcatgtgtgt-tatgtgttgt--gtgtTGGTGGGGCA--GATTCTTGCGAGCACTTTGGTCTCAGATGGACCTGCTACCAGTTCTCTCTGCAGACCCCCATAGGTTTCTCCTAAACCTGGCCT-CTCCTATTAGGCAGCCTTACTCAGCGGCAGCTTCTCAGCTCCATGTTTTCAAGGAACCACAATTTATTTCCAGCATCCACTGAAGCATATTATCAGTGGTGATAGAGGGGGCTTGTAAAACTGTTTTTCCACTTAGGTATTAGA
GGGTGGCCATTATTTGAGAGTGAC-----TATGACCACAGTTAATCTGGTAATAAATTCTCTTGGGTAGGAGGGGGAAAGGAAAGGATGCTTTAAGGAAGCATCTTGCCAGGAGACACAAAGCTAACAAGAGTGGAGCCTGCAG----------------------------CTGGAGCCGCAGAGCCTAATCACTACACCCGCCCATCTCTGCTAGGGTTTCATGACTTCGTATCGGGGATTAGCAGTATTTAACTCTGTTGCACAAACATTTGGTGTA-----TTATTCAGGTAACAAGTAGCTAATAGAGGAAGTTTTACTTTTTTAAGACATAA--------------------ATTTGCCTTTTCCCAAATTACTTGGTACATAGTAC-TTTTCATGTTTGAAGTTGAGATGTGGGTACAATACCATAGCTTTATTCCAGAGCAGGGTATTTGTTTCCAAATGCCATGTTCCCAGCAGCTGCCCTTGACTGGGAATTGGGGTG-----TGATTTGGGCTTTTCCTTAAATCCTTGA-----GGAGCTGGA---GGGGTGGGTGGCTCGCACTCCTGCTTTctgg---------atctgaatc--------------ctgactctgtcatggacctgtt-tgactttgggcaagttgactcctattcctgagccccatat-ttttctcttctgtgaaattcagattaaaaA-AACATGGCTTTGATCAAACATTATAAATAATATATAGACAGACTGCTTGTTTTTATTGTATTGCCAG-AAATGAATCCTACTAATATTGCCATCTATGGACAGAAAATGTATTACCTGTCTTCATCAAGACCCAGACGAGGAAGAACACGAAAAGCGGAGATTAATTTTACTGCCATCTCCAGAACCGTCATCCTAATATTTACTTACAT-TTTATTATTATTTCAGGCTCATGCACATATACTTAGCATGGATCATTGGCCACAGACTCGCA
TACATTTAACTTTATTACCTTT-TGCCTCATGTATCTCATTAAAATTTTGCTGCTTAATCAAGGATCTGCATATTATTTTAATTTTAGAATTCACAGTTCCAAGACTTTGAAAGTTTCAAGCGTTCTGGGTGaatgtgttatgc--tctctcccgccaccatgtctttataccccctgatttctcagccact-atggcaaccactttctactcttagtagcccatatttag--tccaatccccagctcaggagacacttcttccaggg--agccccctgtgccttccagtagtatcttgtacctgccctttttgcaaagctctttcctcctggcttagaatggcccattgacctgtttgtttctcctattaaactgtaagccactcgagggtagagagcatctgttgttcaccattgcatcctcggtgctgagcactgcgtctgacatattatttagaaggtcagtaagtgctagtgggatTCAGGCTCCCAGTGGGTGGGAGAGAAAGGACGTAAGGAAGCAAGTGGTAAAGGCCCTCACAGA-GTATCAGCAGGCTGGTGTGA-GGGAGAAATGCAGAGGATGGGTGAGTAGCA-----TAATCGCTAATGAT-AGGGTAATGATAGAGCACATTTCACAACACCTTt-aagccctttcacgtgcatcagataatttgatcctcataaaagcctagagatagatatattacagg-gatgaaggtggagtattttgtggttatgtgatatg-tttaaaattatgcagtgagtaaatgactgggttcaaaccagaccttaaaagtctgttatctttccCTCG-AGCATGCAATGAAGTCTACATCATCCCTACCATGTCCATTTGATCACACCCTGGCCTCACAGCTCTGTGGTCTACAGGATACCTCATGGTGGTTTTATTGACCAGACAATAATCCTCTTTCTAAGGGGATGCATTTCATTAATACATATGTAGATCATGAATTGTC
TTTGACTTTGAGGGGATGGTAGC----CAGAGCAGAAAGCAAAGCTGATTTTCATCCCCGTCTGGTAATGTGGTTGGTAATGTGAAGA-TGGGTGTATTCTGAGATACCGGCTCCTTGCAGTGTGTGGTTCCTTCTGTTTTCAGGCCC------AAGAAGCCCATCCTGGGAAGGAAAATGCATTGGGGAACCCTGTGCGGATTCTTGTGGCTTTGGCCCTATCTTTTCTATGTCCAAGCTGTGCCCATCCAAAAAGTCCAAGATGACACCAAAACCCTCATCAAGACAATTGTCACCAGGATCAATGACATTTCACACACGGTAAGGAG---AGTATGCGGGGACAAA---GTAGAACTGCAGCCAGCCCAGCACTGGCTCCTAGTGGCACT-GGACC-CAGATAGtccaagaaacatttattgaacgcctcctgaatgccaggcacctactggaagctgagaaGGATTTGAAAGCACAGGGC-TCCACTCTTTCTGGTTGTTTCTTTTGGCCCCTCTGCCTGCTGAGATTCCAGGGGTTAGTGG--------------------------------------------------------TTCTAATTCTAAACCACTCCAAGAACATTTGATTTTGCTACATGTTTCCATTTAAAAATCATAGGATTTGggctgggtgtggtggcttgtacctgtcatcccagcactttgggaggccaaagcaggaggatcattcgagcccaagagttcgagaccagcctgggcagcatagggagaccccatctctacaaaaataataaaaaatgttagctgggcatggtggtgtgtacctgtggtcccagctaggggaggctgagatggaaggatcacctgagcctgggaggttgaggctgcagtgggccctgatcatgccaccgtgctccagcctgggtgacagagtgagaccttgtctcaaaataaataaataaataaataaaAGTCATAGGA
TTTgatcaggcatgatgggtcacatctgtaagcccattgctttaggaggccaaggtaggaggatcagttgaggccaggagttcaagaccagcctgggcaacatggcaagacctctctctctaatttttaaaaaaataaaaaTTAAAGATAAGAAAAAAATCATAGGATTCTCATGAGGCCTCACGTGCTTATTTTCAACCTACCAAGGGGAAACCCAGGCCTCAGCGATTAGCTGAGC----------CACATGCAGGCACAG------------------------CCACTG-----TCTCTTTCCTTCCTGTCCCCTCTGTCCCCACCTTCTGCGCTCGCCTTCCTCCCTGACTTCACTTCCTTGAATCTTAGTGCCTACGACCAGAGGGAGCTGTGAAGTTCCTTG----TGTCCCATTGGCAGGAA-CAAGACCCCCAGAAGCATCTCCTCAGGGC------CTCTA-----TCCCATCTC-TAGATGTGCTTGTCATTAGG-Gttct-------------tgtagttccagctgatctctggccctgccgctcaaagatacccaaaagagcgagtctaccctttttcacattcaaccctctactgatttgcaaatagcagtcagtgcccaccctggtcttttctctggggtccagcaggcctagaccttcagccattttcctgatgaGGTCTGTAtttgaaattaggaagattaagtttgaatcttcacacttctgat----gtctgtgagatcttcagcaagttccttact--gtctttaagccttgt-tttcatcatctggataatggggatatcacacacta-ttcacaaggttgttatgaggcctaaattagctaaagcaATTGAATCCTCCTTACCCCCTGCATGGAGCTCTCTGGAGACTTCCACGTCTCCTGGTCATTGTGGGTGTCTTATGGTA-GTCTTGGGCAGTTAGGGAGAAGTTAGGTGTCTGGAAGCAAA
GATGGCTCAGAACTAGATAGAGTC-TTGGGCATTTTATA-GATAAAAACTCTT--GTCTCCtttaaaaataataaaaaaaaattaGCTGGGCATATTAGCCACTCAGCAAGACTGCACGTGATAGATCCCGAGTGCCCCACCTTGGGTGGTGTAATACACAATATCACGGGAGCCCCGGGTAGTAACCACGGAGGTGTCAGCCTCAGTGCTGTGGGCAGATG-GATGGGGAGAGCC--TCCCGG-AACTGGAGTCACTGGAGCA----------------------------GGGTTGGGGGGCCTCACTGAGGGTACGGCCTTGATCTCTAAGGAGGAGGGACTGCCTGGAAAAGC-TGACTGGGAGGGAGGACTCGGCTGGGGGTAGAAGGGA----------CTAGGGAAGGCTGGGGGTGGGGGTGCTTATGGAGGACCTCAGATGCCTGGGGAACAGACTCCACTAAATAAAACATATGAAACCATGGCTGGTTCTTCAGCAGAGGCCATGTAGAGAAAGGAATGACCTAGGAAAGTTGGCCTGGAAGTGGAGGGAAGGATGGTGTGGGAAAAGCAGGAA--------TCTCGGAGACCAGCTTAGAGGCTTGGCAGTCACCTGGGTGCAGG-ATACAAGGGCCTGAGCCAAAGTGGTGAGGGAGGGTGGAAGGAGGCAGCCCAGAGAATGACCCTCCATGCCCACGGGGAAGGCAGAGGGCTCT-GAGAGCGA--TTCCTCCCACATG-CT-GAGCACTTGTTCTCCCTCTTCCTCCTGCATAGCAGTCAGTCTCCTCCAAACAGAAAGTCACCGGTTTGGACTTCATTCCTGGGCTCCACCCCATCCTGACCTTATCCAAGATGGACCAGACACTGGCAGTCTACCAACAGATCCTCACCAGTATGCCTTCCAGAAACGTGATCCAAATATCCAACGACCTGGAGAACCTCCGGGATCTTCTTCACGTGCTGGCCTTCTCTA
AGAGCTGCCACTTGCCCTGGGCCAGTGGCCTGGAGACCTTGGACAGCCTGGGGGGTGTCCTGGAAGCTTCAGGCTACTCCACAGAGGTGGTGGCCCTGAGCAGGCTGCAGGGGTCTCTGCAGGACATGCTGTGGCAGCTGGACCTCAGCCCTGGGTGCTGAGGCCTTGAAGGTCACTCTTCCTGCAAGGACTACGTTAAGGGAAGGAACTCTGGCTTCCAGGTATCTCCAGGATTGAAGAGCATTGCATGGACACCCCTTATCCAGGACTCTGTCAATT--TCCCTGACTCCTCTAAGCCACTCTTCCAAAGGCATAAGACCCTAAGCCTCCTTTTGCTTGAAACCAAAGATATATACACAGGATCCTATTCTCACCAGGAAGGGGG-TCCACCC-AGCAAAGAGTGGGCTGCATCTGGGATTCCCACCAAGGTCTTCAGCCATCA---ACAAGAGTTGTCTTGTCCCCTCT-TGACCCATCT-----------------CCCCCTCACTGAATGCCTCAATGTGACCAGGGGTGATTTCAGAGAGGGCAGAGGGGTAGGCAGAGCCTTTGGATGACCA--GAACAAGGTTCCCTCTGAGAATTCCAAGGAGTTCCATGAAGACCACATCCACACACG--CAGGAACTCCC--AGCAACACAAGCTGGAA---GCACATGTTTATTTATTCTGCATTTTATTCTGGATGGATTTGAAGCAAAGCACCAGCTTCTCCAGGCTCTTTGGGGTCAGCCAGGGCCAGGGGTCTCCCTGGAGTGCAGTTTCCAATCCCATAGATGGGTC-TGGCTGAGCTGAACCCA---TTTTGAGTGACT----CGAGGGTTGGG-TTCATCTGAGCAAGAGCTGGCAAAGGTGGCTCTCCAGTTAGTTCTCTCGTAACTGGTTTCATTTCTACTGTGACTGATGTTACATCACAGTGTTTGCAATGGTGTTGCCCTGAGTGGATCTCCAAGGACCAGGTTA
TTTTAAAA---AGATTTGTTTTGTCAAGTGTCATATGTAGGTGTCTGCACCCAGGGGTGGG-GAATGTTTGGGCAGAAGGGAGAAGGATCTAGAATGTGTTTTCTGAATAACATTTGTGTGGTGGGTTCTTTGGAAGGAGTGAGA-TCATTTTCTTATCTTCTGCAATTGCTTAGGATGTTTTTCATGAAAA------------TAGCTCTTTCAG-GGGGGTTGTGAGGCCTGGCCAGGCACCCCCTGGAGAGAAGTTTCTGGCCCTGGCTGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAAAGGGCTGAAAGCCATTTGTTGGGGCAGTGGTAAGCTCTGGCTTTCTCCGACTGCTAGGGAGTGGTCTTTCCTATCATGGAGTGACGGTCCCACACTGGTGACTGCGATCTTCAGAGCAGGGGTCCTTGGTGT-GACCCTCTGAATGGTCCAGGGTTGATCACACTCTGGGTTTATTACATGGCAG-----TGTTCCTATTTGGGGCTTGCATGCCAAATTGTAGTTCTTGTCTGATTGGCTCACCC-AAGCAAGGCCAAAATTACCAAAAATCTTGGGGGG--TTTTTACTC-CAGTGGTGAAGAAAACTCCTTTAGCAGG-TGGTCCTGAGACCT-GACAAGCACTGCTAGGCGAGTGCCAGGACTCCCCAGGCCAGGCCACCAGGATGGCCCTTCCCACTGGAGGTCACATTCAGGAAGATGAAAGAGGAGGTTTGGGGTCTGCCACCATCCTGCTGCTGTGTTTTTGCTATCACACAGTGGGTGGTGGATCTGTCCAAGGAAACTTGAATCAAAGCAGTTAAC-TTTAAGactgagcacctgcttcatgctcagccctgactggtgctataggctggagaagctcacccaataaacattaagatt-gaggcctgccctcagggatcttgcattcccagtggTCAAACC-GCAC
TCACCCATGTGCCAAGGTGGGGTA-TTTACCACAGCAG--CTGAACAGCCAAATGCATGGTGCAGTTGACAGCAGGTGGGAAATGGTATGAGCTGAGGGGGGCCGTGCCCAGGGGCCCACAGG-GAACCCTGCTTGCACTTTGTAACATGTTTA-----CTTTTCagggcatcttagctt---ctatta-----tagccacatccctttga---aacaagataactgagaatttaaaaataagaa-----aata--TGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAAATGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCATGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGACCCCAAAGAGCCTGGAGAAGCTGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCAGATGCTTTGCTTCAAATCCATCCAGAATAAAACGCA
diff -r c44567359a03 -r e899101e63d1 test-data/users/test3(a)bx.psu.edu/run1/2.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/users/test3(a)bx.psu.edu/run1/2.fasta Tue Jun 16 09:55:15 2009 -0400
@@ -0,0 +1,11 @@
+>Sequence 561 BP; 135 A; 106 C; 98 G; 222 T; 0 other;
+gttcgatgcc taaaatacct tcttttgtcc ctacacagac cacagttttc ctaatggctt
+tacaccgact agaaattctt gtgcaagcac taattgaaag cggttggcct agagtgttac
+cggtttgtat agctgagcgc gtctcttgcc ctgatcaaag gttcattttc tctactttgg
+aagacgttgt ggaagaatac aacaagtacg agtctctccc ccctggtttg ctgattactg
+gatacagttg taataccctt cgcaacaccg cgtaactatc tatatgaatt attttccctt
+tattatatgt agtaggttcg tctttaatct tcctttagca agtcttttac tgttttcgac
+ctcaatgttc atgttcttag gttgttttgg ataatatgcg gtcagtttaa tcttcgttgt
+ttcttcttaa aatatttatt catggtttaa tttttggttt gtacttgttc aggggccagt
+tcattattta ctctgtttgt atacagcagt tcttttattt ttagtatgat tttaatttaa
+aacaattcta atggtcaaaa a
\ No newline at end of file
diff -r c44567359a03 -r e899101e63d1 test/base/twilltestcase.py
--- a/test/base/twilltestcase.py Fri Jun 12 09:56:23 2009 -0400
+++ b/test/base/twilltestcase.py Tue Jun 16 09:55:15 2009 -0400
@@ -1150,7 +1150,6 @@
tc.fv( "1", "file_format", file_format )
tc.fv( "1", "dbkey", dbkey )
tc.fv( "1", "message", message.replace( '+', ' ' ) )
- library_dir = "%s" % self.file_dir
tc.fv( "1", "server_dir", "library" )
tc.submit( "new_dataset_button" )
check_str = "Added 3 dataset versions to the library dataset '%s' in the folder '%s'." % ( ldda_name, folder_name )
@@ -1167,34 +1166,55 @@
check_str = "Added 1 datasets to the folder '%s' ( each is selected )." % folder_name
self.check_page_for_string( check_str )
self.home()
- def add_datasets_from_library_dir( self, library_id, folder_id, folder_name, file_format='auto', dbkey='hg18', roles_tuple=[],
- message='', root=False, check_template_str1='', check_template_str2='', check_template_str3='' ):
+ def add_dir_of_files_from_admin_view( self, library_id, folder_id, file_format='auto', dbkey='hg18', roles_tuple=[],
+ message='', check_str_after_submit='', check_str1='', check_str2='', check_str3='' ):
"""Add a directory of datasets to a folder"""
# roles is a list of tuples: [ ( role_id, role_description ) ]
self.home()
self.visit_url( "%s/admin/library_dataset_dataset_association?upload_option=upload_directory&library_id=%s&folder_id=%s" % ( self.url, library_id, folder_id ) )
self.check_page_for_string( 'Upload a directory of files' )
# If we've been sent some template labels, make sure they are included in the upload form
- if check_template_str1:
- self.check_page_for_string( check_template_str1 )
- if check_template_str2:
- self.check_page_for_string( check_template_str2 )
- if check_template_str3:
- self.check_page_for_string( check_template_str3 )
+ if check_str1:
+ self.check_page_for_string( check_str1 )
+ if check_str2:
+ self.check_page_for_string( check_str2 )
+ if check_str3:
+ self.check_page_for_string( check_str3 )
tc.fv( "1", "folder_id", folder_id )
tc.fv( "1", "file_format", file_format )
tc.fv( "1", "dbkey", dbkey )
tc.fv( "1", "message", message.replace( '+', ' ' ) )
- library_dir = "%s" % self.file_dir
tc.fv( "1", "server_dir", "library" )
for role_tuple in roles_tuple:
tc.fv( "1", "roles", role_tuple[1] ) # role_tuple[1] is the role name
tc.submit( "new_dataset_button" )
- if root:
- check_str = "Added 3 datasets to the library '%s' ( each is selected )." % folder_name
- else:
- check_str = "Added 3 datasets to the folder '%s' ( each is selected )." % folder_name
- self.check_page_for_string( check_str )
+ if check_str_after_submit:
+ self.check_page_for_string( check_str_after_submit )
+ self.home()
+ def add_dir_of_files_from_libraries_view( self, library_id, folder_id, selected_dir, file_format='auto', dbkey='hg18', roles_tuple=[],
+ message='', check_str_after_submit='', check_str1='', check_str2='', check_str3='' ):
+ """Add a directory of datasets to a folder"""
+ # roles is a list of tuples: [ ( role_id, role_description ) ]
+ self.home()
+ self.visit_url( "%s/library/library_dataset_dataset_association?upload_option=upload_directory&library_id=%s&folder_id=%s" % ( self.url, library_id, folder_id ) )
+ self.check_page_for_string( 'Upload a directory of files' )
+ # If we've been sent some template labels, make sure they are included in the upload form
+ if check_str1:
+ self.check_page_for_string( check_str1 )
+ if check_str2:
+ self.check_page_for_string( check_str2 )
+ if check_str3:
+ self.check_page_for_string( check_str3 )
+ tc.fv( "1", "folder_id", folder_id )
+ tc.fv( "1", "file_format", file_format )
+ tc.fv( "1", "dbkey", dbkey )
+ tc.fv( "1", "message", message.replace( '+', ' ' ) )
+ tc.fv( "1", "server_dir", selected_dir )
+ for role_tuple in roles_tuple:
+ tc.fv( "1", "roles", role_tuple[1] ) # role_tuple[1] is the role name
+ tc.submit( "new_dataset_button" )
+ if check_str_after_submit:
+ self.check_page_for_string( check_str_after_submit )
self.home()
def delete_library_item( self, library_id, library_item_id, library_item_name, library_item_type='library_dataset' ):
"""Mark a library item as deleted"""
diff -r c44567359a03 -r e899101e63d1 test/functional/__init__.py
--- a/test/functional/__init__.py Fri Jun 12 09:56:23 2009 -0400
+++ b/test/functional/__init__.py Tue Jun 16 09:55:15 2009 -0400
@@ -80,6 +80,7 @@
allow_user_deletion = True,
admin_users = 'test(a)bx.psu.edu',
library_import_dir = galaxy_test_file_dir,
+ user_library_import_dir = os.path.join( galaxy_test_file_dir, 'users' ),
global_conf = { "__file__": "universe_wsgi.ini.sample" } )
log.info( "Embedded Universe application started" )
diff -r c44567359a03 -r e899101e63d1 test/functional/test_security_and_libraries.py
--- a/test/functional/test_security_and_libraries.py Fri Jun 12 09:56:23 2009 -0400
+++ b/test/functional/test_security_and_libraries.py Tue Jun 16 09:55:15 2009 -0400
@@ -1396,28 +1396,26 @@
( self.url, str( library_one.id ), str( subfolder_one.id ), str( ldda_six_version_two.id ) ) )
self.check_page_for_string( 'This is an expired version of this library dataset' )
self.home()
- def test_185_upload_datasets_from_library_dir( self ):
- """Testing uploading 3 datasets from a library directory to a root folder"""
+ def test_185_upload_directory_of_files_from_admin_view( self ):
+ """Testing uploading a directory of files to a root folder from the Admin view"""
message = 'This is a test for uploading a directory of files'
roles_tuple = [ ( str( role_one.id ), role_one.name ) ]
+ check_str = "Added 3 datasets to the library '%s' ( each is selected )." % library_one.root_folder.name
## TODO: temporarily eliminating templates until we have the new forms features done
"""
- self.add_datasets_from_library_dir( str( library_one.id ),
+ self.add_dir_of_files_from_admin_view( str( library_one.id ),
str( library_one.root_folder.id ),
- library_one.root_folder.name,
roles_tuple=roles_tuple,
message=message.replace( '+', ' ' ),
- root=True,
+ check_str=check_str,
check_template_str1='wind',
check_template_str2='bag',
check_template_str3='Fubar' )
"""
- self.add_datasets_from_library_dir( str( library_one.id ),
- str( library_one.root_folder.id ),
- library_one.root_folder.name,
- roles_tuple=roles_tuple,
- message=message.replace( '+', ' ' ),
- root=True )
+ self.add_dir_of_files_from_admin_view( str( library_one.id ),
+ str( library_one.root_folder.id ),
+ roles_tuple=roles_tuple,
+ message=message.replace( '+', ' ' ) )
self.home()
self.visit_page( 'admin/browse_library?id=%s' % ( str( library_one.id ) ) )
self.check_page_for_string( admin_user.email )
@@ -1531,7 +1529,48 @@
pass
check_edit_page2( latest_3_lddas )
self.home()
- def test_195_mark_group_deleted( self ):
+ def test_195_upload_directory_of_files_from_libraries_view( self ):
+ """Testing uploading a directory of files to a root folder from the Libraries view"""
+ # admin_user will not have the option sto upload a directory of files from the
+ # Libraries view since a sub-directory named the same as their email is not contained
+ # in the configured user_library_import_dir. However, since members of role_one have
+ # the LIBRARY_ADD permission, we can test this feature as regular_user1 or regular_user3
+ self.logout()
+ self.login( email=regular_user1.email )
+ message = 'Uploaded all files in test-data/users/test1...'
+ # Since regular_user1 does not have any sub-directories contained within her configured
+ # user_library_import_dir, the only option in her server_dir select list will be the
+ # directory named the same as her email
+ check_str_after_submit = "Added 1 datasets to the library '%s' ( each is selected )." % library_one.root_folder.name
+ self.add_dir_of_files_from_libraries_view( str( library_one.id ),
+ str( library_one.root_folder.id ),
+ regular_user1.email,
+ check_str_after_submit=check_str_after_submit,
+ message=message.replace( '+', ' ' ) )
+ self.home()
+ self.visit_page( 'library/browse_library?id=%s' % ( str( library_one.id ) ) )
+ self.check_page_for_string( regular_user1.email )
+ self.check_page_for_string( message )
+ self.logout()
+ self.login( regular_user3.email )
+ message = 'Uploaded all files in test-data/users/test3.../run1'
+ # Since regular_user2 has a subdirectory contained within her configured user_library_import_dir,
+ # she will have a "None" option in her server_dir select list
+ check_str1 = '<option>None</option>'
+ self.add_dir_of_files_from_libraries_view( str( library_one.id ),
+ str( library_one.root_folder.id ),
+ 'run1',
+ check_str_after_submit=check_str_after_submit,
+ check_str1=check_str1,
+ message=message.replace( '+', ' ' ) )
+ self.home()
+ self.visit_page( 'library/browse_library?id=%s' % ( str( library_one.id ) ) )
+ self.check_page_for_string( regular_user3.email )
+ self.check_page_for_string( message )
+ self.home()
+ self.logout()
+ self.login( email=admin_user.email )
+ def test_200_mark_group_deleted( self ):
"""Testing marking a group as deleted"""
self.home()
self.visit_url( '%s/admin/groups' % self.url )
@@ -1545,13 +1584,13 @@
raise AssertionError( '%s incorrectly lost all members when it was marked as deleted.' % group_two.name )
if not group_two.roles:
raise AssertionError( '%s incorrectly lost all role associations when it was marked as deleted.' % group_two.name )
- def test_200_undelete_group( self ):
+ def test_205_undelete_group( self ):
"""Testing undeleting a deleted group"""
self.undelete_group( str( group_two.id ), group_two.name )
group_two.refresh()
if group_two.deleted:
raise AssertionError( '%s was not correctly marked as not deleted.' % group_two.name )
- def test_205_mark_role_deleted( self ):
+ def test_210_mark_role_deleted( self ):
"""Testing marking a role as deleted"""
self.home()
self.visit_url( '%s/admin/roles' % self.url )
@@ -1565,10 +1604,10 @@
raise AssertionError( '%s incorrectly lost all user associations when it was marked as deleted.' % role_two.name )
if not role_two.groups:
raise AssertionError( '%s incorrectly lost all group associations when it was marked as deleted.' % role_two.name )
- def test_210_undelete_role( self ):
+ def test_215_undelete_role( self ):
"""Testing undeleting a deleted role"""
self.undelete_role( str( role_two.id ), role_two.name )
- def test_215_mark_dataset_deleted( self ):
+ def test_220_mark_dataset_deleted( self ):
"""Testing marking a library dataset as deleted"""
self.home()
self.delete_library_item( str( library_one.id ), str( ldda_two.library_dataset.id ), ldda_two.name, library_item_type='library_dataset' )
@@ -1581,13 +1620,13 @@
except:
pass
self.home()
- def test_220_display_deleted_dataset( self ):
+ def test_225_display_deleted_dataset( self ):
"""Testing displaying deleted dataset"""
self.home()
self.visit_url( "%s/admin/browse_library?id=%s&show_deleted=True" % ( self.url, str( library_one.id ) ) )
self.check_page_for_string( ldda_two.name )
self.home()
- def test_225_hide_deleted_dataset( self ):
+ def test_230_hide_deleted_dataset( self ):
"""Testing hiding deleted dataset"""
self.home()
self.visit_url( "%s/admin/browse_library?id=%s&show_deleted=False" % ( self.url, str( library_one.id ) ) )
@@ -1597,7 +1636,7 @@
except:
pass
self.home()
- def test_230_mark_folder_deleted( self ):
+ def test_235_mark_folder_deleted( self ):
"""Testing marking a library folder as deleted"""
self.home()
self.delete_library_item( str( library_one.id ), str( folder_two.id ), folder_two.name, library_item_type='folder' )
@@ -1609,7 +1648,7 @@
except:
pass
self.home()
- def test_230_mark_folder_undeleted( self ):
+ def test_240_mark_folder_undeleted( self ):
"""Testing marking a library folder as undeleted"""
self.home()
self.undelete_library_item( str( library_one.id ), str( folder_two.id ), folder_two.name, library_item_type='folder' )
@@ -1624,7 +1663,7 @@
except:
pass
self.home()
- def test_235_mark_library_deleted( self ):
+ def test_245_mark_library_deleted( self ):
"""Testing marking a library as deleted"""
self.home()
# First mark folder_two as deleted to further test state saving when we undelete the library
@@ -1648,7 +1687,7 @@
except:
pass
self.home()
- def test_245_purge_user( self ):
+ def test_250_purge_user( self ):
"""Testing purging a user account"""
self.mark_user_deleted( user_id=regular_user3.id, email=regular_user3.email )
regular_user3.refresh()
@@ -1680,7 +1719,7 @@
role = galaxy.model.Role.get( ura.role_id )
if role.type != 'private':
raise AssertionError( 'UserRoleAssociations for user %s are not related with the private role.' % regular_user3.email )
- def test_250_manually_unpurge_user( self ):
+ def test_255_manually_unpurge_user( self ):
"""Testing manually un-purging a user account"""
# Reset the user for later test runs. The user's private Role and DefaultUserPermissions for that role
# should have been preserved, so all we need to do is reset purged and deleted.
@@ -1688,7 +1727,7 @@
regular_user3.purged = False
regular_user3.deleted = False
regular_user3.flush()
- def test_255_purge_group( self ):
+ def test_260_purge_group( self ):
"""Testing purging a group"""
group_id = str( group_two.id )
self.mark_group_deleted( group_id, group_two.name )
@@ -1703,7 +1742,7 @@
raise AssertionError( "Purging the group did not delete the GroupRoleAssociations for group_id '%s'" % group_id )
# Undelete the group for later test runs
self.undelete_group( group_id, group_two.name )
- def test_260_purge_role( self ):
+ def test_265_purge_role( self ):
"""Testing purging a role"""
role_id = str( role_two.id )
self.mark_role_deleted( role_id, role_two.name )
@@ -1728,14 +1767,14 @@
dp = galaxy.model.DatasetPermissions.filter( galaxy.model.DatasetPermissions.table.c.role_id == role_id ).all()
if dp:
raise AssertionError( "Purging the role did not delete the DatasetPermissionss for role_id '%s'" % role_id )
- def test_265_manually_unpurge_role( self ):
+ def test_270_manually_unpurge_role( self ):
"""Testing manually un-purging a role"""
# Manually unpurge, then undelete the role for later test runs
# TODO: If we decide to implement the GUI feature for un-purging a role, replace this with a method call
role_two.purged = False
role_two.flush()
self.undelete_role( str( role_two.id ), role_two.name )
- def test_270_purge_library( self ):
+ def test_275_purge_library( self ):
"""Testing purging a library"""
self.home()
self.delete_library_item( str( library_one.id ), str( library_one.id ), library_one.name, library_item_type='library' )
@@ -1771,7 +1810,7 @@
raise AssertionError( 'The library_dataset id %s named "%s" has not been marked as deleted.' % \
( str( library_dataset.id ), library_dataset.name ) )
check_folder( library_one.root_folder )
- def test_275_reset_data_for_later_test_runs( self ):
+ def test_280_reset_data_for_later_test_runs( self ):
"""Reseting data to enable later test runs to pass"""
##################
# Eliminate all non-private roles
diff -r c44567359a03 -r e899101e63d1 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample Fri Jun 12 09:56:23 2009 -0400
+++ b/universe_wsgi.ini.sample Tue Jun 16 09:55:15 2009 -0400
@@ -55,9 +55,13 @@
# Galaxy session security
id_secret = changethisinproductiontoo
-# Files in directories under this directory can be directly imported through
-# the library admin's "add dataset" tool
+# Directories of files contained in the following directory can be uploaded to a library from the Admin view
#library_import_dir = /var/opt/galaxy/import
+# The following can be configured to allow non-admin users to upload a directory of files. The
+# configured directory must contain sub-directories named the same as the non-admin user's Galaxy
+# login ( email ). The non-admin user is restricted to uploading files or sub-directories of files
+# contained in their directory.
+# user_library_import_dir = /var/opt/galaxy/import/users
# path to sendmail
sendmail_path = /usr/sbin/sendmail
1
0
16 Jun '09
details: http://www.bx.psu.edu/hg/galaxy/rev/c44567359a03
changeset: 2452:c44567359a03
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri Jun 12 09:56:23 2009 -0400
description:
Bug fix in for metadata, should correct functional tests ( I hope ).
1 file(s) affected in this change:
lib/galaxy/datatypes/metadata.py
diffs (21 lines):
diff -r ee43bace03db -r c44567359a03 lib/galaxy/datatypes/metadata.py
--- a/lib/galaxy/datatypes/metadata.py Thu Jun 11 15:41:57 2009 -0400
+++ b/lib/galaxy/datatypes/metadata.py Fri Jun 12 09:56:23 2009 -0400
@@ -295,13 +295,14 @@
def get_html_field( self, value=None, context={}, other_values={}, values=None, **kwd):
try:
values = kwd['trans'].db_builds
- except AttributeError: pass
+ except KeyError:
+ pass
return super(DBKeyParameter, self).get_html_field( value, context, other_values, values, **kwd)
-
def get_html( self, value=None, context={}, other_values={}, values=None, **kwd):
try:
values = kwd['trans'].db_builds
- except AttributeError: pass
+ except KeyError:
+ pass
return super(DBKeyParameter, self).get_html( value, context, other_values, values, **kwd)
1
0