lists.galaxyproject.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2023
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
List overview
Download
galaxy-commits
May 2010
----- 2023 -----
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
galaxy-commits@lists.galaxyproject.org
2 participants
158 discussions
Start a n
N
ew thread
[hg] galaxy 3820: Committed mod_zip code from the wrong repo
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/58108ced520b
changeset: 3820:58108ced520b user: Nate Coraor <nate(a)bx.psu.edu> date: Mon May 24 16:11:13 2010 -0400 description: Committed mod_zip code from the wrong repo diffstat: lib/galaxy/web/controllers/library_common.py | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diffs (48 lines): diff -r d1624544bc55 -r 58108ced520b lib/galaxy/web/controllers/library_common.py --- a/lib/galaxy/web/controllers/library_common.py Mon May 24 16:00:03 2010 -0400 +++ b/lib/galaxy/web/controllers/library_common.py Mon May 24 16:11:13 2010 -0400 @@ -1267,7 +1267,7 @@ for fname, relpath in self.files.items(): size = os.stat( fname ).st_size quoted_fname = urllib.quote_plus( fname, '/' ) - rval += '- %i %s%s %s\n' % ( size, self.url_base, quoted_fname, relpath ) + rval += '- %i %s%s %s\r\n' % ( size, self.url_base, quoted_fname, relpath ) return rval # Perform an action on a list of library datasets. params = util.Params( kwd ) @@ -1429,6 +1429,8 @@ message = "Unable to create archive for download, please report this error" status = 'error' if not error: + lname = trans.sa_session.query( trans.app.model.Library ).get( trans.security.decode_id( library_id ) ).name + fname = lname.replace( ' ', '_' ) + '_files' if action == 'zip': archive.close() tmpfh = open( tmpf ) @@ -1443,21 +1445,21 @@ status = 'error' if not error: trans.response.set_content_type( "application/x-zip-compressed" ) - trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) + trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (fname,outext) return tmpfh elif action == 'ngxzip': - #trans.response.set_content_type( "application/x-zip-compressed" ) - #trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) + trans.response.set_content_type( "application/x-zip-compressed" ) + trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (fname,outext) trans.response.headers[ "X-Archive-Files" ] = "zip" return archive else: trans.response.set_content_type( "application/x-tar" ) - trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) + trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (fname,outext) archive.wsgi_status = trans.response.wsgi_status() archive.wsgi_headeritems = trans.response.wsgi_headeritems() return archive.stream else: # unknown action - message = '### unknown action = %s in act_on_multiple_datasets' % action + message = '### unknown action = %s in act_on_multiple_datasets' % action return trans.response.send_redirect( web.url_for( controller='library_common', action='browse_library',
1
0
0
0
[hg] galaxy 3819: lims: ui fixes in adding samples
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/d1624544bc55
changeset: 3819:d1624544bc55 user: rc date: Mon May 24 16:00:03 2010 -0400 description: lims: ui fixes in adding samples diffstat: lib/galaxy/web/controllers/requests.py | 63 +++++++++++++++---------- lib/galaxy/web/controllers/requests_admin.py | 63 +++++++++++++++---------- templates/admin/requests/show_request.mako | 52 ++++++++++++++------ templates/requests/show_request.mako | 69 +++++++++++++++++---------- test/base/twilltestcase.py | 6 +- 5 files changed, 159 insertions(+), 94 deletions(-) diffs (388 lines): diff -r f7525fb463e0 -r d1624544bc55 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Mon May 24 15:33:55 2010 -0400 +++ b/lib/galaxy/web/controllers/requests.py Mon May 24 16:00:03 2010 -0400 @@ -288,7 +288,7 @@ sample_copy=self.__copy_sample(current_samples), details='hide', edit_mode=util.restore_text( params.get( 'edit_mode', 'False' ) ), message=message, status=status ) - def __library_widgets(self, trans, user, sample_index, libraries, sample=None, **kwd): + def __library_widgets(self, trans, user, sample_index, libraries, sample=None, lib_id=None, folder_id=None, **kwd): ''' This method creates the data library & folder selectbox for creating & editing samples. First we get a list of all the libraries accessible to @@ -298,7 +298,8 @@ ''' params = util.Params( kwd ) # data library selectbox - lib_id = params.get( "sample_%i_library_id" % sample_index, 'none' ) + if not lib_id: + lib_id = params.get( "sample_%i_library_id" % sample_index, 'none' ) selected_lib = None if sample and lib_id == 'none': if sample.library: @@ -317,7 +318,7 @@ lib_widget.add_option('Select one', 'none') # all the libraries available to the selected user for lib, hidden_folder_ids in libraries.items(): - if str(lib.id) == lib_id: + if str(lib.id) == str(lib_id): lib_widget.add_option(lib.name, lib.id, selected=True) selected_lib, selected_hidden_folder_ids = lib, hidden_folder_ids.split(',') else: @@ -338,7 +339,10 @@ else: current_fid = params.get( "sample_%i_folder_id" % sample_index, 'none' ) else: - current_fid = 'none' + if folder_id: + current_fid = folder_id + else: + current_fid = 'none' # first option if lib_id == 'none': folder_widget.add_option('Select one', 'none', selected=True) @@ -479,29 +483,38 @@ # if the user has selected a sample no. to copy then copy the contents # of the src sample to the new sample else an empty sample src_sample_index = int(params.get( 'copy_sample', -1 )) + # get the number of new copies of the src sample + num_sample_to_copy = int(params.get( 'num_sample_to_copy', 1 )) if src_sample_index == -1: - # empty sample - lib_widget, folder_widget = self.__library_widgets(trans, request.user, - len(current_samples), - libraries, None, **kwd) - current_samples.append(dict(name='Sample_%i' % (len(current_samples)+1), - barcode='', - library=None, - folder=None, - field_values=['' for field in request.type.sample_form.fields], - lib_widget=lib_widget, - folder_widget=folder_widget)) + for ns in range(num_sample_to_copy): + # empty sample + lib_widget, folder_widget = self.__library_widgets(trans, request.user, + len(current_samples), + libraries, None, **kwd) + current_samples.append(dict(name='Sample_%i' % (len(current_samples)+1), + barcode='', + library=None, + folder=None, + field_values=['' for field in request.type.sample_form.fields], + lib_widget=lib_widget, + folder_widget=folder_widget)) else: - lib_widget, folder_widget = self.__library_widgets(trans, request.user, - len(current_samples), - libraries, None, **kwd) - current_samples.append(dict(name=current_samples[src_sample_index]['name']+'_%i' % (len(current_samples)+1), - barcode='', - library_id='none', - folder_id='none', - field_values=[val for val in current_samples[src_sample_index]['field_values']], - lib_widget=lib_widget, - folder_widget=folder_widget)) + src_library_id = current_samples[src_sample_index]['lib_widget'].get_selected()[1] + src_folder_id = current_samples[src_sample_index]['folder_widget'].get_selected()[1] + for ns in range(num_sample_to_copy): + lib_widget, folder_widget = self.__library_widgets(trans, request.user, + len(current_samples), + libraries, sample=None, + lib_id=src_library_id, + folder_id=src_folder_id, + **kwd) + current_samples.append(dict(name=current_samples[src_sample_index]['name']+'_%i' % (len(current_samples)+1), + barcode='', + library_id='none', + folder_id='none', + field_values=[val for val in current_samples[src_sample_index]['field_values']], + lib_widget=lib_widget, + folder_widget=folder_widget)) return trans.fill_template( '/requests/show_request.mako', request=request, request_details=self.request_details(trans, request.id), diff -r f7525fb463e0 -r d1624544bc55 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Mon May 24 15:33:55 2010 -0400 +++ b/lib/galaxy/web/controllers/requests_admin.py Mon May 24 16:00:03 2010 -0400 @@ -805,7 +805,7 @@ sample_copy=self.__copy_sample(current_samples), details='hide', edit_mode=util.restore_text( params.get( 'edit_mode', 'False' ) ), message=message, status=status ) - def __library_widgets(self, trans, user, sample_index, libraries, sample=None, **kwd): + def __library_widgets(self, trans, user, sample_index, libraries, sample=None, lib_id=None, folder_id=None, **kwd): ''' This method creates the data library & folder selectbox for creating & editing samples. First we get a list of all the libraries accessible to @@ -815,7 +815,8 @@ ''' params = util.Params( kwd ) # data library selectbox - lib_id = params.get( "sample_%i_library_id" % sample_index, 'none' ) + if not lib_id: + lib_id = params.get( "sample_%i_library_id" % sample_index, 'none' ) selected_lib = None if sample and lib_id == 'none': if sample.library: @@ -834,7 +835,7 @@ lib_widget.add_option('Select one', 'none') # all the libraries available to the selected user for lib, hidden_folder_ids in libraries.items(): - if str(lib.id) == lib_id: + if str(lib.id) == str(lib_id): lib_widget.add_option(lib.name, lib.id, selected=True) selected_lib, selected_hidden_folder_ids = lib, hidden_folder_ids.split(',') else: @@ -855,7 +856,10 @@ else: current_fid = params.get( "sample_%i_folder_id" % sample_index, 'none' ) else: - current_fid = 'none' + if folder_id: + current_fid = folder_id + else: + current_fid = 'none' # first option if lib_id == 'none': folder_widget.add_option('Select one', 'none', selected=True) @@ -995,29 +999,38 @@ # if the user has selected a sample no. to copy then copy the contents # of the src sample to the new sample else an empty sample src_sample_index = int(params.get( 'copy_sample', -1 )) + # get the number of new copies of the src sample + num_sample_to_copy = int(params.get( 'num_sample_to_copy', 1 )) if src_sample_index == -1: - # empty sample - lib_widget, folder_widget = self.__library_widgets(trans, request.user, - len(current_samples), - libraries, None, **kwd) - current_samples.append(dict(name='Sample_%i' % (len(current_samples)+1), - barcode='', - library=None, - folder=None, - field_values=['' for field in request.type.sample_form.fields], - lib_widget=lib_widget, - folder_widget=folder_widget)) + for ns in range(num_sample_to_copy): + # empty sample + lib_widget, folder_widget = self.__library_widgets(trans, request.user, + len(current_samples), + libraries, None, **kwd) + current_samples.append(dict(name='Sample_%i' % (len(current_samples)+1), + barcode='', + library=None, + folder=None, + field_values=['' for field in request.type.sample_form.fields], + lib_widget=lib_widget, + folder_widget=folder_widget)) else: - lib_widget, folder_widget = self.__library_widgets(trans, request.user, - len(current_samples), - libraries, None, **kwd) - current_samples.append(dict(name=current_samples[src_sample_index]['name']+'_%i' % (len(current_samples)+1), - barcode='', - library_id='none', - folder_id='none', - field_values=[val for val in current_samples[src_sample_index]['field_values']], - lib_widget=lib_widget, - folder_widget=folder_widget)) + src_library_id = current_samples[src_sample_index]['lib_widget'].get_selected()[1] + src_folder_id = current_samples[src_sample_index]['folder_widget'].get_selected()[1] + for ns in range(num_sample_to_copy): + lib_widget, folder_widget = self.__library_widgets(trans, request.user, + len(current_samples), + libraries, sample=None, + lib_id=src_library_id, + folder_id=src_folder_id, + **kwd) + current_samples.append(dict(name=current_samples[src_sample_index]['name']+'_%i' % (len(current_samples)+1), + barcode='', + library_id='none', + folder_id='none', + field_values=[val for val in current_samples[src_sample_index]['field_values']], + lib_widget=lib_widget, + folder_widget=folder_widget)) return trans.fill_template( '/admin/requests/show_request.mako', request=request, request_details=self.request_details(trans, request.id), diff -r f7525fb463e0 -r d1624544bc55 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Mon May 24 15:33:55 2010 -0400 +++ b/templates/admin/requests/show_request.mako Mon May 24 16:00:03 2010 -0400 @@ -444,8 +444,7 @@ %else: <label>There are no samples.</label> %endif - </div> - + </div> %if request.samples and request.submitted(): <script type="text/javascript"> // Updater @@ -458,25 +457,23 @@ <tbody> <tr> <div class="form-row"> + + %if request.unsubmitted(): + <td> + %if current_samples: + <label>Copy </label> + <input type="integer" name="num_sample_to_copy" value="1" size="3"/> + <label>sample(s) from sample</label> + ${sample_copy.get_html()} + %endif + <input type="submit" name="add_sample_button" value="Add New"/> + </td> + %endif <td> %if current_samples: <input type="submit" name="edit_samples_button" value="Edit samples"/> %endif </td> - %if request.unsubmitted(): - <td> - <label>Import from csv file</label> - <input type="file" name="file_data" /> - <input type="submit" name="import_samples_button" value="Import samples"/> - </td> - <td> - %if current_samples: - <label>Copy from sample</label> - ${sample_copy.get_html()} - %endif - <input type="submit" name="add_sample_button" value="Add New"/> - </td> - %endif </div> </tr> </tbody> @@ -504,3 +501,26 @@ <input type="hidden" name="request_id" value="${request.id}" /> </form> </div> + +<br/> + +%if request.unsubmitted(): +<div class="toolForm"> + <div class="form-row"> + <div class="msg_list"> + <h4 class="msg_head"><u>Import Samples</u></h4> + <div class="msg_body"> + <label>Import from csv file</label> + <input type="file" name="file_data" /> + <input type="submit" name="import_samples_button" value="Import samples"/> + <br/> + <div class="toolParamHelp" style="clear: both;"> + The csv file must be in the following format:<br/> + SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2... + </div> + </div> + </div> + </div> +</div> +%endif + diff -r f7525fb463e0 -r d1624544bc55 templates/requests/show_request.mako --- a/templates/requests/show_request.mako Mon May 24 15:33:55 2010 -0400 +++ b/templates/requests/show_request.mako Mon May 24 16:00:03 2010 -0400 @@ -364,31 +364,28 @@ %endif </div> %if request.unsubmitted() and edit_mode == 'False': - <table class="grid"> - <tbody> - <tr> - <div class="form-row"> - <td> - %if current_samples: - <input type="submit" name="edit_samples_button" value="Edit samples"/> - %endif - </td> - <td> - <label>Import from csv file</label> - <input type="file" name="file_data" /> - <input type="submit" name="import_samples_button" value="Import samples"/> - </td> - <td> - %if current_samples: - <label>Copy from sample</label> - ${sample_copy.get_html()} - %endif - <input type="submit" name="add_sample_button" value="Add New"/> - </td> - </div> - </tr> - </tbody> - </table> + <table class="grid"> + <tbody> + <tr> + <div class="form-row"> + <td> + %if current_samples: + <label>Copy </label> + <input type="integer" name="num_sample_to_copy" value="1" size="3"/> + <label>sample(s) from sample</label> + ${sample_copy.get_html()} + %endif + <input type="submit" name="add_sample_button" value="Add New"/> + </td> + <td> + %if current_samples: + <input type="submit" name="edit_samples_button" value="Edit samples"/> + %endif + </td> + </div> + </tr> + </tbody> + </table> %endif %if request.unsubmitted() and (request.samples or current_samples): <div class="form-row"> @@ -407,3 +404,25 @@ <input type="hidden" name="request_id" value="${request.id}" /> </form> </div> + + +<br/> +%if request.unsubmitted(): +<div class="toolForm"> + <div class="form-row"> + <div class="msg_list"> + <h4 class="msg_head"><u>Import Samples</u></h4> + <div class="msg_body"> + <label>Import from csv file</label> + <input type="file" name="file_data" /> + <input type="submit" name="import_samples_button" value="Import samples"/> + <br/> + <div class="toolParamHelp" style="clear: both;"> + The csv file must be in the following format:<br/> + SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2... + </div> + </div> + </div> + </div> +</div> +%endif diff -r f7525fb463e0 -r d1624544bc55 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Mon May 24 15:33:55 2010 -0400 +++ b/test/base/twilltestcase.py Mon May 24 16:00:03 2010 -0400 @@ -1572,14 +1572,14 @@ self.check_page_for_string( 'There are no samples.' ) # this redundant stmt below is add so that the second form in # the page gets selected - tc.fv( "2", "request_id", request_id ) + tc.fv( "3", "request_id", request_id ) for sample_index, sample in enumerate(samples): tc.submit( "add_sample_button" ) self.check_page_for_string( 'Sequencing Request "%s"' % request_name ) sample_name, fields = sample - tc.fv( "2", "sample_%i_name" % sample_index, sample_name ) + tc.fv( "3", "sample_%i_name" % sample_index, sample_name ) for field_index, field_value in enumerate(fields): - tc.fv( "2", "sample_%i_field_%i" % ( sample_index, field_index ), field_value ) + tc.fv( "3", "sample_%i_field_%i" % ( sample_index, field_index ), field_value ) tc.submit( "save_samples_button" ) for sample_name, fields in samples: self.check_page_for_string( sample_name )
1
0
0
0
[hg] galaxy 3818: Allow FASTQ Groomer/parser to work on tab-deli...
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/f7525fb463e0
changeset: 3818:f7525fb463e0 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Mon May 24 15:33:55 2010 -0400 description: Allow FASTQ Groomer/parser to work on tab-delimited decimal scores. diffstat: lib/galaxy_utils/sequence/fastq.py | 11 ++++++++--- test-data/sanger_full_range_as_tab_decimal_sanger.fastqsanger | 8 ++++++++ tools/fastq/fastq_groomer.xml | 11 ++++++++++- 3 files changed, 26 insertions(+), 4 deletions(-) diffs (72 lines): diff -r 86fe916dbdb5 -r f7525fb463e0 lib/galaxy_utils/sequence/fastq.py --- a/lib/galaxy_utils/sequence/fastq.py Mon May 24 15:10:31 2010 -0400 +++ b/lib/galaxy_utils/sequence/fastq.py Mon May 24 15:33:55 2010 -0400 @@ -41,7 +41,12 @@ def convert_color_to_base_space( cls, sequence ): return cls.color_space_converter.to_base_space( sequence ) def is_ascii_encoded( self ): - return ' ' not in self.quality #as per fastq definition only decimal quality strings can have spaces in them (and must have a trailing space) + #as per fastq definition only decimal quality strings can have spaces (and TABs for our purposes) in them (and must have a trailing space) + if ' ' in self.quality: + return False + if '\t' in self.quality: + return False + return True def get_ascii_quality_scores( self ): if self.is_ascii_encoded(): return list( self.quality ) @@ -49,7 +54,7 @@ quality = self.quality.rstrip() #decimal scores should have a trailing space if quality: try: - return [ chr( int( val ) + self.ascii_min - self.quality_min ) for val in quality.split( ' ' ) ] + return [ chr( int( val ) + self.ascii_min - self.quality_min ) for val in quality.split() ] except ValueError, e: raise ValueError( 'Error Parsing quality String. ASCII quality strings cannot contain spaces (%s): %s' % ( self.quality, e ) ) else: @@ -60,7 +65,7 @@ else: quality = self.quality.rstrip() #decimal scores should have a trailing space if quality: - return [ int( val ) for val in quality.split( ' ' ) if val.strip() ] + return [ int( val ) for val in quality.split() if val.strip() ] else: return [] def convert_read_to_format( self, format, force_quality_encoding = None ): diff -r 86fe916dbdb5 -r f7525fb463e0 test-data/sanger_full_range_as_tab_decimal_sanger.fastqsanger --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sanger_full_range_as_tab_decimal_sanger.fastqsanger Mon May 24 15:33:55 2010 -0400 @@ -0,0 +1,8 @@ +@FAKE0001 Original version has PHRED scores from 0 to 93 inclusive (in that order) +ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTAC ++ +0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 +@FAKE0002 Original version has PHRED scores from 93 to 0 inclusive (in that order) +CATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCA ++ +93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 diff -r 86fe916dbdb5 -r f7525fb463e0 tools/fastq/fastq_groomer.xml --- a/tools/fastq/fastq_groomer.xml Mon May 24 15:10:31 2010 -0400 +++ b/tools/fastq/fastq_groomer.xml Mon May 24 15:33:55 2010 -0400 @@ -1,4 +1,4 @@ -<tool id="fastq_groomer" name="FASTQ Groomer" version="1.0.2"> +<tool id="fastq_groomer" name="FASTQ Groomer" version="1.0.3"> <description>convert between various FASTQ quality formats</description> <command interpreter="python">fastq_groomer.py '$input_file' '$input_type' '$output_file' #if str( $options_type['options_type_selector'] ) == 'basic': @@ -288,6 +288,15 @@ <param name="summarize_input" value="summarize_input" /> <output name="output_file" file="sanger_full_range_as_decimal_sanger.fastqsanger" /> </test> + <test> + <param name="input_file" value="sanger_full_range_as_tab_decimal_sanger.fastqsanger" ftype="fastq" /> + <param name="input_type" value="sanger" /> + <param name="options_type_selector" value="advanced" /> + <param name="output_type" value="sanger" /> + <param name="force_quality_encoding" value="ascii" /> + <param name="summarize_input" value="summarize_input" /> + <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" /> + </test> <!-- Solexa, range -5 - 62 --> <test> <param name="input_file" value="solexa_full_range_as_decimal_solexa.fastqsolexa" ftype="fastq" />
1
0
0
0
[hg] galaxy 3817: fixed the status message box layout in grid
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/86fe916dbdb5
changeset: 3817:86fe916dbdb5 user: rc date: Mon May 24 15:10:31 2010 -0400 description: fixed the status message box layout in grid diffstat: templates/grid_base.mako | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diffs (17 lines): diff -r 8833ebe82ed1 -r 86fe916dbdb5 templates/grid_base.mako --- a/templates/grid_base.mako Mon May 24 15:08:57 2010 -0400 +++ b/templates/grid_base.mako Mon May 24 15:10:31 2010 -0400 @@ -679,7 +679,12 @@ <tr> <td width="75%">${self.render_grid_header( grid )}</td> <td></td> - <td width="25%" id="grid-message" valign="top">${render_message( message, status )}</td> + <td></td> + </tr> + <tr> + <td width="100%" id="grid-message" valign="top">${render_message( message, status )}</td> + <td></td> + <td></td> </tr> </table>
1
0
0
0
[hg] galaxy 3816: sff_converter tool functional test
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/8833ebe82ed1
changeset: 3816:8833ebe82ed1 user: rc date: Mon May 24 15:08:57 2010 -0400 description: sff_converter tool functional test diffstat: test-data/2.sff | 0 test-data/sff_converter_fasta.dat | 6 ++ test-data/sff_converter_fastq.dat | 12 +++++ test-data/sff_converter_qual.dat | 6 ++ test-data/sff_converter_xml_1.dat | 18 ++++++++ test-data/sff_converter_xml_2.dat | 18 ++++++++ tools/filters/sff_extractor.xml | 83 +++++++++++++++++++++++-------------- 7 files changed, 111 insertions(+), 32 deletions(-) diffs (176 lines): diff -r cbacbb736899 -r 8833ebe82ed1 test-data/2.sff Binary file test-data/2.sff has changed diff -r cbacbb736899 -r 8833ebe82ed1 test-data/sff_converter_fasta.dat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sff_converter_fasta.dat Mon May 24 15:08:57 2010 -0400 @@ -0,0 +1,6 @@ +>GGOQ6K301BJT46 +gactACACGTAGTATAAGCTAAATGTTGGAGAGGATGCTGTAATCAACGTTTTGTGTCTCCTTACAGGACACCAGCTGATTTGGAGGTCATCCAATATAAACCTGGCTGGAACTTGCTATGGTTAGGAGAGCTATGAATGGAAGAGATAATTCCATTATTTAATAAGGCTACAGACAAATTAGGACAAGAAGCAGCTATTAGATTATTTAGTGCTAGCACACCTAAATAGAGAGAGATAAATTCATTAGACTTTTTGCTAttttattgacttttggagagacagtatttaaagtaccaaatcccagaggttgcctatgttggtggtgttgcaagctctattattggcgattgcaatctaccttatccataagttctgcttagagattatttgttattaattttcatctacatcaataaatataggacagtaaggattttgtacaaaatagacaatgggataggtaccagaagaggacagaggaattactggtattttgatatagactacactaacgtacgtacgtaggaattttaaccgggg +>GGOQ6K301AWPXS +gactACGTACACACTGGAATAAAATGGAGTTTTCATACTAGAGATTATTATATGGGCTATGTAAAAGAACTAGTAGCAGGATCTAGCACACCAGACAGCCTAAGACTGTATATTTTATATAAGCAACCCGTTATGGCATGGGAAATATCGCCCAGGGTTAAAAAATTTTAACAAGGAATGGCCTTTTTGTAAATATGTGGATAAAAAACAGGGTTCATGTGGGATGATATTGAAAAACAAAAGATTTGCGTAGGAGGAGAAATATCACCAGGATGGGGACCTGGAATGGTTGGCATAGCAAATAAAAGCCTTTAGTTGTGGGGAGAGAAAAATCGAGGCAACTCCTGTTATGATTATAAGAGAAGAGATAGATCCCAAAAAATGGTGTGGAGATTGTTGGAATTTAATGTGTCTTAGAAACTCACCTCCAGGAACGTTGTCAAAGACTCGCTATGTTGGCATGTGGACGGaaagactaaatgttggagaggatgctgtatcaacgttttgttgtcgtccttacacggacaccagctgtagttgtctgtagnttttaccggg +>GGOQ6K301A8J46 +gactACTATACGAGTCTGCCAATCTTCTTCACTCATCCCCTTCAGGAAGAGTGCAGGGTTCTGGGACTCTCCGTATGTGCCTCCTAGGTACAAGAAAATATCCCCTCTCTTCATCCTTTAATAACACTGATCCTTGTCCCCAATACTCTACTCTCATTGGTCCTTTCCAATTTTTGTCTTTTTTGATCTTTATAGTAAATCCACTGACCTTGCAATTTGCTTGGAATTTGAGAAAAATAATCCTGTATTCTTAATGATTCTTGTTGTGTTAATAATTCATATGGGGGCCATTCCCCCTATTCTACCCCTTTGTTTAAAATTAAGGCAATGCAGAGCGAGAGCCAAAGCATTGTCTAAAGATGTTGTTTCAGGCAAAAACTTCTGAATCCAACACTTTAAAGTATTATTggcattttcaaccaaagcttgagtattgagggttgcctggtattccaaatttatgttttattccctatgtaattgtagtaaaccttcctattttttgattttctaaaatttggtccctattgttctgtttgctagttctgtaactattatgagtccaacctgtttagg diff -r cbacbb736899 -r 8833ebe82ed1 test-data/sff_converter_fastq.dat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sff_converter_fastq.dat Mon May 24 15:08:57 2010 -0400 @@ -0,0 +1,12 @@ +@GGOQ6K301BJT46 +gactACACGTAGTATAAGCTAAATGTTGGAGAGGATGCTGTAATCAACGTTTTGTGTCTCCTTACAGGACACCAGCTGATTTGGAGGTCATCCAATATAAACCTGGCTGGAACTTGCTATGGTTAGGAGAGCTATGAATGGAAGAGATAATTCCATTATTTAATAAGGCTACAGACAAATTAGGACAAGAAGCAGCTATTAGATTATTTAGTGCTAGCACACCTAAATAGAGAGAGATAAATTCATTAGACTTTTTGCTAttttattgacttttggagagacagtatttaaagtaccaaatcccagaggttgcctatgttggtggtgttgcaagctctattattggcgattgcaatctaccttatccataagttctgcttagagattatttgttattaattttcatctacatcaataaatataggacagtaaggattttgtacaaaatagacaatgggataggtaccagaagaggacagaggaattactggtattttgatatagactacactaacgtacgtacgtaggaattttaaccgggg ++ +FFFFFFFFFFFFFFFIIIIIHHHHHFFBBBFEDDFFFFFHHGFFFFFFF????FFFFFFDDFFFFF<==<ADDDDDDAC8::DCDFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDDDFFFFFFFFFFFFFFFFFFFFFFA@@FFFFFFDD?????AAAAAB=??ADAACFFFFFDDDFFFFFFFFFDDDD544??8888000<2449=:<<?@841114?>AAAA?:::A???DBBA:::A?A//...::33,,,,------,,,,;;:89=9:9733...2223//9<688<444<AA::::8::BBAA@@>>>43434<4444449??@AA@BBBA:8:<A998<?4448<<<<244<3338<<>:884433822255,,,3--3,,,,,,,,,3774,,,33043///0,,,,,,,,,,,,111,,,,,),0....0),,,.,,,,,,,143.,,,.---86---20787777870206433,,,,,0,,,,,,,0..,,,...3,,,,-44444489965225666---- +@GGOQ6K301AWPXS +gactACGTACACACTGGAATAAAATGGAGTTTTCATACTAGAGATTATTATATGGGCTATGTAAAAGAACTAGTAGCAGGATCTAGCACACCAGACAGCCTAAGACTGTATATTTTATATAAGCAACCCGTTATGGCATGGGAAATATCGCCCAGGGTTAAAAAATTTTAACAAGGAATGGCCTTTTTGTAAATATGTGGATAAAAAACAGGGTTCATGTGGGATGATATTGAAAAACAAAAGATTTGCGTAGGAGGAGAAATATCACCAGGATGGGGACCTGGAATGGTTGGCATAGCAAATAAAAGCCTTTAGTTGTGGGGAGAGAAAAATCGAGGCAACTCCTGTTATGATTATAAGAGAAGAGATAGATCCCAAAAAATGGTGTGGAGATTGTTGGAATTTAATGTGTCTTAGAAACTCACCTCCAGGAACGTTGTCAAAGACTCGCTATGTTGGCATGTGGACGGaaagactaaatgttggagaggatgctgtatcaacgttttgttgtcgtccttacacggacaccagctgtagttgtctgtagnttttaccggg ++ +FFFFFFFFFFFFFDDDFFD@3333BAA?95558HFFFFFHIIIIIIIHIIIHH?;;A???940000836?AAABDFFFFFFFFFFFFA@@FFFFFFFFFF===?<?????88111119??????ADCCCCAAAAAAAAB555:::?>CFD==;A<9966,,,,,,,,,,,,=887766=;;22-----<466694?ABAAAD666666D7FFFFFFFFFF666FFFF?;;:A;<<75B....D7333<@A@?888<AA==;;<7@><;;<688<00009<>???<<<===<<897==73...3----:99666:>7996/////-<<11202>??AA=:55448BBB===AAADDDDDAA>>===DB@>9723000,,,,,,300004;;><<:99666666.,,,,/7600,,,9922/33000020.00011742---223380220786646770---0331.00..,,,,,,0,,,,,,,..0144330,,,0.0,,,,,,,,,,,)),,,,,,1..,,,,,,,...,,,,,,.,,,,,,,,,,,,!//,--226:: +@GGOQ6K301A8J46 +gactACTATACGAGTCTGCCAATCTTCTTCACTCATCCCCTTCAGGAAGAGTGCAGGGTTCTGGGACTCTCCGTATGTGCCTCCTAGGTACAAGAAAATATCCCCTCTCTTCATCCTTTAATAACACTGATCCTTGTCCCCAATACTCTACTCTCATTGGTCCTTTCCAATTTTTGTCTTTTTTGATCTTTATAGTAAATCCACTGACCTTGCAATTTGCTTGGAATTTGAGAAAAATAATCCTGTATTCTTAATGATTCTTGTTGTGTTAATAATTCATATGGGGGCCATTCCCCCTATTCTACCCCTTTGTTTAAAATTAAGGCAATGCAGAGCGAGAGCCAAAGCATTGTCTAAAGATGTTGTTTCAGGCAAAAACTTCTGAATCCAACACTTTAAAGTATTATTggcattttcaaccaaagcttgagtattgagggttgcctggtattccaaatttatgttttattccctatgtaattgtagtaaaccttcctattttttgattttctaaaatttggtccctattgttctgtttgctagttctgtaactattatgagtccaacctgtttagg ++ +FFFFFFFFFFFFFFFIIIIIIIIIIIIIIIIIIIIIFFFFIIIIIIIIIIIIFHFFFFFFFF:::DFFFFFFFFFFFFFDDDFFFFAAABBDD=3333=7B::99?7BBBBBA?4400088/0008??BDDDDFFFFDDBBFFFFFFFFFFFFFFFFFFFFFF???DDB@--,,,=/7,,,,,-::==68<BAFFFFFFFDDDFFFFFFFFFDDD???FFFFDBA>999?94/////>34=;;?>?ABBB5666=BBBB?><=<<986....255---3==8,,,,,--357,,,,-8766=<=2444000977757664400554444<<?@@BDDDDDAAA???AAAAA555:???D<??>DD===DD88833553B443238<76654222....,07/166622///345429:<8888022263,,,.1300,,,00,0034413..,,,,-330-,000207..2220202.344.0.0.00027:----8://22--00,,,,,),,,,,,,00-000.0..00,,,0,,,.0430,,,.2022611...143,,,,,,,,,,000000 diff -r cbacbb736899 -r 8833ebe82ed1 test-data/sff_converter_qual.dat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sff_converter_qual.dat Mon May 24 15:08:57 2010 -0400 @@ -0,0 +1,6 @@ +>GGOQ6K301BJT46 +37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 40 40 40 40 40 39 39 39 39 39 37 37 33 33 33 37 36 35 35 37 37 37 37 37 39 39 38 37 37 37 37 37 37 37 30 30 30 30 37 37 37 37 37 37 35 35 37 37 37 37 37 27 28 28 27 32 35 35 35 35 35 35 32 34 23 25 25 35 34 35 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 35 35 35 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 32 31 31 37 37 37 37 37 37 35 35 30 30 30 30 30 32 32 32 32 32 33 28 30 30 32 35 32 32 34 37 37 37 37 37 35 35 35 37 37 37 37 37 37 37 37 37 35 35 35 35 20 19 19 30 30 23 23 23 23 15 15 15 27 17 19 19 24 28 25 27 27 30 31 23 19 16 16 16 19 30 29 32 32 32 32 30 25 25 25 32 30 30 30 35 33 33 32 25 25 25 32 30 32 14 14 13 13 13 25 25 18 18 11 11 11 11 12 12 12 12 12 12 11 11 11 11 26 26 25 23 24 28 24 25 24 22 18 18 13 13 13 17 17 17 18 14 14 24 27 21 23 23 27 19 19 19 27 32 32 25 25 25 25 23 25 25 33 33 32 32 31 31 29 29 29 19 18 19 18 19 27 1! 9 19 19 19 19 19 24 30 30 31 32 32 31 33 33 33 32 25 23 25 27 32 24 24 23 27 30 19 19 19 23 27 27 27 27 17 19 19 27 18 18 18 23 27 27 29 25 23 23 19 19 18 18 23 17 17 17 20 20 11 11 11 18 12 12 18 11 11 11 11 11 11 11 11 11 18 22 22 19 11 11 11 18 18 15 19 18 14 14 14 15 11 11 11 11 11 11 11 11 11 11 11 11 16 16 16 11 11 11 11 11 8 11 15 13 13 13 13 15 8 11 11 11 13 11 11 11 11 11 11 11 16 19 18 13 11 11 11 13 12 12 12 23 21 12 12 12 17 15 22 23 22 22 22 22 23 22 15 17 15 21 19 18 18 11 11 11 11 11 15 11 11 11 11 11 11 11 15 13 13 11 11 11 13 13 13 18 11 11 11 11 12 19 19 19 19 19 19 23 24 24 21 20 17 17 20 21 21 21 12 12 12 12 +>GGOQ6K301AWPXS +37 37 37 37 37 37 37 37 37 37 37 37 37 35 35 35 37 37 35 31 18 18 18 18 33 32 32 30 24 20 20 20 23 39 37 37 37 37 37 39 40 40 40 40 40 40 40 39 40 40 40 39 39 30 26 26 32 30 30 30 24 19 15 15 15 15 23 18 21 30 32 32 32 33 35 37 37 37 37 37 37 37 37 37 37 37 37 32 31 31 37 37 37 37 37 37 37 37 37 37 28 28 28 30 27 30 30 30 30 30 23 23 16 16 16 16 16 24 30 30 30 30 30 30 32 35 34 34 34 34 32 32 32 32 32 32 32 32 33 20 20 20 25 25 25 30 29 34 37 35 28 28 26 32 27 24 24 21 21 11 11 11 11 11 11 11 11 11 11 11 11 28 23 23 22 22 21 21 28 26 26 17 17 12 12 12 12 12 27 19 21 21 21 24 19 30 32 33 32 32 32 35 21 21 21 21 21 21 35 22 37 37 37 37 37 37 37 37 37 37 21 21 21 37 37 37 37 30 26 26 25 32 26 27 27 22 20 33 13 13 13 13 35 22 18 18 18 27 31 32 31 30 23 23 23 27 32 32 28 28 26 26 27 22 31 29 27 26 26 27 21 23 23 27 15 15 15 15 24 27 29 30 30 30 27 27 27 28 28 28 27 27 23 24 22 28 28 22 18 13 13 13 18 12 12 12 12 25 24 24 21 21 21 25 29 22 24 24 21 14 14 14 14 14 12 27 27 16 16 1! 7 15 17 29 30 30 32 32 28 25 20 20 19 19 23 33 33 33 28 28 28 32 32 32 35 35 35 35 35 32 32 29 29 28 28 28 35 33 31 29 24 22 17 18 15 15 15 11 11 11 11 11 11 18 15 15 15 15 19 26 26 29 27 27 25 24 24 21 21 21 21 21 21 13 11 11 11 11 14 22 21 15 15 11 11 11 24 24 17 17 14 18 18 15 15 15 15 17 15 13 15 15 15 16 16 22 19 17 12 12 12 17 17 18 18 23 15 17 17 15 22 23 21 21 19 21 22 22 15 12 12 12 15 18 18 16 13 15 15 13 13 11 11 11 11 11 11 15 11 11 11 11 11 11 11 13 13 15 16 19 19 18 18 15 11 11 11 15 13 15 11 11 11 11 11 11 11 11 11 11 11 8 8 11 11 11 11 11 11 16 13 13 11 11 11 11 11 11 11 13 13 13 11 11 11 11 11 11 13 11 11 11 11 11 11 11 11 11 11 11 11 0 14 14 11 12 12 17 17 21 25 25 +>GGOQ6K301A8J46 +37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 37 37 37 37 40 40 40 40 40 40 40 40 40 40 40 40 37 39 37 37 37 37 37 37 37 37 25 25 25 35 37 37 37 37 37 37 37 37 37 37 37 37 37 35 35 35 37 37 37 37 32 32 32 33 33 35 35 28 18 18 18 18 28 22 33 25 25 24 24 30 22 33 33 33 33 33 32 30 19 19 15 15 15 23 23 14 15 15 15 23 30 30 33 35 35 35 35 37 37 37 37 35 35 33 33 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 30 30 30 35 35 33 31 12 12 11 11 11 28 14 22 11 11 11 11 11 12 25 25 28 28 21 23 27 33 32 37 37 37 37 37 37 37 35 35 35 37 37 37 37 37 37 37 37 37 35 35 35 30 30 30 37 37 37 37 35 33 32 29 24 24 24 30 24 19 14 14 14 14 14 29 18 19 28 26 26 30 29 30 32 33 33 33 20 21 21 21 28 33 33 33 33 30 29 27 28 27 27 24 23 21 13 13 13 13 17 20 20 12 12 12 18 28 28 23 11 11 11 11 11 12 12 18 20 22 11 11 11 11 12 23 22 21 21 28 27 28 17 19 19 19 15 15 15 24 22 22 22 20 22 21 21 19 19 15 15 20 20 19 19 19 19 2! 7 27 30 31 31 33 35 35 35 35 35 32 32 32 30 30 30 32 32 32 32 32 20 20 20 25 30 30 30 35 27 30 30 29 35 35 28 28 28 35 35 23 23 23 18 18 20 20 18 33 19 19 18 17 18 23 27 22 21 21 20 19 17 17 17 13 13 13 13 11 15 22 14 16 21 21 21 17 17 14 14 14 18 19 20 19 17 24 25 27 23 23 23 23 15 17 17 17 21 18 11 11 11 13 16 18 15 15 11 11 11 15 15 11 15 15 18 19 19 16 18 13 13 11 11 11 11 12 18 18 15 12 11 15 15 15 17 15 22 13 13 17 17 17 15 17 15 17 13 18 19 19 13 15 13 15 13 15 15 15 17 22 25 12 12 12 12 23 25 14 14 17 17 12 12 15 15 11 11 11 11 11 8 11 11 11 11 11 11 11 15 15 12 15 15 15 13 15 13 13 15 15 11 11 11 15 11 11 11 13 15 19 18 15 11 11 11 13 17 15 17 17 21 16 16 13 13 13 16 19 18 11 11 11 11 11 11 11 11 11 11 15 15 15 15 15 15 diff -r cbacbb736899 -r 8833ebe82ed1 test-data/sff_converter_xml_1.dat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sff_converter_xml_1.dat Mon May 24 15:08:57 2010 -0400 @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<trace_volume> + <trace> + <trace_name>GGOQ6K301BJT46</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>260</clip_vector_right> + </trace> + <trace> + <trace_name>GGOQ6K301AWPXS</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>470</clip_vector_right> + </trace> + <trace> + <trace_name>GGOQ6K301A8J46</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>408</clip_vector_right> + </trace> +</trace_volume> diff -r cbacbb736899 -r 8833ebe82ed1 test-data/sff_converter_xml_2.dat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sff_converter_xml_2.dat Mon May 24 15:08:57 2010 -0400 @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<trace_volume> + <trace> + <trace_name>GGOQ6K301BJT46</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>260</clip_vector_right> + </trace> + <trace> + <trace_name>GGOQ6K301AWPXS</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>470</clip_vector_right> + </trace> + <trace> + <trace_name>GGOQ6K301A8J46</trace_name> + <clip_vector_left>5</clip_vector_left> + <clip_vector_right>408</clip_vector_right> + </trace> +</trace_volume> diff -r cbacbb736899 -r 8833ebe82ed1 tools/filters/sff_extractor.xml --- a/tools/filters/sff_extractor.xml Mon May 24 15:05:55 2010 -0400 +++ b/tools/filters/sff_extractor.xml Mon May 24 15:08:57 2010 -0400 @@ -1,39 +1,58 @@ <tool id="Sff_extractor" name="SFF converter" version="1.0.0"> - <description></description> - <command interpreter="python"> - #if str($fastq_output) == "fastq_false" #sff_extract.py $clip --seq_file=$out_file3 --qual_file=$out_file4 --xml_file=$out_file2 $input - #elif str($fastq_output) == "fastq_true" #sff_extract.py $clip --fastq --seq_file=$out_file1 --xml_file=$out_file2 $input - #end if# - </command> - <inputs> - <param format="sff" name="input" type="data" label="Extract from this dataset"/> - <param name="clip" type="select" label="Completely remove ends with low qual and/or adaptor sequence"> - <option value="">No</option> - <option value="--clip">Yes</option> - </param> - <param name="fastq_output" type="boolean" truevalue="fastq_true" falsevalue="fastq_false" checked="False" label="Do you want FASTQ file instead of FASTA + FASTA quality file?" /> - </inputs> - <outputs> - <data format="fastq" name="out_file1" > - <filter>fastq_output is True</filter> - </data> - <data format="xml" name="out_file2"> - </data> - <data format="fasta" name="out_file3"> - <filter>fastq_output is False</filter> - </data> - <data format="qual" name="out_file4"> - <filter>fastq_output is False</filter> - </data> - </outputs> - <help> + <description></description> + <command interpreter="python"> + #if str($fastq_output) == "fastq_false" #sff_extract.py $clip --seq_file=$out_file3 --qual_file=$out_file4 --xml_file=$out_file2 $input + #elif str($fastq_output) == "fastq_true" #sff_extract.py $clip --fastq --seq_file=$out_file1 --xml_file=$out_file2 $input + #end if# + </command> + <inputs> + <param format="sff" name="input" type="data" label="Extract from this dataset"/> + <param name="clip" type="select" label="Completely remove ends with low qual and/or adaptor sequence"> + <option value="">No</option> + <option value="--clip">Yes</option> + </param> + <param name="fastq_output" type="boolean" truevalue="fastq_true" falsevalue="fastq_false" checked="False" label="Do you want FASTQ file instead of FASTA + FASTA quality file?" /> + </inputs> + <outputs> + <data format="fastq" name="out_file1" > + <filter>fastq_output is True</filter> + </data> + <data format="xml" name="out_file2"> + </data> + <data format="fasta" name="out_file3"> + <filter>fastq_output is False</filter> + </data> + <data format="qual" name="out_file4"> + <filter>fastq_output is False</filter> + </data> + </outputs> + <tests> + <test> + <param name="input" value="2.sff"/> + <param name="clip" value=""/> + <param name="fastq_output" value="false"/> + <output name="out_file2" file="sff_converter_xml_1.dat"/> + <output name="out_file3" file="sff_converter_fasta.dat"/> + <output name="out_file4" file="sff_converter_qual.dat"/> + </test> + <test> + <param name="input" value="2.sff"/> + <param name="clip" value=""/> + <param name="fastq_output" value="true"/> + <output name="out_file1" file="sff_converter_fastq.dat"/> + <output name="out_file2" file="sff_converter_xml_2.dat"/> + </test> + </tests> + <help> + **What it does** This tool extracts data from the 454 Sequencer SFF format and creates three files containing the: - Sequences (FASTA), - Qualities (QUAL) and - Clippings (XML) - </help> +Sequences (FASTA), +Qualities (QUAL) and +Clippings (XML) + + </help> </tool>
1
0
0
0
[hg] galaxy 3815: Minor cleanup for ensembl display applications...
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/cbacbb736899
changeset: 3815:cbacbb736899 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Mon May 24 15:05:55 2010 -0400 description: Minor cleanup for ensembl display applications and fastq masker tool. diffstat: display_applications/ensembl/ensembl_gff.xml | 6 ++---- display_applications/ensembl/ensembl_interval_as_bed.xml | 6 ++---- tool_conf.xml.main | 1 + tools/fastq/fastq_masker_by_quality.py | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diffs (69 lines): diff -r 6056caca2503 -r cbacbb736899 display_applications/ensembl/ensembl_gff.xml --- a/display_applications/ensembl/ensembl_gff.xml Mon May 24 14:50:20 2010 -0400 +++ b/display_applications/ensembl/ensembl_gff.xml Mon May 24 15:05:55 2010 -0400 @@ -18,8 +18,7 @@ <param type="data" name="gff_file" url="galaxy_${DATASET_HASH}.gff" /> <param type="template" name="site_organism" strip="True" > - #set index = $site_dbkeys.index( $gff_file.dbkey ) - $site_organisms[ $index ] + $site_organisms[ $site_dbkeys.index( $gff_file.dbkey ) ] </param> <param type="template" name="position" strip="True" > #set line_count = 0 @@ -82,8 +81,7 @@ <param type="data" name="gff_file" url="galaxy_${DATASET_HASH}.gff" /> <param type="template" name="site_organism" strip="True" > - #set index = $site_dbkeys.index( $gff_file.dbkey ) - $site_organisms[ $index ] + $site_organisms[ $site_dbkeys.index( $gff_file.dbkey ) ] </param> <param type="template" name="position" strip="True" > #set line_count = 0 diff -r 6056caca2503 -r cbacbb736899 display_applications/ensembl/ensembl_interval_as_bed.xml --- a/display_applications/ensembl/ensembl_interval_as_bed.xml Mon May 24 14:50:20 2010 -0400 +++ b/display_applications/ensembl/ensembl_interval_as_bed.xml Mon May 24 15:05:55 2010 -0400 @@ -18,8 +18,7 @@ <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/> <param type="template" name="site_organism" strip="True" > - #set index = $site_dbkeys.index( $bed_file.dbkey ) - $site_organisms[ $index ] + $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ] </param> <param type="template" name="position" strip="True" > #set line_count = 0 @@ -82,8 +81,7 @@ <param type="data" name="bed_file" url="galaxy_${DATASET_HASH}.bed" format="bedstrict"/> <param type="template" name="site_organism" strip="True" > - #set index = $site_dbkeys.index( $bed_file.dbkey ) - $site_organisms[ $index ] + $site_organisms[ $site_dbkeys.index( $bed_file.dbkey ) ] </param> <param type="template" name="position" strip="True" > #set line_count = 0 diff -r 6056caca2503 -r cbacbb736899 tool_conf.xml.main --- a/tool_conf.xml.main Mon May 24 14:50:20 2010 -0400 +++ b/tool_conf.xml.main Mon May 24 15:05:55 2010 -0400 @@ -298,6 +298,7 @@ <tool file="fastq/fastq_filter.xml" /> <tool file="fastq/fastq_trimmer.xml" /> <tool file="fastq/fastq_trimmer_by_quality.xml" /> + <tool file="fastq/fastq_masker_by_quality.xml" /> <tool file="fastq/fastq_manipulation.xml" /> <tool file="fastq/fastq_to_fasta.xml" /> <tool file="fastq/fastq_to_tabular.xml" /> diff -r 6056caca2503 -r cbacbb736899 tools/fastq/fastq_masker_by_quality.py --- a/tools/fastq/fastq_masker_by_quality.py Mon May 24 14:50:20 2010 -0400 +++ b/tools/fastq/fastq_masker_by_quality.py Mon May 24 15:05:55 2010 -0400 @@ -46,7 +46,7 @@ def main(): usage = "usage: %prog [options] input_file output_file" parser = OptionParser( usage=usage ) - parser.add_option( '-f', '--format', dest='format', type='choice', default='sanger', choices=( 'sanger', 'cssanger', 'solexa', 'illumina' ), help='FASTQ variant type' ) + parser.add_option( '-f', '--format', dest='format', type='choice', default='sanger', choices=( 'sanger', 'solexa', 'illumina' ), help='FASTQ variant type' ) parser.add_option( '-m', '--mask_character', dest='mask_character', default='N', help='Mask Character to use' ) parser.add_option( '-c', '--score_comparison', type="choice", dest='score_comparison', default='le', choices=('gt','ge','eq','lt', 'le', 'ne' ), help='Mask base when score is' ) parser.add_option( '-s', '--quality_score', type="float", dest='quality_score', default='0', help='Quality Score' )
1
0
0
0
[hg] galaxy 3814: Page editor: fix indenting issue for webkit br...
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/6056caca2503
changeset: 3814:6056caca2503 user: jeremy goecks <jeremy.goecks(a)emory.edu> date: Mon May 24 14:50:20 2010 -0400 description: Page editor: fix indenting issue for webkit browsers. diffstat: templates/page/editor.mako | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diffs (49 lines): diff -r 37ecd71e87f3 -r 6056caca2503 templates/page/editor.mako --- a/templates/page/editor.mako Mon May 24 14:46:19 2010 -0400 +++ b/templates/page/editor.mako Mon May 24 14:50:20 2010 -0400 @@ -476,8 +476,7 @@ // item_class='History'). var item_elt_id = item_info.iclass + "-" + item_id; var item_embed_html = - "\ - <p><div id='" + item_elt_id + "' class='embedded-item " + item_info.singular.toLowerCase() + + "<p><div id='" + item_elt_id + "' class='embedded-item " + item_info.singular.toLowerCase() + " placeholder'> \ <p class='title'>Embedded Galaxy " + item_info.singular + " '" + item_name + "'</p> \ <p class='content'> \ @@ -487,24 +486,23 @@ </div></p>"; // Insert embedded item into document. + wym.insert(" "); // Needed to prevent insertion from occurring in child element in webkit browsers. wym.insert(item_embed_html); // TODO: can we fix this? // Due to oddities of wym.insert() [likely due to inserting a <div> and/or a complete paragraph], an - // empty paragraph may be included either before or after an embedded item. Remove these paragraphs. + // empty paragraph (or two!) may be included either before an embedded item. Remove these paragraphs. $("#" + item_elt_id, wym._doc.body).each( function() { // Remove previous empty paragraphs. - var prev_elt = $(this).prev(); - if ( prev_elt.length != 0 && jQuery.trim(prev_elt.text()) == "" ) - prev_elt.remove(); - - // Remove subsequent empty paragraphs. - /* - var next_elt = $(this).next(); - var next_next_elt = next_elt.next(); - if (next_next_elt.length != 0) - next_elt.remove(); - */ + var removing = true; + while (removing) + { + var prev_elt = $(this).prev(); + if ( prev_elt.length != 0 && jQuery.trim(prev_elt.text()) == "" ) + prev_elt.remove(); + else + removing = false; + } }); });
1
0
0
0
[hg] galaxy 3813: Added nginx mod_zip support for library downloads
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/37ecd71e87f3
changeset: 3813:37ecd71e87f3 user: Nate Coraor <nate(a)bx.psu.edu> date: Mon May 24 14:46:19 2010 -0400 description: Added nginx mod_zip support for library downloads diffstat: lib/galaxy/config.py | 1 + lib/galaxy/web/controllers/library_common.py | 40 ++++++++++++++++++++++----- templates/library/common/common.mako | 8 +++++ 3 files changed, 41 insertions(+), 8 deletions(-) diffs (144 lines): diff -r 663b2fd4a44c -r 37ecd71e87f3 lib/galaxy/config.py --- a/lib/galaxy/config.py Mon May 24 14:15:02 2010 -0400 +++ b/lib/galaxy/config.py Mon May 24 14:46:19 2010 -0400 @@ -101,6 +101,7 @@ # Configuration options for taking advantage of nginx features self.apache_xsendfile = kwargs.get( 'apache_xsendfile', False ) self.nginx_x_accel_redirect_base = kwargs.get( 'nginx_x_accel_redirect_base', False ) + self.nginx_x_archive_files_base = kwargs.get( 'nginx_x_archive_files_base', False ) self.nginx_upload_store = kwargs.get( 'nginx_upload_store', False ) self.nginx_upload_path = kwargs.get( 'nginx_upload_path', False ) if self.nginx_upload_store: diff -r 663b2fd4a44c -r 37ecd71e87f3 lib/galaxy/web/controllers/library_common.py --- a/lib/galaxy/web/controllers/library_common.py Mon May 24 14:15:02 2010 -0400 +++ b/lib/galaxy/web/controllers/library_common.py Mon May 24 14:46:19 2010 -0400 @@ -106,6 +106,9 @@ message += "Don't navigate away from Galaxy or use the browser's \"stop\" or \"reload\" buttons (on this tab) until the " message += "message \"This job is running\" is cleared from the \"Information\" column below for each selected dataset." status = "info" + comptypes_t = comptypes + if trans.app.config.nginx_x_archive_files_base: + comptypes_t = ['ngxzip'] return trans.fill_template( '/library/common/browse_library.mako', cntrller=cntrller, use_panels=use_panels, @@ -113,7 +116,7 @@ created_ldda_ids=created_ldda_ids, hidden_folder_ids=hidden_folder_ids, show_deleted=show_deleted, - comptypes=comptypes, + comptypes=comptypes_t, current_user_roles=current_user_roles, message=message, status=status ) @@ -1253,6 +1256,19 @@ status=status ) @web.expose def act_on_multiple_datasets( self, trans, cntrller, library_id, ldda_ids='', **kwd ): + class NgxZip( object ): + def __init__( self, url_base ): + self.files = {} + self.url_base = url_base + def add( self, file, relpath ): + self.files[file] = relpath + def __str__( self ): + rval = '' + for fname, relpath in self.files.items(): + size = os.stat( fname ).st_size + quoted_fname = urllib.quote_plus( fname, '/' ) + rval += '- %i %s%s %s\n' % ( size, self.url_base, quoted_fname, relpath ) + return rval # Perform an action on a list of library datasets. params = util.Params( kwd ) message = util.restore_text( params.get( 'message', '' ) ) @@ -1319,10 +1335,10 @@ trans.sa_session.add( ld ) trans.sa_session.flush() message = "The selected datasets have been removed from this data library" - elif action in ['zip','tgz','tbz']: + elif action in ['zip','tgz','tbz','ngxzip']: error = False killme = string.punctuation + string.whitespace - trantab = string.maketrans(killme,'_'*len(killme)) + trantab = string.maketrans(killme,'_'*len(killme)) try: outext = 'zip' if action == 'zip': @@ -1340,6 +1356,8 @@ elif action == 'tbz': archive = util.streamball.StreamBall( 'w|bz2' ) outext = 'tbz2' + elif action == 'ngxzip': + archive = NgxZip( trans.app.config.nginx_x_archive_files_base ) except (OSError, zipfile.BadZipFile): error = True log.exception( "Unable to create archive for download" ) @@ -1347,7 +1365,7 @@ status = 'error' except: error = True - log.exception( "Unexpected error %s in create archive for download" % sys.exc_info()[0]) + log.exception( "Unexpected error %s in create archive for download" % sys.exc_info()[0]) message = "Unable to create archive for download, please report - %s" % sys.exc_info()[0] status = 'error' if not error: @@ -1377,7 +1395,8 @@ seen.append( path ) zpath = os.path.split(path)[-1] # comes as base_name/fname outfname,zpathext = os.path.splitext(zpath) - if is_composite: # need to add all the components from the extra_files_path to the zip + if is_composite: + # need to add all the components from the extra_files_path to the zip if zpathext == '': zpath = '%s.html' % zpath # fake the real nature of the html file try: @@ -1391,8 +1410,8 @@ flist = glob.glob(os.path.join(ldda.dataset.extra_files_path,'*.*')) # glob returns full paths for fpath in flist: efp,fname = os.path.split(fpath) - if fname > '': - fname = fname.translate(trantab) + if fname > '': + fname = fname.translate(trantab) try: archive.add( fpath,fname ) except IOError: @@ -1409,7 +1428,7 @@ log.exception( "Unable to write %s to temporary library download archive" % ldda.dataset.file_name) message = "Unable to create archive for download, please report this error" status = 'error' - if not error: + if not error: if action == 'zip': archive.close() tmpfh = open( tmpf ) @@ -1426,6 +1445,11 @@ trans.response.set_content_type( "application/x-zip-compressed" ) trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) return tmpfh + elif action == 'ngxzip': + #trans.response.set_content_type( "application/x-zip-compressed" ) + #trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) + trans.response.headers[ "X-Archive-Files" ] = "zip" + return archive else: trans.response.set_content_type( "application/x-tar" ) trans.response.headers[ "Content-Disposition" ] = "attachment; filename=%s.%s" % (outfname,outext) diff -r 663b2fd4a44c -r 37ecd71e87f3 templates/library/common/common.mako --- a/templates/library/common/common.mako Mon May 24 14:15:02 2010 -0400 +++ b/templates/library/common/common.mako Mon May 24 14:46:19 2010 -0400 @@ -391,6 +391,14 @@ %if 'zip' in comptypes: <option value="zip">Download as a .zip file</option> %endif + %if 'ngxzip' in comptypes: + ## We can safely have two default selected items since ngxzip, if present, will always be the only available type. + <option value="ngxzip" + %if default_action == 'download': + selected + %endif> + >Download as a .zip file</option> + %endif %endif </select> <input type="submit" class="primary-button" name="action_on_datasets_button" id="action_on_datasets_button" value="Go"/>
1
0
0
0
[hg] galaxy 3812: First pass at implementing a method for allowi...
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/663b2fd4a44c
changeset: 3812:663b2fd4a44c user: Dan Blankenberg <dan(a)bx.psu.edu> date: Mon May 24 14:15:02 2010 -0400 description: First pass at implementing a method for allowing a maximum file size cutoff for setting optional metadata (e.g. line and sequence counts). Currently csFasta, qualsolid, and fastq make use of this option. diffstat: datatypes_conf.xml.sample | 2 +- lib/galaxy/datatypes/data.py | 14 ++++++++++++++ lib/galaxy/datatypes/qualityscore.py | 7 +++++++ lib/galaxy/datatypes/registry.py | 2 ++ lib/galaxy/datatypes/sequence.py | 7 +++++++ 5 files changed, 31 insertions(+), 1 deletions(-) diffs (96 lines): diff -r 7faa12ac9746 -r 663b2fd4a44c datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample Mon May 24 11:22:12 2010 -0400 +++ b/datatypes_conf.xml.sample Mon May 24 14:15:02 2010 -0400 @@ -33,7 +33,7 @@ </datatype> <datatype extension="customtrack" type="galaxy.datatypes.interval:CustomTrack"/> <datatype extension="csfasta" type="galaxy.datatypes.sequence:csFasta" display_in_upload="true"/> - <datatype extension="data" type="galaxy.datatypes.data:Data" mimetype="application/octet-stream"/> + <datatype extension="data" type="galaxy.datatypes.data:Data" mimetype="application/octet-stream" max_optional_metadata_filesize="1048576" /> <datatype extension="fasta" type="galaxy.datatypes.sequence:Fasta" display_in_upload="true"> <converter file="fasta_to_tabular_converter.xml" target_datatype="tabular"/> </datatype> diff -r 7faa12ac9746 -r 663b2fd4a44c lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Mon May 24 11:22:12 2010 -0400 +++ b/lib/galaxy/datatypes/data.py Mon May 24 14:15:02 2010 -0400 @@ -57,6 +57,8 @@ composite_type = None composite_files = odict() primary_file_name = 'index' + #A per datatype setting (inherited): max file size (in bytes) for setting optional metadata + _max_optional_metadata_filesize = None def __init__(self, **kwd): """Initialize the datatype""" @@ -116,6 +118,18 @@ if not value: return True return False + def set_max_optional_metadata_filesize( self, max_value ): + try: + max_value = int( max_value ) + except: + return + self.__class__._max_optional_metadata_filesize = max_value + def get_max_optional_metadata_filesize( self ): + rval = self.__class__._max_optional_metadata_filesize + if rval is None: + return -1 + return rval + max_optional_metadata_filesize = property( get_max_optional_metadata_filesize, set_max_optional_metadata_filesize ) def set_peek( self, dataset, is_multi_byte=False ): """Set the peek and blurb text""" if not dataset.dataset.purged: diff -r 7faa12ac9746 -r 663b2fd4a44c lib/galaxy/datatypes/qualityscore.py --- a/lib/galaxy/datatypes/qualityscore.py Mon May 24 11:22:12 2010 -0400 +++ b/lib/galaxy/datatypes/qualityscore.py Mon May 24 14:15:02 2010 -0400 @@ -63,6 +63,13 @@ except: pass return False + + def set_meta( self, dataset, **kwd ): + if self.max_optional_metadata_filesize >= 0 and dataset.get_size() > self.max_optional_metadata_filesize: + return + return QualityScore.set_meta( self, dataset, **kwd ) + + class QualityScore454 ( QualityScore ): """ diff -r 7faa12ac9746 -r 663b2fd4a44c lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py Mon May 24 11:22:12 2010 -0400 +++ b/lib/galaxy/datatypes/registry.py Mon May 24 14:15:02 2010 -0400 @@ -64,6 +64,8 @@ self.available_tracks.append( extension ) if display_in_upload: self.upload_file_formats.append( extension ) + #max file size cut off for setting optional metadata + self.datatypes_by_extension[extension].max_optional_metadata_filesize = elem.get( 'max_optional_metadata_filesize', None ) for converter in elem.findall( 'converter' ): # Build the list of datatype converters which will later be loaded # into the calling app's toolbox. diff -r 7faa12ac9746 -r 663b2fd4a44c lib/galaxy/datatypes/sequence.py --- a/lib/galaxy/datatypes/sequence.py Mon May 24 11:22:12 2010 -0400 +++ b/lib/galaxy/datatypes/sequence.py Mon May 24 14:15:02 2010 -0400 @@ -148,6 +148,11 @@ except: pass return False + + def set_meta( self, dataset, **kwd ): + if self.max_optional_metadata_filesize >= 0 and dataset.get_size() > self.max_optional_metadata_filesize: + return + return Sequence.set_meta( self, dataset, **kwd ) class Fastq ( Sequence ): """Class representing a generic FASTQ sequence""" @@ -158,6 +163,8 @@ Set the number of sequences and the number of data lines in dataset. """ + if self.max_optional_metadata_filesize >= 0 and dataset.get_size() > self.max_optional_metadata_filesize: + return data_lines = 0 sequences = 0 seq_counter = 0 # blocks should be 4 lines long
1
0
0
0
[hg] galaxy 3811: Send the web freamework ( trans ) to the grid'...
by Nate Coraor
25 May '10
25 May '10
details:
http://www.bx.psu.edu/hg/galaxy/rev/7faa12ac9746
changeset: 3811:7faa12ac9746 user: Greg Von Kuster <greg(a)bx.psu.edu> date: Mon May 24 11:22:12 2010 -0400 description: Send the web freamework ( trans ) to the grid's build_initial_query() method rather than the web framework's db session so that the method can take advantage of all of the web freamwork's attributes. Change the library controller to use grids for the data libraries display. diffstat: lib/galaxy/web/controllers/admin.py | 12 +- lib/galaxy/web/controllers/history.py | 8 +- lib/galaxy/web/controllers/library.py | 88 ++++++++++++++++++---- lib/galaxy/web/controllers/library_admin.py | 14 +- lib/galaxy/web/controllers/page.py | 4 +- lib/galaxy/web/controllers/requests.py | 4 +- lib/galaxy/web/controllers/tracks.py | 4 +- lib/galaxy/web/controllers/visualization.py | 4 +- lib/galaxy/web/controllers/workflow.py | 4 +- lib/galaxy/web/framework/helpers/grids.py | 7 +- lib/galaxy/webapps/community/controllers/admin.py | 24 +++--- lib/galaxy/webapps/community/controllers/tool.py | 12 +- templates/library/browse_libraries.mako | 31 -------- templates/library/grid.mako | 1 + test/functional/test_library_security.py | 2 +- 15 files changed, 121 insertions(+), 98 deletions(-) diffs (466 lines): diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/admin.py Mon May 24 11:22:12 2010 -0400 @@ -103,8 +103,8 @@ use_paging = True def get_current_item( self, trans ): return trans.user - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class RoleListGrid( grids.Grid ): class NameColumn( grids.TextColumn ): @@ -197,8 +197,8 @@ use_paging = True def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwargs ): return query.filter( model.Role.type != model.Role.types.PRIVATE ) @@ -275,8 +275,8 @@ use_paging = True def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class AdminGalaxy( BaseController, Admin ): diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/history.py --- a/lib/galaxy/web/controllers/history.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/history.py Mon May 24 11:22:12 2010 -0400 @@ -110,8 +110,8 @@ grids.GridOperation( "Unshare" ) ] standard_filters = [] - def build_initial_query( self, session ): - return session.query( self.model_class ).join( 'users_shared_with' ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ).join( 'users_shared_with' ) def apply_default_filter( self, trans, query, **kwargs ): return query.filter( model.HistoryUserShareAssociation.user == trans.user ) @@ -138,9 +138,9 @@ key="free-text-search", visible=False, filterable="standard" ) ) operations = [] - def build_initial_query( self, session ): + def build_initial_query( self, trans ): # Join so that searching history.user makes sense. - return session.query( self.model_class ).join( model.User.table ) + return trans.sa_session.query( self.model_class ).join( model.User.table ) def apply_default_filter( self, trans, query, **kwargs ): # A public history is published, has a slug, and is not deleted. return query.filter( self.model_class.published == True ).filter( self.model_class.slug != None ).filter( self.model_class.deleted == False ) diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/library.py --- a/lib/galaxy/web/controllers/library.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/library.py Mon May 24 11:22:12 2010 -0400 @@ -1,12 +1,73 @@ from galaxy.web.base.controller import * +from galaxy.web.framework.helpers import time_ago, iff, grids from galaxy.model.orm import * from galaxy.datatypes import sniff -from galaxy import util +from galaxy import model, util from galaxy.util.odict import odict log = logging.getLogger( __name__ ) +class LibraryListGrid( grids.Grid ): + class NameColumn( grids.TextColumn ): + def get_value( self, trans, grid, library ): + return library.name + class DescriptionColumn( grids.TextColumn ): + def get_value( self, trans, grid, library ): + if library.description: + return library.description + return '' + # Grid definition + title = "Data Libraries" + model_class = model.Library + template='/library/grid.mako' + default_sort_key = "name" + columns = [ + NameColumn( "Name", + key="name", + model_class=model.Library, + link=( lambda library: dict( operation="browse", id=library.id ) ), + attach_popup=False, + filterable="advanced" ), + DescriptionColumn( "Description", + key="description", + model_class=model.Library, + attach_popup=False, + filterable="advanced" ), + ] + columns.append( grids.MulticolFilterColumn( "Search", + cols_to_filter=[ columns[0], columns[1] ], + key="free-text-search", + visible=False, + filterable="standard" ) ) + standard_filters = [] + default_filter = dict( name="All", description="All", deleted="False", purged="False" ) + num_rows_per_page = 50 + preserve_state = False + use_paging = True + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ).filter( self.model_class.table.c.deleted == False ) + def apply_default_filter( self, trans, query, **kwd ): + current_user_role_ids = [ role.id for role in trans.get_current_user_roles() ] + library_access_action = trans.app.security_agent.permitted_actions.LIBRARY_ACCESS.action + restricted_library_ids = [ lp.library_id for lp in trans.sa_session.query( trans.model.LibraryPermissions ) \ + .filter( trans.model.LibraryPermissions.table.c.action == library_access_action ) \ + .distinct() ] + accessible_restricted_library_ids = [ lp.library_id for lp in trans.sa_session.query( trans.model.LibraryPermissions ) \ + .filter( and_( trans.model.LibraryPermissions.table.c.action == library_access_action, + trans.model.LibraryPermissions.table.c.role_id.in_( current_user_role_ids ) ) ) ] + if not trans.user: + # Filter to get only public libraries, a library whose id + # is not in restricted_library_ids is a public library + return query.filter( not_( trans.model.Library.table.c.id.in_( restricted_library_ids ) ) ) + else: + # Filter to get libraries accessible by the current user, get both + # public libraries and restricted libraries accessible by the current user. + return query.filter( or_( not_( trans.model.Library.table.c.id.in_( restricted_library_ids ) ), + trans.model.Library.table.c.id.in_( accessible_restricted_library_ids ) ) ) class Library( BaseController ): + + library_list_grid = LibraryListGrid() + @web.expose def index( self, trans, **kwd ): params = util.Params( kwd ) @@ -18,19 +79,12 @@ status=status ) @web.expose def browse_libraries( self, trans, **kwd ): - params = util.Params( kwd ) - message = util.restore_text( params.get( 'message', '' ) ) - status = params.get( 'status', 'done' ) - current_user_roles = trans.get_current_user_roles() - all_libraries = trans.sa_session.query( trans.app.model.Library ) \ - .filter( trans.app.model.Library.table.c.deleted==False ) \ - .order_by( trans.app.model.Library.name ) - authorized_libraries = [] - for library in all_libraries: - if trans.app.security_agent.can_access_library( current_user_roles, library ): - authorized_libraries.append( library ) - return trans.fill_template( '/library/browse_libraries.mako', - libraries=authorized_libraries, - default_action=params.get( 'default_action', None ), - message=message, - status=status ) + if 'operation' in kwd: + operation = kwd['operation'].lower() + if operation == "browse": + return trans.response.send_redirect( web.url_for( controller='library_common', + action='browse_library', + cntrller='library', + **kwd ) ) + # Render the list view + return self.library_list_grid( trans, **kwd ) diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/library_admin.py --- a/lib/galaxy/web/controllers/library_admin.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/library_admin.py Mon May 24 11:22:12 2010 -0400 @@ -69,8 +69,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class LibraryAdmin( BaseController ): @@ -78,16 +78,16 @@ @web.expose @web.require_admin - def browse_libraries( self, trans, **kwargs ): - if 'operation' in kwargs: - operation = kwargs['operation'].lower() + def browse_libraries( self, trans, **kwd ): + if 'operation' in kwd: + operation = kwd['operation'].lower() if operation == "browse": return trans.response.send_redirect( web.url_for( controller='library_common', action='browse_library', cntrller='library_admin', - **kwargs ) ) + **kwd ) ) # Render the list view - return self.library_list_grid( trans, **kwargs ) + return self.library_list_grid( trans, **kwd ) @web.expose @web.require_admin def create_library( self, trans, **kwd ): diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/page.py --- a/lib/galaxy/web/controllers/page.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/page.py Mon May 24 11:22:12 2010 -0400 @@ -71,9 +71,9 @@ cols_to_filter=[ columns[0], columns[1], columns[2], columns[3] ], key="free-text-search", visible=False, filterable="standard" ) ) - def build_initial_query( self, session ): + def build_initial_query( self, trans ): # Join so that searching history.user makes sense. - return session.query( self.model_class ).join( model.User.table ) + return trans.sa_session.query( self.model_class ).join( model.User.table ) def apply_default_filter( self, trans, query, **kwargs ): return query.filter( self.model_class.deleted==False ).filter( self.model_class.published==True ) diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/requests.py Mon May 24 11:22:12 2010 -0400 @@ -126,8 +126,8 @@ ] def apply_default_filter( self, trans, query, **kwd ): return query.filter_by( user=trans.user ) - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class Requests( BaseController ): request_grid = RequestsGrid() diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/tracks.py Mon May 24 11:22:12 2010 -0400 @@ -71,8 +71,8 @@ DbKeyColumn( "Dbkey", key="dbkey", model_class=model.HistoryDatasetAssociation, visible=False ) ] - def build_initial_query( self, session ): - return session.query( self.model_class ).join( model.History.table).join( model.Dataset.table ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ).join( model.History.table).join( model.Dataset.table ) def apply_default_filter( self, trans, query, **kwargs ): if self.available_tracks is None: self.available_tracks = trans.app.datatypes_registry.get_available_tracks() diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/visualization.py --- a/lib/galaxy/web/controllers/visualization.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/visualization.py Mon May 24 11:22:12 2010 -0400 @@ -55,9 +55,9 @@ cols_to_filter=[ columns[0], columns[1], columns[2], columns[3] ], key="free-text-search", visible=False, filterable="standard" ) ) - def build_initial_query( self, session ): + def build_initial_query( self, trans ): # Join so that searching history.user makes sense. - return session.query( self.model_class ).join( model.User.table ) + return trans.sa_session.query( self.model_class ).join( model.User.table ) def apply_default_filter( self, trans, query, **kwargs ): return query.filter( self.model_class.deleted==False ).filter( self.model_class.published==True ) diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/controllers/workflow.py Mon May 24 11:22:12 2010 -0400 @@ -75,9 +75,9 @@ key="free-text-search", visible=False, filterable="standard" ) ) operations = [] - def build_initial_query( self, session ): + def build_initial_query( self, trans ): # Join so that searching stored_workflow.user makes sense. - return session.query( self.model_class ).join( model.User.table ) + return trans.sa_session.query( self.model_class ).join( model.User.table ) def apply_default_filter( self, trans, query, **kwargs ): # A public workflow is published, has a slug, and is not deleted. return query.filter( self.model_class.published==True ).filter( self.model_class.slug != None ).filter( self.model_class.deleted == False ) diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/web/framework/helpers/grids.py --- a/lib/galaxy/web/framework/helpers/grids.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/web/framework/helpers/grids.py Mon May 24 11:22:12 2010 -0400 @@ -45,7 +45,6 @@ webapp = kwargs.get( 'webapp', 'galaxy' ) status = kwargs.get( 'status', None ) message = kwargs.get( 'message', None ) - session = trans.sa_session # Build a base filter and sort key that is the combination of the saved state and defaults. Saved state takes preference over defaults. base_filter = {} if self.default_filter: @@ -60,7 +59,7 @@ if pref_name in trans.get_user().preferences: base_sort_key = from_json_string( trans.get_user().preferences[pref_name] ) # Build initial query - query = self.build_initial_query( session ) + query = self.build_initial_query( trans ) query = self.apply_default_filter( trans, query, **kwargs ) # Maintain sort state in generated urls extra_url_args = {} @@ -258,8 +257,8 @@ pass def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwargs): return query diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/webapps/community/controllers/admin.py --- a/lib/galaxy/webapps/community/controllers/admin.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/webapps/community/controllers/admin.py Mon May 24 11:22:12 2010 -0400 @@ -113,8 +113,8 @@ use_paging = True def get_current_item( self, trans ): return trans.user - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class RoleListGrid( grids.Grid ): class NameColumn( grids.TextColumn ): @@ -211,8 +211,8 @@ use_paging = True def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwd ): return query.filter( model.Role.type != model.Role.types.PRIVATE ) @@ -294,8 +294,8 @@ use_paging = True def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class ManageCategoryListGrid( grids.Grid ): class NameColumn( grids.TextColumn ): @@ -360,8 +360,8 @@ use_paging = True def get_current_item( self, trans ): return None - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class ToolsByCategoryListGrid( grids.Grid ): class NameColumn( grids.TextColumn ): @@ -423,8 +423,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwd ): ids = kwd.get( 'ids', False ) if ids: @@ -546,8 +546,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwd ): ids = kwd.get( 'ids', False ) if ids: diff -r d22853e5963d -r 7faa12ac9746 lib/galaxy/webapps/community/controllers/tool.py --- a/lib/galaxy/webapps/community/controllers/tool.py Mon May 24 10:53:55 2010 -0400 +++ b/lib/galaxy/webapps/community/controllers/tool.py Mon May 24 11:22:12 2010 -0400 @@ -94,8 +94,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwd ): ids = kwd.get( 'ids', False ) if not ids: @@ -218,8 +218,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) def apply_default_filter( self, trans, query, **kwd ): ids = kwd.get( 'ids', False ) if not ids: @@ -295,8 +295,8 @@ num_rows_per_page = 50 preserve_state = False use_paging = True - def build_initial_query( self, session ): - return session.query( self.model_class ) + def build_initial_query( self, trans ): + return trans.sa_session.query( self.model_class ) class ToolController( BaseController ): diff -r d22853e5963d -r 7faa12ac9746 templates/library/browse_libraries.mako --- a/templates/library/browse_libraries.mako Mon May 24 10:53:55 2010 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">Browse Data Libraries</%def> - -<h2>Data Libraries</h2> - -%if message: - ${render_msg( message, status )} -%endif - -%if not libraries: - You are not authorized to access any libraries -%else: - <table class="grid"> - <thead> - <tr> - <th>Name</th> - <th>Description</th> - </tr> - </thead> - <tbody> - %for library in libraries: - <tr class="libraryRow libraryOrFolderRow" id="libraryRow"> - <td><a href="${h.url_for( controller='library_common', action='browse_library', cntrller='library', id=trans.security.encode_id( library.id ), hidden_folder_ids='' )}">${library.name}</a></td> - <td>${library.description}</td> - </tr> - %endfor - </tbody> - </table> -%endif diff -r d22853e5963d -r 7faa12ac9746 templates/library/grid.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/library/grid.mako Mon May 24 11:22:12 2010 -0400 @@ -0,0 +1,1 @@ +<%inherit file="/grid_base.mako"/> diff -r d22853e5963d -r 7faa12ac9746 test/functional/test_library_security.py --- a/test/functional/test_library_security.py Mon May 24 10:53:55 2010 -0400 +++ b/test/functional/test_library_security.py Mon May 24 11:22:12 2010 -0400 @@ -192,7 +192,7 @@ # regular_user2 should not be to see the library since they do not have # Role One which is associated with the LIBRARY_ACCESS permission self.login( email=regular_user2.email ) - self.browse_libraries_regular_user( check_str1="You are not authorized to access any libraries" ) + self.browse_libraries_regular_user( check_str1="No Items" ) self.logout() # regular_user3 should not be able to see 1.bed from the analysis view's access librarys self.login( email=regular_user3.email )
1
0
0
0
← Newer
1
2
3
4
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200