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
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
List overview
Download
galaxy-dev
September 2009
----- 2023 -----
December 2023
November 2023
October 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
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
galaxy-dev@lists.galaxyproject.org
15 participants
140 discussions
Start a n
N
ew thread
[hg] galaxy 2748: More friendly error reporting for mutate SNP c...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/9e8901230940
changeset: 2748:9e8901230940 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Tue Sep 22 11:37:41 2009 -0400 description: More friendly error reporting for mutate SNP codon tool. 1 file(s) affected in this change: tools/evolution/mutate_snp_codon.py diffs (89 lines): diff -r 4d32e2d934d0 -r 9e8901230940 tools/evolution/mutate_snp_codon.py --- a/tools/evolution/mutate_snp_codon.py Tue Sep 22 10:55:50 2009 -0400 +++ b/tools/evolution/mutate_snp_codon.py Tue Sep 22 11:37:41 2009 -0400 @@ -34,32 +34,66 @@ DNA_COMP = string.maketrans( "ACGTacgt", "TGCAtgca" ) skipped_lines = 0 - for line in open( input_file ): + errors = {} + for name, message in [ ('max_field_index','not enough fields'), ( 'codon_len', 'codon length must be 3' ), ( 'codon_seq', 'codon sequence must have length 3' ), ( 'snp_len', 'SNP length must be 3' ), ( 'snp_observed', 'SNP observed values must have length 3' ), ( 'empty_comment', 'empty or comment'), ( 'no_overlap', 'codon and SNP do not overlap' ) ]: + errors[ name ] = { 'count':0, 'message':message } + line_count = 0 + for line_count, line in enumerate( open( input_file ) ): line = line.rstrip( '\n\r' ) if line and not line.startswith( '#' ): fields = line.split( '\t' ) if max_field_index >= len( fields ): skipped_lines += 1 + errors[ 'max_field_index' ]['count'] += 1 continue + + #read codon info codon_chrom = fields[codon_chrom_col] codon_start = int( fields[codon_start_col] ) codon_end = int( fields[codon_end_col] ) + if codon_end - codon_start != 3: + #codons must be length 3 + skipped_lines += 1 + errors[ 'codon_len' ]['count'] += 1 + continue codon_strand = strandify( fields, codon_strand_col ) codon_seq = fields[codon_seq_col].upper() + if len( codon_seq ) != 3: + #codon sequence must have length 3 + skipped_lines += 1 + errors[ 'codon_seq' ]['count'] += 1 + continue + #read snp info snp_chrom = fields[snp_chrom_col] snp_start = int( fields[snp_start_col] ) snp_end = int( fields[snp_end_col] ) + if snp_end - snp_start != 1: + #snps must be length 1 + skipped_lines += 1 + errors[ 'snp_len' ]['count'] += 1 + continue snp_strand = strandify( fields, snp_strand_col ) snp_observed = fields[snp_observed_col].split( '/' ) + snp_observed = [ observed for observed in snp_observed if len( observed ) == 1 ] + if not snp_observed: + #sequence replacements must be length 1 + skipped_lines += 1 + errors[ 'snp_observed' ]['count'] += 1 + continue + + #Determine index of replacement for observed values into codon + offset = snp_start - codon_start + #Extract DNA on neg strand codons will have positions reversed relative to interval positions; i.e. position 0 == position 2 + if codon_strand == '-': + offset = 2 - offset + if offset < 0 and offset > 2: #assert offset >= 0 and offset <= 2, ValueError( 'Impossible offset determined: %s' % offset ) + #codon and snp do not overlap + skipped_lines += 1 + errors[ 'no_overlap' ]['count'] += 1 + continue for observed in snp_observed: - #Extract DNA on neg strand codons will have positions reversed relative to interval positions; i.e. position 0 == position 2 - offset = snp_start - codon_start - if codon_strand == '-': - offset = 2 - offset - assert offset >= 0 and offset <= 2, ValueError( 'Impossible offset determined: %s' % offset ) - if codon_strand != snp_strand: #if our SNP is on a different strand than our codon, take complement of provided observed SNP base observed = observed.translate( DNA_COMP ) @@ -69,5 +103,10 @@ if codon_seq != snp_codon: #only output when we actually have a different codon out.write( "%s\t%s\n" % ( line, snp_codon ) ) - + else: + skipped_lines += 1 + errors[ 'empty_comment' ]['count'] += 1 + if skipped_lines: + print "Skipped %i (%4.2f%%) of %i lines; reasons: %s" % ( skipped_lines, ( float( skipped_lines )/float( line_count ) ) * 100, line_count, ', '.join( [ "%s (%i)" % ( error['message'], error['count'] ) for error in errors.itervalues() if error['count'] ] ) ) + if __name__ == "__main__": main()
1
0
0
0
[hg] galaxy 2749: Changing an 'and' to 'or' in SNP mutate codon ...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/822cae6071c1
changeset: 2749:822cae6071c1 user: Dan Blankenberg <dan(a)bx.psu.edu> date: Tue Sep 22 11:40:41 2009 -0400 description: Changing an 'and' to 'or' in SNP mutate codon tool error checking. 1 file(s) affected in this change: tools/evolution/mutate_snp_codon.py diffs (12 lines): diff -r 9e8901230940 -r 822cae6071c1 tools/evolution/mutate_snp_codon.py --- a/tools/evolution/mutate_snp_codon.py Tue Sep 22 11:37:41 2009 -0400 +++ b/tools/evolution/mutate_snp_codon.py Tue Sep 22 11:40:41 2009 -0400 @@ -87,7 +87,7 @@ #Extract DNA on neg strand codons will have positions reversed relative to interval positions; i.e. position 0 == position 2 if codon_strand == '-': offset = 2 - offset - if offset < 0 and offset > 2: #assert offset >= 0 and offset <= 2, ValueError( 'Impossible offset determined: %s' % offset ) + if offset < 0 or offset > 2: #assert offset >= 0 and offset <= 2, ValueError( 'Impossible offset determined: %s' % offset ) #codon and snp do not overlap skipped_lines += 1 errors[ 'no_overlap' ]['count'] += 1
1
0
0
0
[hg] galaxy 2750: Eliminate the use of the genetrack controller, ...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/d42c5698798b
changeset: 2750:d42c5698798b user: Greg Von Kuster <greg(a)bx.psu.edu> date: Tue Sep 22 14:04:48 2009 -0400 description: Eliminate the use of the genetrack controller, merge the template code for uploading library datasets, and several bug fixes: - The genetrack controller is no longer used ( I'll delete it soon ), so the GeneTrack application is now loosely coupled - Merge the 2 new_dataset.mako templates into one common code module name library_dataset_common.mako - Rename all of the library upload form fields to have the same names as the history upload form fields - Eliminate a 2nd runtool_btn from being rendered on the same form in tool_form.mako - Fix bug and add functional tests to cover uploading a library dataset that does not include a template 16 file(s) affected in this change: lib/galaxy/config.py lib/galaxy/datatypes/tracks.py lib/galaxy/util/__init__.py lib/galaxy/web/controllers/library.py lib/galaxy/web/controllers/library_admin.py lib/galaxy/web/controllers/library_dataset.py templates/admin/library/new_dataset.mako templates/admin/library/upload.mako templates/library/library_dataset_common.mako templates/library/new_dataset.mako templates/library/upload.mako templates/tool_form.mako test/base/twilltestcase.py test/functional/test_security_and_libraries.py tool-data/shared/genetrack/genetrack_sites.txt universe_wsgi.ini.sample diffs (1749 lines): diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/config.py --- a/lib/galaxy/config.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/config.py Tue Sep 22 14:04:48 2009 -0400 @@ -74,7 +74,8 @@ self.log_memory_usage = string_as_bool( kwargs.get( 'log_memory_usage', 'False' ) ) self.log_events = string_as_bool( kwargs.get( 'log_events', 'False' ) ) self.ucsc_display_sites = kwargs.get( 'ucsc_display_sites', "main,test,archaea" ).lower().split(",") - self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "wormbase,flybase,elegans" ).lower().split(",") + self.gbrowse_display_sites = kwargs.get( 'gbrowse_display_sites', "main,test" ).lower().split(",") + self.genetrack_display_sites = kwargs.get( 'genetrack_display_sites', "main,test" ).lower().split(",") self.brand = kwargs.get( 'brand', None ) self.wiki_url = kwargs.get( 'wiki_url', '
http://g2.trac.bx.psu.edu/
' ) self.bugs_email = kwargs.get( 'bugs_email', None ) diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/datatypes/tracks.py --- a/lib/galaxy/datatypes/tracks.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/datatypes/tracks.py Tue Sep 22 14:04:48 2009 -0400 @@ -5,6 +5,7 @@ import data import logging import re +import binascii from cgi import escape from galaxy.datatypes.metadata import MetadataElement from galaxy.datatypes import metadata @@ -12,6 +13,7 @@ from galaxy import util from galaxy.web import url_for from sniff import * +from galaxy.util.hash_util import * log = logging.getLogger(__name__) @@ -23,8 +25,19 @@ MetadataElement( name="label", default="Custom", desc="Track Label", readonly=True, visible=True, no_value="Custom" ) def __init__(self, **kwargs): - super(GeneTrack, self).__init__(**kwargs) - self.add_display_app( 'genetrack', 'View in ', '', 'genetrack_link' ) - - def genetrack_link( self, dataset, type, app, base_url ): - return [('GeneTrack', url_for(controller='genetrack', action='index', dataset_id=dataset.id ))] \ No newline at end of file + super( GeneTrack, self ).__init__( **kwargs ) + self.add_display_app( 'genetrack', 'View in GeneTrack', '', 'genetrack_link' ) + def genetrack_link( self, hda, type, app, base_url ): + ret_val = [] + if hda.has_data: + # Get the disk file name + file_name = hda.dataset.get_file_name() + # Make it secure + a = hmac_new( app.config.tool_secret, file_name ) + b = binascii.hexlify( file_name ) + encoded_file_name = "%s:%s" % ( a, b ) + for site_name, site_url in util.get_genetrack_sites(): + if site_name in app.config.genetrack_display_sites: + link = "%s?filename=%s" % ( site_url, encoded_file_name ) + ret_val.append( ( site_name, link ) ) + return ret_val diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/util/__init__.py --- a/lib/galaxy/util/__init__.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/util/__init__.py Tue Sep 22 14:04:48 2009 -0400 @@ -334,12 +334,16 @@ if build in site['builds']: sites.append((site['name'],site['url'])) return sites - def get_gbrowse_sites_by_build(build): sites = [] for site in gbrowse_build_sites: if build in site['builds']: sites.append((site['name'],site['url'])) + return sites +def get_genetrack_sites(): + sites = [] + for site in genetrack_sites: + sites.append( ( site['name'], site['url'] ) ) return sites def read_dbnames(filename): @@ -392,7 +396,7 @@ db_names = DBNames( [( db_names.default_value, db_names.default_name )] ) return db_names -def read_build_sites(filename): +def read_build_sites( filename, check_builds=True ): """ read db names to ucsc mappings from file, this file should probably be merged with the one above """ build_sites = [] try: @@ -402,8 +406,11 @@ fields = line.replace("\r","").replace("\n","").split("\t") site_name = fields[0] site = fields[1] - site_builds = fields[2].split(",") - site_dict = {'name':site_name, 'url':site, 'builds':site_builds} + if check_builds: + site_builds = fields[2].split(",") + site_dict = {'name':site_name, 'url':site, 'builds':site_builds} + else: + site_dict = {'name':site_name, 'url':site} build_sites.append( site_dict ) except: continue except: @@ -475,9 +482,11 @@ raise IOError, (errno.EEXIST, "No usable temporary file name found") galaxy_root_path = os.path.join(__path__[0], "..","..","..") -dbnames = read_dbnames( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "builds.txt" ) ) #this list is used in edit attributes and the upload tool -ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) ) #this list is used in history.tmpl -gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) ) #this list is used in history.tmpl +# The dbnames list is used in edit attributes and the upload tool +dbnames = read_dbnames( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "builds.txt" ) ) +ucsc_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "ucsc", "ucsc_build_sites.txt" ) ) +gbrowse_build_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "gbrowse", "gbrowse_build_sites.txt" ) ) +genetrack_sites = read_build_sites( os.path.join( galaxy_root_path, "tool-data", "shared", "genetrack", "genetrack_sites.txt" ), check_builds=False ) if __name__ == '__main__': import doctest, sys diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/web/controllers/library.py --- a/lib/galaxy/web/controllers/library.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/web/controllers/library.py Tue Sep 22 14:04:48 2009 -0400 @@ -434,7 +434,7 @@ if folder and last_used_build in [ 'None', None, '?' ]: last_used_build = folder.genome_build replace_id = params.get( 'replace_id', None ) - if replace_id: + if replace_id not in [ None, 'None' ]: replace_dataset = trans.app.model.LibraryDataset.get( params.get( 'replace_id', None ) ) if not last_used_build: last_used_build = replace_dataset.library_dataset_dataset_association.dbkey @@ -716,14 +716,14 @@ messagetype=messagetype ) if trans.app.security_agent.can_add_library_item( user, roles, folder ) or \ ( replace_dataset and trans.app.security_agent.can_modify_library_item( user, roles, replace_dataset ) ): - if params.get( 'new_dataset_button', False ): + if params.get( 'runtool_btn', False ): # See if we have any inherited templates, but do not inherit contents. info_association, inherited = folder.get_info_association( inherited=True ) if info_association: template_id = str( info_association.template.id ) widgets = folder.get_template_widgets( trans, get_contents=False ) else: - template_id = None + template_id = 'None' widgets = [] upload_option = params.get( 'upload_option', 'upload_file' ) created_ldda_ids = trans.webapp.controllers[ 'library_dataset' ].upload_dataset( trans, @@ -789,11 +789,11 @@ # Send the current history to the form to enable importing datasets from history to library history = trans.get_history() history.refresh() - return trans.fill_template( '/library/new_dataset.mako', + return trans.fill_template( '/library/upload.mako', upload_option=upload_option, library_id=library_id, folder_id=folder_id, - replace_id=replace_id, + replace_dataset=replace_dataset, file_formats=file_formats, dbkeys=dbkeys, last_used_build=last_used_build, @@ -801,8 +801,7 @@ history=history, widgets=widgets, msg=msg, - messagetype=messagetype, - replace_dataset=replace_dataset ) + messagetype=messagetype ) @web.expose def add_history_datasets_to_library( self, trans, library_id, folder_id, hda_ids='', **kwd ): params = util.Params( kwd ) @@ -902,16 +901,17 @@ dbkeys = get_dbkey_options( last_used_build ) # Send list of roles to the form so the dataset can be associated with 1 or more of them. roles = trans.app.model.Role.filter( trans.app.model.Role.table.c.deleted==False ).order_by( trans.app.model.Role.c.name ).all() - return trans.fill_template( "/library/new_dataset.mako", + return trans.fill_template( "/library/upload.mako", upload_option=upload_option, library_id=library_id, folder_id=folder_id, - replace_id=replace_id, + replace_dataset=replace_dataset, file_formats=file_formats, dbkeys=dbkeys, last_used_build=last_used_build, roles=roles, history=history, + widgets=[], msg=msg, messagetype=messagetype ) @web.expose diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/web/controllers/library_admin.py --- a/lib/galaxy/web/controllers/library_admin.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/web/controllers/library_admin.py Tue Sep 22 14:04:48 2009 -0400 @@ -418,7 +418,7 @@ if folder and last_used_build in [ 'None', None, '?' ]: last_used_build = folder.genome_build replace_id = params.get( 'replace_id', None ) - if replace_id: + if replace_id not in [ None, 'None' ]: replace_dataset = trans.app.model.LibraryDataset.get( int( replace_id ) ) if not last_used_build: last_used_build = replace_dataset.library_dataset_dataset_association.dbkey @@ -428,14 +428,14 @@ # The built-in 'id' is overwritten in lots of places as well ldatatypes = [ dtype_name for dtype_name, dtype_value in trans.app.datatypes_registry.datatypes_by_extension.iteritems() if dtype_value.allow_datatype_change ] ldatatypes.sort() - if params.get( 'new_dataset_button', False ): + if params.get( 'runtool_btn', False ): # See if we have any inherited templates, but do not inherit contents. info_association, inherited = folder.get_info_association( inherited=True ) if info_association: template_id = str( info_association.template.id ) widgets = folder.get_template_widgets( trans, get_contents=False ) else: - template_id = None + template_id = 'None' widgets = [] upload_option = params.get( 'upload_option', 'upload_file' ) created_ldda_ids = trans.webapp.controllers[ 'library_dataset' ].upload_dataset( trans, @@ -484,11 +484,11 @@ # Send the current history to the form to enable importing datasets from history to library history = trans.get_history() history.refresh() - return trans.fill_template( '/admin/library/new_dataset.mako', + return trans.fill_template( '/admin/library/upload.mako', upload_option=upload_option, library_id=library_id, folder_id=folder_id, - replace_id=replace_id, + replace_dataset=replace_dataset, file_formats=file_formats, dbkeys=dbkeys, last_used_build=last_used_build, @@ -496,8 +496,7 @@ history=history, widgets=widgets, msg=msg, - messagetype=messagetype, - replace_dataset=replace_dataset ) + messagetype=messagetype ) else: if params.get( 'permissions', False ): action = 'permissions' @@ -886,17 +885,17 @@ dbkeys = get_dbkey_options( last_used_build ) # Send list of roles to the form so the dataset can be associated with 1 or more of them. roles = trans.app.model.Role.filter( trans.app.model.Role.table.c.deleted==False ).order_by( trans.app.model.Role.c.name ).all() - return trans.fill_template( "/admin/library/new_dataset.mako", + return trans.fill_template( "/admin/library/upload.mako", upload_option=upload_option, library_id=library_id, folder_id=folder_id, - replace_id=replace_id, + replace_dataset=replace_dataset, file_formats=file_formats, dbkeys=dbkeys, last_used_build=last_used_build, roles=roles, history=history, - widgets=widgets, + widgets=[], msg=msg, messagetype=messagetype ) @web.expose diff -r 822cae6071c1 -r d42c5698798b lib/galaxy/web/controllers/library_dataset.py --- a/lib/galaxy/web/controllers/library_dataset.py Tue Sep 22 11:40:41 2009 -0400 +++ b/lib/galaxy/web/controllers/library_dataset.py Tue Sep 22 14:04:48 2009 -0400 @@ -12,7 +12,7 @@ os.unlink( filename ) except: log.exception( 'failure removing temporary file: %s' % filename ) - def add_file( self, trans, folder, file_obj, name, file_format, dbkey, roles, + def add_file( self, trans, folder, file_obj, name, file_type, dbkey, roles, info='no info', space_to_tab=False, replace_dataset=None, template=None, template_field_contents=[], message=None ): data_type = None @@ -58,15 +58,15 @@ raise BadFileException( "you attempted to upload an inappropriate file." ) elif is_zipped and is_valid: # Currently, we force specific tools to handle this case. We also require the user - # to manually set the incoming file_format - if ( test_ext == 'ab1' or test_ext == 'scf' ) and file_format != 'binseq.zip': + # to manually set the incoming file_type + if ( test_ext == 'ab1' or test_ext == 'scf' ) and file_type != 'binseq.zip': raise BadFileException( "Invalid 'File Format' for archive consisting of binary files - use 'Binseq.zip'." ) - elif test_ext == 'txt' and file_format != 'txtseq.zip': + elif test_ext == 'txt' and file_type != 'txtseq.zip': raise BadFileException( "Invalid 'File Format' for archive consisting of text files - use 'Txtseq.zip'." ) - if not ( file_format == 'binseq.zip' or file_format == 'txtseq.zip' ): + if not ( file_type == 'binseq.zip' or file_type == 'txtseq.zip' ): raise BadFileException( "you must manually set the 'File Format' to either 'Binseq.zip' or 'Txtseq.zip' when uploading zip files." ) data_type = 'zip' - ext = file_format + ext = file_type if not data_type: if self.check_binary( temp_name ): try: @@ -78,13 +78,13 @@ except: is_pdf = False #file failed to open or contents are smaller than pdf header if is_pdf: - file_format = 'pdf' #allow the upload of PDFs to library via the admin interface. + file_type = 'pdf' #allow the upload of PDFs to library via the admin interface. else: if not( ext == 'ab1' or ext == 'scf' ): raise BadFileException( "you attempted to upload an inappropriate file." ) - if ext == 'ab1' and file_format != 'ab1': + if ext == 'ab1' and file_type != 'ab1': raise BadFileException( "you must manually set the 'File Format' to 'Ab1' when uploading ab1 files." ) - elif ext == 'scf' and file_format != 'scf': + elif ext == 'scf' and file_type != 'scf': raise BadFileException( "you must manually set the 'File Format' to 'Scf' when uploading scf files." ) data_type = 'binary' if not data_type: @@ -101,17 +101,17 @@ line_count = sniff.convert_newlines( temp_name ) else: line_count = None - if file_format == 'auto': + if file_type == 'auto': ext = sniff.guess_ext( temp_name, sniff_order=trans.app.datatypes_registry.sniff_order ) else: - ext = file_format + ext = file_type data_type = ext if info is None: info = 'uploaded %s file' % data_type - if file_format == 'auto': + if file_type == 'auto': data_type = sniff.guess_ext( temp_name, sniff_order=trans.app.datatypes_registry.sniff_order ) else: - data_type = file_format + data_type = file_type 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 @@ -190,11 +190,11 @@ msg = util.restore_text( params.get( 'msg', '' ) ) messagetype = params.get( 'messagetype', 'done' ) dbkey = params.get( 'dbkey', '?' ) - file_format = params.get( 'file_format', 'auto' ) - data_file = params.get( 'file_data', '' ) - url_paste = params.get( 'url_paste', '' ) + file_type = params.get( 'file_type', 'auto' ) + data_file = params.get( 'files_0|file_data', '' ) + url_paste = params.get( 'files_0|url_paste', '' ) server_dir = util.restore_text( params.get( 'server_dir', '' ) ) - if replace_dataset is not None: + if replace_dataset not in [ None, 'None' ]: replace_id = replace_dataset.id else: replace_id = None @@ -208,7 +208,7 @@ # We are inheriting the folder's info_association, so we did not # receive any inherited contents, but we may have redirected here # after the user entered template contents ( due to errors ). - if template_id: + if template_id not in [ None, 'None' ]: template = trans.app.model.FormDefinition.get( template_id ) for field_index in range( len( template.fields ) ): field_name = 'field_%i' % field_index @@ -243,7 +243,7 @@ upload_option=upload_option, msg=util.sanitize_text( msg ), messagetype='error' ) ) - space_to_tab = params.get( 'space_to_tab', False ) + space_to_tab = params.get( 'files_0|space_to_tab', False ) if space_to_tab and space_to_tab not in [ "None", None ]: space_to_tab = True roles = [] @@ -260,7 +260,7 @@ folder, data_file.file, file_name, - file_format, + file_type, dbkey, roles, info="uploaded file", @@ -288,7 +288,7 @@ folder, urllib.urlopen( line ), line, - file_format, + file_type, dbkey, roles, info="uploaded url", @@ -314,7 +314,7 @@ folder, StringIO.StringIO( url_paste ), 'Pasted Entry', - file_format, + file_type, dbkey, roles, info="pasted entry", @@ -365,7 +365,7 @@ folder, open( full_file, 'rb' ), file, - file_format, + file_type, dbkey, roles, info="imported file", @@ -402,7 +402,7 @@ zip_file = zipfile.ZipFile( temp_name, "r" ) # Make sure the archive consists of valid files. The current rules are: # 1. Archives can only include .ab1, .scf or .txt files - # 2. All file file_formats within an archive must be the same + # 2. All file file_types within an archive must be the same name = zip_file.namelist()[0] test_ext = name.split( "." )[1].strip().lower() if not ( test_ext == 'scf' or test_ext == 'ab1' or test_ext == 'txt' ): diff -r 822cae6071c1 -r d42c5698798b templates/admin/library/new_dataset.mako --- a/templates/admin/library/new_dataset.mako Tue Sep 22 11:40:41 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> -<%namespace file="/admin/library/common.mako" import="render_template_info" /> - -<% import os, os.path %> - -<b>Create new data 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_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> - %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='library_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='library_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/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='library_admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> - </li> -</ul> - -%if msg: - ${render_msg( msg, messagetype )} -%endif - -%if upload_option in [ 'upload_file', 'upload_directory' ]: - <div class="toolForm" id="new_dataset"> - %if upload_option == 'upload_file': - <div class="toolFormTitle">Upload files</div> - %else: - <div class="toolFormTitle">Upload a directory of files</div> - %endif - <div class="toolFormBody"> - <form name="tool_form" action="${h.url_for( controller='library_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='library_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"> - <% - # 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="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> - %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> - </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> - <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 data 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> - %if widgets: - <p/> - %for i, field in enumerate( widgets ): - <div class="form-row"> - <label>${field[ 'label' ]}</label> - ${field[ 'widget' ].get_html()} - <div class="toolParamHelp" style="clear: both;"> - ${field[ 'helptext' ]} - </div> - <div style="clear: both"></div> - </div> - %endfor - %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"> - <div class="toolFormTitle">Active datasets in your current history (${history.name})</div> - <div class="toolFormBody"> - %if history and history.active_datasets: - <form name="add_history_datasets_to_library" action="${h.url_for( controller='library_admin', action='add_history_datasets_to_library', 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_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 - %for hda in history.active_datasets: - <div class="form-row"> - <input name="hda_ids" value="${hda.id}" type="checkbox"/>${hda.hid}: ${hda.name} - </div> - %endfor - <div class="form-row"> - <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/> - </div> - </form> - %else: - <p/> - Your current history is empty - <p/> - %endif - </div> - </div> -%endif diff -r 822cae6071c1 -r d42c5698798b templates/admin/library/upload.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/admin/library/upload.mako Tue Sep 22 14:04:48 2009 -0400 @@ -0,0 +1,35 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> +<%namespace file="/admin/library/common.mako" import="render_template_info" /> +<%namespace file="/library/library_dataset_common.mako" import="render_upload_form" /> + +<% import os, os.path %> + +<% + if replace_dataset not in [ None, 'None' ]: + replace_id = replace_dataset.id + else: + replace_id = 'None' +%> + +<b>Create new data 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_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> + %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='library_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='library_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/> +<ul class="manage-table-actions"> + <li> + <a class="action-button" href="${h.url_for( controller='library_admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> + </li> +</ul> + +%if msg: + ${render_msg( msg, messagetype )} +%endif + +${render_upload_form( 'library_admin', upload_option, library_id, folder_id, replace_dataset, file_formats, dbkeys, roles, history, )} diff -r 822cae6071c1 -r d42c5698798b templates/library/library_dataset_common.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/library/library_dataset_common.mako Tue Sep 22 14:04:48 2009 -0400 @@ -0,0 +1,212 @@ +<%def name="render_upload_form( controller, upload_option, library_id, folder_id, replace_dataset, file_formats, dbkeys, roles, history )"> + <% import os, os.path %> + %if upload_option in [ 'upload_file', 'upload_directory' ]: + <div class="toolForm" id="upload_library_dataset"> + %if upload_option == 'upload_file': + <div class="toolFormTitle">Upload files</div> + %else: + <div class="toolFormTitle">Upload a directory of files</div> + %endif + <div class="toolFormBody"> + <form name="upload_library_dataset" action="${h.url_for( controller=controller, action='library_dataset_dataset_association', library_id=library_id )}" enctype="multipart/form-data" method="post"> + <input type="hidden" name="tool_id" value="upload_library_dataset"/> + <input type="hidden" name="tool_state" value="None"/> + <input type="hidden" name="folder_id" value="${folder_id}"/> + <input type="hidden" name="upload_option" value="${upload_option}"/> + %if replace_dataset not in [ None, 'None' ]: + <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=controller, 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 + <div class="form-row"> + <label>File Format:</label> + <div class="form-row-input"> + <select name="file_type"> + <option value="auto" selected>Auto-detect</option> + %for file_format in file_formats: + <option value="${file_format}">${file_format}</option> + %endfor + </select> + </div> + <div style="clear: both"></div> + </div> + %if upload_option == 'upload_file': + <div class="form-row"> + <input type="hidden" name="async_datasets" value="None"/> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <label>File:</label> + <div class="form-row-input"> + <input type="file" name="files_0|file_data" galaxy-ajax-upload="true"/> + </div> + <div style="clear: both"></div> + </div> + <div class="form-row"> + <label>URL/Text:</label> + <div class="form-row-input"> + <textarea name="files_0|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': + <% + if controller == 'library_admin': + import_dir = trans.app.config.library_import_dir + else: + # Directories of files from the Data 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 + import_dir = os.path.join( trans.app.config.user_library_import_dir, trans.user.email ) + %> + <div class="form-row"> + <% + # 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( import_dir ): + if os.path.isdir( os.path.join( import_dir, entry ) ): + contains_directories = True + break + %> + <label>Server Directory</label> + <div class="form-row-input"> + <select name="server_dir"> + %if contains_directories: + <option>None</option> + %for entry in os.listdir( import_dir ): + ## Do not include entries that are not directories + %if os.path.isdir( os.path.join( import_dir, entry ) ): + <option>${entry}</option> + %endif + %endfor + %else: + %if controller == 'library_admin': + <option>${import_dir}</option> + %else: + <option>${trans.user.email}</option> + %endif + %endif + </select> + </div> + <div class="toolParamHelp" style="clear: both;"> + %if contains_directories: + Upload all files in a sub-directory of <strong>${import_dir}</strong> on the Galaxy server. + %else: + Upload all files in <strong>${import_dir}</strong> on the Galaxy server. + %endif + </div> + <div style="clear: both"></div> + </div> + %endif + <div class="form-row"> + <label> + Convert spaces to tabs: + </label> + <div class="form-row-input"> + <input type="checkbox" name="files_0|space_to_tab" value="Yes"/>Yes + </div> + </div> + <div class="toolParamHelp" style="clear: both;"> + Use this option if you are entering intervals by hand. + </div> + <div style="clear: both"></div> + <div class="form-row"> + <label>Genome:</label> + <div class="form-row-input"> + <select name="dbkey" last_selected_value="?"> + %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 class="form-row-input"> + <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 data library browser + </div> + <div style="clear: both"></div> + </div> + %if roles: + <div class="form-row"> + <label>Restrict dataset access to specific roles:</label> + <div class="form-row-input"> + <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> + %endif + %if widgets: + %for i, field in enumerate( widgets ): + <div class="form-row"> + <label>${field[ 'label' ]}</label> + <div class="form-row-input"> + ${field[ 'widget' ].get_html()} + </div> + <div class="toolParamHelp" style="clear: both;"> + ${field[ 'helptext' ]} + </div> + <div style="clear: both"></div> + </div> + %endfor + %endif + <div class="form-row"> + <input type="submit" class="primary-button" name="runtool_btn" value="Upload to library"/> + </div> + </form> + </div> + </div> + %elif upload_option == 'import_from_history': + <div class="toolForm"> + <div class="toolFormTitle">Active datasets in your current history (${history.name})</div> + <div class="toolFormBody"> + %if history and history.active_datasets: + <form name="add_history_datasets_to_library" action="${h.url_for( controller=controller, action='add_history_datasets_to_library', 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 not in [ None, 'None' ]: + <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=controller, 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 + %for hda in history.active_datasets: + <div class="form-row"> + <input name="hda_ids" value="${hda.id}" type="checkbox"/>${hda.hid}: ${hda.name} + </div> + %endfor + <div class="form-row"> + <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/> + </div> + </form> + %else: + <p/> + Your current history is empty + <p/> + %endif + </div> + </div> + %endif +</%def> diff -r 822cae6071c1 -r d42c5698798b templates/library/new_dataset.mako --- a/templates/library/new_dataset.mako Tue Sep 22 11:40:41 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,222 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> -<%namespace file="/admin/library/common.mako" import="render_template_info" /> - -<% 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> - %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/> -<ul class="manage-table-actions"> - <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> - </li> -</ul> - -%if msg: - ${render_msg( msg, messagetype )} -%endif - -<% - roles = trans.app.model.Role.filter( trans.app.model.Role.table.c.deleted==False ).order_by( trans.app.model.Role.table.c.name ).all() - history = trans.get_history() -%> - -%if upload_option in [ 'upload_file', 'upload_directory' ]: - <div class="toolForm" id="new_dataset"> - %if upload_option == 'upload_file': - <div class="toolFormTitle">Upload files</div> - %else: - <div class="toolFormTitle">Upload a directory of files</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"> - 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"> - <% - # Directories of files from the Data 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="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> - %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> - </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> - <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> - %if widgets: - <p/> - %for i, field in enumerate( widgets ): - <div class="form-row"> - <label>${field[ 'label' ]}</label> - ${field[ 'widget' ].get_html()} - <div class="toolParamHelp" style="clear: both;"> - ${field[ 'helptext' ]} - </div> - <div style="clear: both"></div> - </div> - %endfor - %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"> - <div class="toolFormTitle">Active datasets in your current history (${history.name})</div> - <div class="toolFormBody"> - %if history and history.active_datasets: - <form name="add_history_datasets_to_library" action="${h.url_for( controller='library', action='add_history_datasets_to_library', 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_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 - %for hda in history.active_datasets: - <div class="form-row"> - <input name="hda_ids" value="${hda.id}" type="checkbox"/>${hda.hid}: ${hda.name} - </div> - %endfor - <div class="form-row"> - <input type="submit" name="add_history_datasets_to_library_button" value="Import to library"/> - </div> - </form> - %else: - <p/> - Your current history is empty - <p/> - %endif - </div> - </div> -%endif diff -r 822cae6071c1 -r d42c5698798b templates/library/upload.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/library/upload.mako Tue Sep 22 14:04:48 2009 -0400 @@ -0,0 +1,35 @@ +<%inherit file="/base.mako"/> +<%namespace file="/message.mako" import="render_msg" /> +<%namespace file="/admin/library/common.mako" import="render_template_info" /> +<%namespace file="/library/library_dataset_common.mako" import="render_upload_form" /> + +<% import os, os.path %> + +<% + if replace_dataset not in [ None, 'None' ]: + replace_id = replace_dataset.id + else: + replace_id = 'None' +%> + +<b>Create new data 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> + %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/> +<ul class="manage-table-actions"> + <li> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> + </li> +</ul> + +%if msg: + ${render_msg( msg, messagetype )} +%endif + +${render_upload_form( 'library', upload_option, library_id, folder_id, replace_dataset, file_formats, dbkeys, roles, history, )} diff -r 822cae6071c1 -r d42c5698798b templates/tool_form.mako --- a/templates/tool_form.mako Tue Sep 22 11:40:41 2009 -0400 +++ b/templates/tool_form.mako Tue Sep 22 14:04:48 2009 -0400 @@ -71,179 +71,164 @@ </head> <body> - -<%def name="do_inputs( inputs, tool_state, errors, prefix, other_values=None )"> - <% other_values = ExpressionContext( tool_state, other_values ) %> - %for input_index, input in enumerate( inputs.itervalues() ): - %if input.type == "repeat": - <div class="repeat-group"> - <div class="form-title-row"><b>${input.title_plural}</b></div> - <% repeat_state = tool_state[input.name] %> - %for i in range( len( repeat_state ) ): - <div class="repeat-group-item"> + <%def name="do_inputs( inputs, tool_state, errors, prefix, other_values=None )"> + <% other_values = ExpressionContext( tool_state, other_values ) %> + %for input_index, input in enumerate( inputs.itervalues() ): + %if input.type == "repeat": + <div class="repeat-group"> + <div class="form-title-row"><b>${input.title_plural}</b></div> + <% repeat_state = tool_state[input.name] %> + %for i in range( len( repeat_state ) ): + <div class="repeat-group-item"> + <% + if input.name in errors: + rep_errors = errors[input.name][i] + else: + rep_errors = dict() + index = repeat_state[i]['__index__'] + %> + <div class="form-title-row"><b>${input.title} ${i + 1}</b></div> + ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} + <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> + </div> + %endfor + <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> + </div> + %elif input.type == "conditional": <% - if input.name in errors: - rep_errors = errors[input.name][i] - else: - rep_errors = dict() - index = repeat_state[i]['__index__'] + group_state = tool_state[input.name] + group_errors = errors.get( input.name, {} ) + current_case = group_state['__current_case__'] + group_prefix = prefix + input.name + "|" %> - <div class="form-title-row"><b>${input.title} ${i + 1}</b></div> - ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} - <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> - </div> - %endfor - <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> - </div> - %elif input.type == "conditional": + %if input.value_ref_in_group: + ${row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )} + %endif + ${do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )} + %elif input.type == "upload_dataset": + %if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before + <% + if input.name in errors: + rep_errors = errors[input.name][0] + else: + rep_errors = dict() + %> + ${do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )} + %else: + <div class="repeat-group"> + <div class="form-title-row"><b>${input.group_title( other_values )}</b></div> + <% + repeat_state = tool_state[input.name] + %> + %for i in range( len( repeat_state ) ): + <div class="repeat-group-item"> + <% + if input.name in errors: + rep_errors = errors[input.name][i] + else: + rep_errors = dict() + index = repeat_state[i]['__index__'] + %> + <div class="form-title-row"><b>File Contents for ${input.title_by_index( trans, i, other_values )}</b></div> + ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} + ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> + </div> + %endfor + ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> + </div> + %endif + %else: + ${row_for_param( prefix, input, tool_state, errors, other_values )} + %endif + %endfor + </%def> + + <%def name="row_for_param( prefix, param, parent_state, parent_errors, other_values )"> + <% + if parent_errors.has_key( param.name ): + cls = "form-row form-row-error" + else: + cls = "form-row" + %> + <div class="${cls}"> + <% label = param.get_label() %> + %if label: + <label> + ${label}: + </label> + %endif <% - group_state = tool_state[input.name] - group_errors = errors.get( input.name, {} ) - current_case = group_state['__current_case__'] - group_prefix = prefix + input.name + "|" + field = param.get_html_field( trans, parent_state[ param.name ], other_values ) + field.refresh_on_change = param.refresh_on_change %> - %if input.value_ref_in_group: - ${row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )} + <div class="form-row-input">${field.get_html( prefix )}</div> + %if parent_errors.has_key( param.name ): + <div class="form-row-error-message"> + <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${parent_errors[param.name]}</span></div> + </div> %endif - ${do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )} - %elif input.type == "upload_dataset": - %if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before - <% - if input.name in errors: - rep_errors = errors[input.name][0] - else: - rep_errors = dict() - %> - ${do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )} - %else: - <div class="repeat-group"> - <div class="form-title-row"><b>${input.group_title( other_values )}</b></div> - <% - repeat_state = tool_state[input.name] - %> - %for i in range( len( repeat_state ) ): - <div class="repeat-group-item"> - <% - if input.name in errors: - rep_errors = errors[input.name][i] - else: - rep_errors = dict() - index = repeat_state[i]['__index__'] - %> - <div class="form-title-row"><b>File Contents for ${input.title_by_index( trans, i, other_values )}</b></div> - ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} - ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> - </div> - %endfor - ##<div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> - </div> + + %if param.help: + <div class="toolParamHelp" style="clear: both;"> + ${param.help} + </div> %endif + + <div style="clear: both"></div> + + </div> + </%def> + + %if add_frame.from_noframe: + <div class="warningmessage"> + <strong>Welcome to Galaxy</strong> + <hr/> + It appears that you found this tool from a link outside of Galaxy. + If you're not familiar with Galaxy, please consider visiting the + <a href="${h.url_for( controller='root' )}" target="_top">welcome page</a>. + To learn more about what Galaxy is and what it can do for you, please visit + the <a href="$add_frame.wiki_url" target="_top">Galaxy wiki</a>. + </div> + <br/> + %endif + + <div class="toolForm" id="${tool.id}"> + %if tool.has_multiple_pages: + <div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})</div> %else: - ${row_for_param( prefix, input, tool_state, errors, other_values )} + <div class="toolFormTitle">${tool.name}</div> %endif - %endfor -</%def> - -<%def name="row_for_param( prefix, param, parent_state, parent_errors, other_values )"> - <% - if parent_errors.has_key( param.name ): - cls = "form-row form-row-error" - else: - cls = "form-row" - %> - <div class="${cls}"> - <% label = param.get_label() %> - %if label: - <label> - ${label}: - </label> - %endif - <% - field = param.get_html_field( trans, parent_state[ param.name ], other_values ) - field.refresh_on_change = param.refresh_on_change - %> - <div class="form-row-input">${field.get_html( prefix )}</div> - %if parent_errors.has_key( param.name ): - <div class="form-row-error-message"> - <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${parent_errors[param.name]}</span></div> + <div class="toolFormBody"> + <form id="tool_form" name="tool_form" action="${h.url_for( tool.action )}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}"> + <input type="hidden" name="tool_id" value="${tool.id}"> + <input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}"> + %if tool.display_by_page[tool_state.page]: + ${trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )} + <input type="submit" class="primary-button" name="runtool_btn" value="Execute"> + %else: + ${do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )} + <div class="form-row"> + %if tool_state.page == tool.last_page: + <input type="submit" class="primary-button" name="runtool_btn" value="Execute"> + %else: + <input type="submit" class="primary-button" name="runtool_btn" value="Next step"> + %endif + </div> + %endif + </form> </div> - %endif - - %if param.help: - <div class="toolParamHelp" style="clear: both;"> - ${param.help} + </div> + %if tool.help: + <div class="toolHelp"> + <div class="toolHelpBody"> + %if tool.has_multiple_pages: + ${tool.help_by_page[tool_state.page]} + %else: + ${tool.help} + %endif + </div> </div> - %endif - - <div style="clear: both"></div> - - </div> -</%def> - -%if add_frame.from_noframe: - <div class="warningmessage"> - <strong>Welcome to Galaxy</strong> - <hr/> - It appears that you found this tool from a link outside of Galaxy. - If you're not familiar with Galaxy, please consider visiting the - <a href="${h.url_for( controller='root' )}" target="_top">welcome page</a>. - To learn more about what Galaxy is and what it can do for you, please visit - the <a href="$add_frame.wiki_url" target="_top">Galaxy wiki</a>. - </div> - <br/> -%endif - -<div class="toolForm" id="${tool.id}"> - %if tool.has_multiple_pages: - <div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})</div> - %else: - <div class="toolFormTitle">${tool.name}</div> - %endif - <div class="toolFormBody"> - <form id="tool_form" name="tool_form" action="${h.url_for( tool.action )}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}"> - <input type="hidden" name="tool_id" value="${tool.id}"> - <input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}"> - - %if tool.display_by_page[tool_state.page]: - ${trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )} - <input type="submit" class="primary-button" name="runtool_btn" value="Execute"> - - %else: - - <div style="display: none;"> - %if tool_state.page == tool.last_page: - <input type="submit" class="primary-button" name="runtool_btn" value="Execute"> - %else: - <input type="submit" class="primary-button" name="runtool_btn" value="Next step"> - %endif - </div> - ${do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )} - <div class="form-row"> - %if tool_state.page == tool.last_page: - <input type="submit" class="primary-button" name="runtool_btn" value="Execute"> - %else: - <input type="submit" class="primary-button" name="runtool_btn" value="Next step"> - %endif - </div> - - %endif - - </form> - </div> -</div> - -%if tool.help: -<div class="toolHelp"> - <div class="toolHelpBody"> - %if tool.has_multiple_pages: - ${tool.help_by_page[tool_state.page]} - %else: - ${tool.help} - %endif - </div> -</div> -%endif - + %endif </body> <script type="text/javascript"> diff -r 822cae6071c1 -r d42c5698798b test/base/twilltestcase.py --- a/test/base/twilltestcase.py Tue Sep 22 11:40:41 2009 -0400 +++ b/test/base/twilltestcase.py Tue Sep 22 14:04:48 2009 -0400 @@ -1250,7 +1250,7 @@ check_str = "Folder '%s' has been renamed to '%s'" % ( old_name, name ) self.check_page_for_string( check_str ) self.home() - def add_library_dataset( self, filename, library_id, folder_id, folder_name, file_format='auto', + def add_library_dataset( self, filename, library_id, folder_id, folder_name, file_type='auto', dbkey='hg18', roles=[], message='', root=False, template_field_name1='', template_field_contents1='' ): """Add a dataset to a folder""" filename = self.get_filename( filename ) @@ -1259,8 +1259,8 @@ ( self.url, library_id, folder_id, message ) ) self.check_page_for_string( 'Upload files' ) tc.fv( "1", "folder_id", folder_id ) - tc.formfile( "1", "file_data", filename ) - tc.fv( "1", "file_format", file_format ) + tc.formfile( "1", "files_0|file_data", filename ) + tc.fv( "1", "file_type", file_type ) tc.fv( "1", "dbkey", dbkey ) tc.fv( "1", "message", message.replace( '+', ' ' ) ) for role_id in roles: @@ -1268,7 +1268,7 @@ # Add template field contents, if any... if template_field_name1: tc.fv( "1", template_field_name1, template_field_contents1 ) - tc.submit( "new_dataset_button" ) + tc.submit( "runtool_btn" ) if root: check_str = "Added 1 datasets to the library '%s' ( each is selected )." % folder_name else: @@ -1339,7 +1339,7 @@ check_str = 'Edit attributes of %s' % new_ldda_name self.check_page_for_string( check_str ) self.home() - def upload_new_dataset_version( self, filename, library_id, folder_id, folder_name, library_dataset_id, ldda_name, file_format='auto', + def upload_new_dataset_version( self, filename, library_id, folder_id, folder_name, library_dataset_id, ldda_name, file_type='auto', dbkey='hg18', message='', template_field_name1='', template_field_contents1='' ): """Upload new version(s) of a dataset""" self.home() @@ -1349,18 +1349,18 @@ self.check_page_for_string( 'Upload files' ) self.check_page_for_string( 'You are currently selecting a new file to replace' ) self.check_page_for_string( ldda_name ) - tc.formfile( "1", "file_data", filename ) - tc.fv( "1", "file_format", file_format ) + tc.formfile( "1", "files_0|file_data", filename ) + tc.fv( "1", "file_type", file_type ) tc.fv( "1", "dbkey", dbkey ) tc.fv( "1", "message", message.replace( '+', ' ' ) ) # Add template field contents, if any... if template_field_name1: tc.fv( "1", template_field_name1, template_field_contents1 ) - tc.submit( "new_dataset_button" ) + tc.submit( "runtool_btn" ) check_str = "Added 1 dataset versions to the library dataset '%s' in the folder '%s'." % ( ldda_name, folder_name ) self.check_page_for_string( check_str ) self.home() - def upload_new_dataset_versions( self, library_id, folder_id, folder_name, library_dataset_id, ldda_name, file_format='auto', + def upload_new_dataset_versions( self, library_id, folder_id, folder_name, library_dataset_id, ldda_name, file_type='auto', dbkey='hg18', message='', template_field_name1='', template_field_contents1='' ): """Upload new version(s) of a dataset using a directory of files""" self.home() @@ -1368,14 +1368,14 @@ % ( self.url, library_id, folder_id, library_dataset_id ) ) self.check_page_for_string( 'Upload a directory of files' ) self.check_page_for_string( 'You are currently selecting a new file to replace' ) - tc.fv( "1", "file_format", file_format ) + tc.fv( "1", "file_type", file_type ) tc.fv( "1", "dbkey", dbkey ) tc.fv( "1", "message", message.replace( '+', ' ' ) ) tc.fv( "1", "server_dir", "library" ) # Add template field contents, if any... if template_field_name1: tc.fv( "1", template_field_name1, template_field_contents1 ) - tc.submit( "new_dataset_button" ) + tc.submit( "runtool_btn" ) check_str = "Added 3 dataset versions to the library dataset '%s' in the folder '%s'." % ( ldda_name, folder_name ) self.check_page_for_string( check_str ) self.home() @@ -1390,7 +1390,7 @@ 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_dir_of_files_from_admin_view( self, library_id, folder_id, file_format='auto', dbkey='hg18', roles_tuple=[], + def add_dir_of_files_from_admin_view( self, library_id, folder_id, file_type='auto', dbkey='hg18', roles_tuple=[], message='', check_str_after_submit='', template_field_name1='', template_field_contents1='' ): """Add a directory of datasets to a folder""" # roles is a list of tuples: [ ( role_id, role_description ) ] @@ -1398,7 +1398,7 @@ self.visit_url( "%s/library_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' ) tc.fv( "1", "folder_id", folder_id ) - tc.fv( "1", "file_format", file_format ) + tc.fv( "1", "file_type", file_type ) tc.fv( "1", "dbkey", dbkey ) tc.fv( "1", "message", message.replace( '+', ' ' ) ) tc.fv( "1", "server_dir", "library" ) @@ -1407,19 +1407,20 @@ # Add template field contents, if any... if template_field_name1: tc.fv( "1", template_field_name1, template_field_contents1 ) - tc.submit( "new_dataset_button" ) + tc.submit( "runtool_btn" ) 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=[], + def add_dir_of_files_from_libraries_view( self, library_id, folder_id, selected_dir, file_type='auto', dbkey='hg18', roles_tuple=[], message='', check_str_after_submit='', template_field_name1='', template_field_contents1='' ): """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.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' ) tc.fv( "1", "folder_id", folder_id ) - tc.fv( "1", "file_format", file_format ) + tc.fv( "1", "file_type", file_type ) tc.fv( "1", "dbkey", dbkey ) tc.fv( "1", "message", message.replace( '+', ' ' ) ) tc.fv( "1", "server_dir", selected_dir ) @@ -1428,7 +1429,7 @@ # Add template field contents, if any... if template_field_name1: tc.fv( "1", template_field_name1, template_field_contents1 ) - tc.submit( "new_dataset_button" ) + tc.submit( "runtool_btn" ) if check_str_after_submit: self.check_page_for_string( check_str_after_submit ) self.home() diff -r 822cae6071c1 -r d42c5698798b test/functional/test_security_and_libraries.py --- a/test/functional/test_security_and_libraries.py Tue Sep 22 11:40:41 2009 -0400 +++ b/test/functional/test_security_and_libraries.py Tue Sep 22 14:04:48 2009 -0400 @@ -543,7 +543,7 @@ str( library_one.id ), str( library_one.root_folder.id ), library_one.root_folder.name, - file_format='bed', + file_type='bed', dbkey='hg18', message=message.replace( ' ', '+' ), root=True, @@ -690,7 +690,7 @@ str( library_one.id ), str( folder_two.id ), folder_two.name, - file_format='bed', + file_type='bed', dbkey='hg18', message=message.replace( ' ', '+' ), root=False, @@ -721,7 +721,7 @@ str( library_one.id ), str( folder_two.id ), folder_two.name, - file_format='bed', + file_type='bed', dbkey='hg18', message=message.replace( ' ', '+' ), root=False, @@ -763,7 +763,7 @@ str( library_one.id ), str( folder_one.id ), folder_one.name, - file_format='bed', + file_type='bed', dbkey='hg18', roles=[ str( regular_user1_private_role.id ) ], message=message.replace( ' ', '+' ), @@ -870,7 +870,7 @@ str( library_one.id ), str( folder_one.id ), folder_one.name, - file_format='bed', + file_type='bed', dbkey='hg17', roles=[ str( role_two.id ) ], message=message.replace( ' ', '+' ), @@ -1029,7 +1029,7 @@ str( subfolder_one.name ), str( ldda_six.library_dataset.id ), ldda_six.name, - file_format='auto', + file_type='auto', dbkey='hg18', message=message.replace( ' ', '+' ), template_field_name1=form_one_field_name, @@ -1093,7 +1093,7 @@ str( subfolder_one.name ), str( ldda_six_version_two.library_dataset.id ), ldda_six_version_two.name, - file_format='auto', + file_type='auto', dbkey='hg18', message=message.replace( ' ', '+' ), template_field_name1=form_one_field_name, @@ -1549,7 +1549,43 @@ 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_260_reset_data_for_later_test_runs( self ): + def test_260_no_library_template( self ): + """Test library features when library has no template""" + name = "Library Two" + description = "This is Library Two" + # Create a library, adding no template + self.create_library( name=name, description=description ) + self.visit_page( 'library_admin/browse_libraries' ) + self.check_page_for_string( name ) + self.check_page_for_string( description ) + library_two = galaxy.model.Library.filter( and_( galaxy.model.Library.table.c.name==name, + galaxy.model.Library.table.c.description==description, + galaxy.model.Library.table.c.deleted==False ) ).first() + assert library_two is not None, 'Problem retrieving library named "%s" from the database' % name + # Add a dataset to the library + self.add_library_dataset( '7.bed', + str( library_two.id ), + str( library_two.root_folder.id ), + library_two.root_folder.name, + file_type='bed', + dbkey='hg18', + message='', + root=True ) + ldda_seven = galaxy.model.LibraryDatasetDatasetAssociation.query() \ + .order_by( desc( galaxy.model.LibraryDatasetDatasetAssociation.table.c.create_time ) ).first() + assert ldda_seven is not None, 'Problem retrieving LibraryDatasetDatasetAssociation ldda_seven from the database' + self.home() + self.visit_url( '%s/library_admin/browse_library?id=%s' % ( self.url, str( library_two.id ) ) ) + self.check_page_for_string( "7.bed" ) + self.check_page_for_string( admin_user.email ) + # TODO: add a functional test to cover adding a library dataset via url_paste here... + # TODO: Add a functional test to cover checking the space_to_tab checkbox here... + # Delete and purge the library + self.home() + self.delete_library_item( str( library_two.id ), str( library_two.id ), library_two.name, library_item_type='library' ) + self.purge_library( str( library_two.id ), library_two.name ) + self.home() + def test_265_reset_data_for_later_test_runs( self ): """Reseting data to enable later test runs to pass""" ################## # Eliminate all non-private roles diff -r 822cae6071c1 -r d42c5698798b tool-data/shared/genetrack/genetrack_sites.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/shared/genetrack/genetrack_sites.txt Tue Sep 22 14:04:48 2009 -0400 @@ -0,0 +1,3 @@ +# GeneTrack sites +main
http://www.genetrack.org/
+test
http://www.test.genetrack.org/
diff -r 822cae6071c1 -r d42c5698798b universe_wsgi.ini.sample --- a/universe_wsgi.ini.sample Tue Sep 22 11:40:41 2009 -0400 +++ b/universe_wsgi.ini.sample Tue Sep 22 14:04:48 2009 -0400 @@ -81,9 +81,10 @@ # Use the new iframe / javascript based layout use_new_layout = true -# Comma separated list of UCSC / gbrowse browsers to use for viewing +# Comma separated list of UCSC / gbrowse / GeneTrack browsers to use for viewing ucsc_display_sites = main,test,archaea gbrowse_display_sites = main,test +genetrack_display_sites = main,test # Serving static files (needed if running standalone) static_enabled = True
1
0
0
0
[hg] galaxy 2744: prepare for new trackster
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/97381671a8e7
changeset: 2744:97381671a8e7 user: Kanwei Li <kanwei(a)gmail.com> date: Mon Sep 21 20:13:20 2009 -0400 description: prepare for new trackster 5 file(s) affected in this change: .hgignore lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py lib/galaxy/datatypes/data.py lib/galaxy/datatypes/registry.py lib/galaxy/web/controllers/tracks.py diffs (115 lines): diff -r ce15d5e5b6ad -r 97381671a8e7 .hgignore --- a/.hgignore Mon Sep 21 17:02:26 2009 -0400 +++ b/.hgignore Mon Sep 21 20:13:20 2009 -0400 @@ -27,3 +27,6 @@ # Project files *.kpf + +# Chrom len files +*.len diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py --- a/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/converters/wiggle_to_array_tree_converter.py Mon Sep 21 20:13:20 2009 -0400 @@ -3,7 +3,7 @@ from __future__ import division import sys - +from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) from bx.arrays.array_tree import * from bx.arrays.wiggle import IntervalReader diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/data.py Mon Sep 21 20:13:20 2009 -0400 @@ -223,7 +223,7 @@ """Returns available converters by type for this dataset""" return datatypes_registry.get_converters_by_datatype(original_dataset.ext) def find_conversion_destination( self, dataset, accepted_formats, datatypes_registry, **kwd ): - """Returns ( target_ext, exisiting converted dataset )""" + """Returns ( target_ext, existing converted dataset )""" return datatypes_registry.find_conversion_destination_for_dataset_by_extensions( dataset, accepted_formats, **kwd ) def convert_dataset(self, trans, original_dataset, target_type, return_output = False, visible = True ): """This function adds a job to the queue to convert a dataset to another type. Returns a message about success/failure.""" diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/datatypes/registry.py Mon Sep 21 20:13:20 2009 -0400 @@ -211,7 +211,7 @@ except KeyError: #datatype was never declared mimetype = 'application/octet-stream' - self.log.warning('unkown mimetype in data factory %s' % ext) + self.log.warning('unknown mimetype in data factory %s' % ext) return mimetype def get_datatype_by_extension(self, ext ): @@ -265,10 +265,10 @@ tool_xml_text = """ <tool id="__SET_METADATA__" name="Set External Metadata" version="1.0.0" tool_type="set_metadata"> <type class="SetMetadataTool" module="galaxy.tools"/> - <action module="galaxy.tools.actions.metadata" class="SetMetadataToolAction"/> - <command>$__SET_EXTERNAL_METADATA_COMMAND_LINE__</command> + <action module="galaxy.tools.actions.metadata" class="SetMetadataToolAction"/> + <command>$__SET_EXTERNAL_METADATA_COMMAND_LINE__</command> <inputs> - <param format="data" name="input1" type="data" label="File to set metadata on."/> + <param format="data" name="input1" type="data" label="File to set metadata on."/> <param name="__ORIGINAL_DATASET_STATE__" type="hidden" value=""/> <param name="__SET_EXTERNAL_METADATA_COMMAND_LINE__" type="hidden" value=""/> </inputs> @@ -326,7 +326,7 @@ return None def find_conversion_destination_for_dataset_by_extensions( self, dataset, accepted_formats, converter_safe = True ): - """Returns ( target_ext, exisiting converted dataset )""" + """Returns ( target_ext, existing converted dataset )""" for convert_ext in self.get_converters_by_datatype( dataset.ext ): if isinstance( self.get_datatype_by_extension( convert_ext ), accepted_formats ): datasets = dataset.get_converted_files_by_type( convert_ext ) @@ -347,12 +347,12 @@ rval = {} for ext, d_type in self.datatypes_by_extension.iteritems(): inputs = [] - for meta_name, meta_spec in d_type.metadata_spec.iteritems(): - if meta_spec.set_in_upload: + for meta_name, meta_spec in d_type.metadata_spec.iteritems(): + if meta_spec.set_in_upload: help_txt = meta_spec.desc if not help_txt or help_txt == meta_name: help_txt = "" - inputs.append( '<param type="text" name="%s" label="Set metadata value for "%s"" value="%s" help="%s"/>' % ( meta_name, meta_name, meta_spec.default, help_txt ) ) + inputs.append( '<param type="text" name="%s" label="Set metadata value for "%s"" value="%s" help="%s"/>' % ( meta_name, meta_name, meta_spec.default, help_txt ) ) rval[ ext ] = "\n".join( inputs ) if 'auto' not in rval and 'txt' in rval: #need to manually add 'auto' datatype rval[ 'auto' ] = rval[ 'txt' ] diff -r ce15d5e5b6ad -r 97381671a8e7 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py Mon Sep 21 17:02:26 2009 -0400 +++ b/lib/galaxy/web/controllers/tracks.py Mon Sep 21 20:13:20 2009 -0400 @@ -33,7 +33,7 @@ ) # Dataset type required for each track type. This needs to be more flexible, -# there might be mutliple types of indexes that suffice for a given track type. +# there might be multiple types of indexes that suffice for a given track type. track_type_to_dataset_type = { "line": "array_tree" } @@ -158,7 +158,7 @@ converted_dataset_type = track_type_to_dataset_type[track_type] converted_dataset = self.__dataset_as_type( trans, dataset, converted_dataset_type ) # If at this point we still don't have an `array_tree_dataset`, there - # is now way we can display this data as an array tree + # is no way we can display this data as an array tree if converted_dataset is None: return messages.NO_DATA # Need to check states again for the converted version @@ -186,7 +186,7 @@ return dataset # See if we can convert the dataset if type not in dataset.get_converter_types(): - log.debug( "Conversion from '%s' to '%d' not possible", dataset.extension, type ) + log.debug( "Conversion from '%s' to '%s' not possible", dataset.extension, type ) return None # See if converted dataset already exists converted_datasets = dataset.get_converted_files_by_type( type )
1
0
0
0
[hg] galaxy 2745: Second pass of help and interface updates. Not...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/e9104d403af7
changeset: 2745:e9104d403af7 user: Anton Nekrutenko <anton(a)bx.psu.edu> date: Tue Sep 22 08:59:36 2009 -0400 description: Second pass of help and interface updates. Not done yet... 19 file(s) affected in this change: static/images/solid_qual.png tool_conf.xml.sample tools/fastx_toolkit/fastq_quality_boxplot.xml tools/fastx_toolkit/fastq_quality_converter.xml tools/fastx_toolkit/fastq_quality_filter.xml tools/fastx_toolkit/fastq_to_fasta.xml tools/fastx_toolkit/fastx_artifacts_filter.xml tools/fastx_toolkit/fastx_nucleotides_distribution.xml tools/fastx_toolkit/fastx_quality_statistics.xml tools/fastx_toolkit/fastx_renamer.xml tools/fastx_toolkit/fastx_reverse_complement.xml tools/fastx_toolkit/fastx_trimmer.xml tools/metag_tools/short_reads_figure_score.xml tools/metag_tools/short_reads_trim_seq.xml tools/metag_tools/split_paired_reads.xml tools/solid_tools/solid_qual_boxplot.xml tools/solid_tools/solid_qual_stats.xml tools/sr_mapping/bowtie_wrapper.xml tools/sr_mapping/bwa_wrapper.xml diffs (499 lines): diff -r 97381671a8e7 -r e9104d403af7 static/images/solid_qual.png Binary file static/images/solid_qual.png has changed diff -r 97381671a8e7 -r e9104d403af7 tool_conf.xml.sample --- a/tool_conf.xml.sample Mon Sep 21 20:13:20 2009 -0400 +++ b/tool_conf.xml.sample Tue Sep 22 08:59:36 2009 -0400 @@ -70,8 +70,10 @@ <tool file="maf/maf_to_interval.xml" /> <tool file="maf/maf_to_fasta.xml" /> <tool file="fasta_tools/tabular_to_fasta.xml" /> + <tool file="fastx_toolkit/fastq_to_fasta.xml" /> <tool file="next_gen_conversion/solid_to_fastq.xml" /> <tool file="next_gen_conversion/fastq_conversions.xml" /> + <tool file="fastx_toolkit/fastq_quality_converter.xml" /> </section> <section name="Extract Features" id="features"> <tool file="filters/ucsc_gene_bed_to_exon_bed.xml" /> @@ -175,8 +177,6 @@ <tool file="fastx_toolkit/fastq_quality_boxplot.xml" /> <tool file="fastx_toolkit/fastx_nucleotides_distribution.xml" /> <!-- <tool file="fastx_toolkit/fasta_clipping_histogram.xml" /> --> - <tool file="fastx_toolkit/fastq_to_fasta.xml" /> - <tool file="fastx_toolkit/fastq_quality_converter.xml" /> <!-- <tool file="fastx_toolkit/fastx_clipper.xml" /> --> <tool file="fastx_toolkit/fastx_trimmer.xml" /> <tool file="fastx_toolkit/fastx_renamer.xml" /> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastq_quality_boxplot.xml --- a/tools/fastx_toolkit/fastq_quality_boxplot.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastq_quality_boxplot.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,10 +1,10 @@ -<tool id="cshl_fastq_quality_boxplot" name="Quality Score"> - <description>chart</description> +<tool id="cshl_fastq_quality_boxplot" name="Draw quality score boxplot"> + <description></description> <command>fastq_quality_boxplot_graph.sh -t '$input.name' -i $input -o $output</command> <inputs> - <param format="txt" name="input" type="data" label="Statistics report file (output of 'FASTQ Statistics' tool)" /> + <param format="txt" name="input" type="data" label="Statistics report file" help="output of 'FASTQ Statistics' tool" /> </inputs> <outputs> @@ -42,6 +42,14 @@ .. image:: ../static/fastx_icons/fastq_quality_boxplot_3.png +------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
+ + + </help> </tool> <!-- FASTQ-Quality-Boxplot is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastq_quality_converter.xml --- a/tools/fastx_toolkit/fastq_quality_converter.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastq_quality_converter.xml Tue Sep 22 08:59:36 2009 -0400 @@ -85,7 +85,12 @@ +CSHL__2_FC042AGWWWXX:8:1:103:1185 hhhhhca_hhh`^Vh@IVQNHdObVLWCJ@HBDY^B +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
+ </help> </tool> <!-- FASTQ-Quality-Converter is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastq_quality_filter.xml --- a/tools/fastx_toolkit/fastq_quality_filter.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastq_quality_filter.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="cshl_fastq_quality_filter" name="Quality Filter"> +<tool id="cshl_fastq_quality_filter" name="Filter by quality"> <description></description> <command>zcat -f '$input' | fastq_quality_filter -q $quality -p $percent -v -o $output</command> @@ -67,7 +67,11 @@ Using **percent = 100** and **cut-off = 20** - This read will be discarded (not all cycles have quality equal to / higher than 20). - +------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> <!-- FASTQ-Quality-Filter is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastq_to_fasta.xml --- a/tools/fastx_toolkit/fastq_to_fasta.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastq_to_fasta.xml Tue Sep 22 08:59:36 2009 -0400 @@ -65,6 +65,11 @@ >1 GGTCAATGATGAGTTGGCACTGTAGGCACCATCAAT +------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> <!-- FASTQ-to-FASTA is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_artifacts_filter.xml --- a/tools/fastx_toolkit/fastx_artifacts_filter.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_artifacts_filter.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,9 +1,9 @@ -<tool id="cshl_fastx_artifacts_filter" name="Artifacts Filter"> +<tool id="cshl_fastx_artifacts_filter" name="Remove sequencing artifacts"> <description></description> <command>zcat -f '$input' | fastx_artifacts_filter -v -o "$output"</command> <inputs> - <param format="fasta,fastqsolexa" name="input" type="data" label="Library to filter" /> + <param format="fasta,fastqsanger" name="input" type="data" label="Library to filter" /> </inputs> @@ -74,7 +74,12 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAA + +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> <!-- FASTX-Artifacts-filter is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_nucleotides_distribution.xml --- a/tools/fastx_toolkit/fastx_nucleotides_distribution.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_nucleotides_distribution.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,9 +1,9 @@ -<tool id="cshl_fastx_nucleotides_distribution" name="Nucleotides Distribution"> - <description>chart</description> +<tool id="cshl_fastx_nucleotides_distribution" name="Draw nucleotides distribution chart"> + <description></description> <command>fastx_nucleotide_distribution_graph.sh -t '$input.name' -i $input -o $output</command> <inputs> - <param format="txt" name="input" type="data" label="Statistics Text File (output of 'FASTX Statistics' tool)" /> + <param format="txt" name="input" type="data" label="Statistics Text File" help="output of 'FASTX Statistics' tool" /> </inputs> <outputs> @@ -23,44 +23,28 @@ **Output Examples** - - The following chart clearly shows the barcode used at the 5'-end of the library: **GATCT** .. image:: ./static/fastx_icons/fastq_nucleotides_distribution_1.png - - - - - - In the following chart, one can almost 'read' the most abundant sequence by looking at the dominant values: **TGATA TCGTA TTGAT GACTG AA...** .. image:: ./static/fastx_icons/fastq_nucleotides_distribution_2.png - - - - - - - The following chart shows a growing number of unknown (N) nucleotides towards later cycles (which might indicate a sequencing problem): .. image:: ./static/fastx_icons/fastq_nucleotides_distribution_3.png - - - - - - - But most of the time, the chart will look rather random: .. image:: ./static/fastx_icons/fastq_nucleotides_distribution_4.png +------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
+ </help> </tool> <!-- FASTQ-Nucleotides-Distribution is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_quality_statistics.xml --- a/tools/fastx_toolkit/fastx_quality_statistics.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_quality_statistics.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="cshl_fastx_quality_statistics" name="Quality Statistics"> +<tool id="cshl_fastx_quality_statistics" name="Compute quality statistics"> <description></description> <command>zcat -f $input | fastx_quality_stats -o $output -Q $offset</command> @@ -55,51 +55,20 @@ * N_Count = Count of 'N' nucleotides found in this column. +For example:: + 1 6362991 -4 40 250734117 39.41 40 40 40 0 40 40 1396976 1329101 678730 2958184 0 + 2 6362991 -5 40 250531036 39.37 40 40 40 0 40 40 1786786 1055766 1738025 1782414 0 + 3 6362991 -5 40 248722469 39.09 40 40 40 0 40 40 2296384 984875 1443989 1637743 0 + 4 6362991 -4 40 248214827 39.01 40 40 40 0 40 40 2536861 1167423 1248968 1409739 0 + 36 6362991 -5 40 117158566 18.41 7 15 30 23 -5 40 4074444 1402980 63287 822035 245 + +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. - -**Output Example**:: - - column count min max sum mean Q1 med Q3 IQR lW rW A_Count C_Count G_Count T_Count N_Count - 1 6362991 -4 40 250734117 39.41 40 40 40 0 40 40 1396976 1329101 678730 2958184 0 - 2 6362991 -5 40 250531036 39.37 40 40 40 0 40 40 1786786 1055766 1738025 1782414 0 - 3 6362991 -5 40 248722469 39.09 40 40 40 0 40 40 2296384 984875 1443989 1637743 0 - 4 6362991 -5 40 247654797 38.92 40 40 40 0 40 40 1683197 1410855 1722633 1546306 0 - 5 6362991 -4 40 248214827 39.01 40 40 40 0 40 40 2536861 1167423 1248968 1409739 0 - 6 6362991 -5 40 248499903 39.05 40 40 40 0 40 40 1598956 1236081 1568608 1959346 0 - 7 6362991 -4 40 247719760 38.93 40 40 40 0 40 40 1692667 1822140 1496741 1351443 0 - 8 6362991 -5 40 245745205 38.62 40 40 40 0 40 40 2230936 1343260 1529928 1258867 0 - 9 6362991 -5 40 245766735 38.62 40 40 40 0 40 40 1702064 1306257 1336511 2018159 0 - 10 6362991 -5 40 245089706 38.52 40 40 40 0 40 40 1519917 1446370 1450995 1945709 0 - 11 6362991 -5 40 242641359 38.13 40 40 40 0 40 40 1717434 1282975 1387804 1974778 0 - 12 6362991 -5 40 242026113 38.04 40 40 40 0 40 40 1662872 1202041 1519721 1978357 0 - 13 6362991 -5 40 238704245 37.51 40 40 40 0 40 40 1549965 1271411 1973291 1566681 1643 - 14 6362991 -5 40 235622401 37.03 40 40 40 0 40 40 2101301 1141451 1603990 1515774 475 - 15 6362991 -5 40 230766669 36.27 40 40 40 0 40 40 2344003 1058571 1440466 1519865 86 - 16 6362991 -5 40 224466237 35.28 38 40 40 2 35 40 2203515 1026017 1474060 1651582 7817 - 17 6362991 -5 40 219990002 34.57 34 40 40 6 25 40 1522515 1125455 2159183 1555765 73 - 18 6362991 -5 40 214104778 33.65 30 40 40 10 15 40 1479795 2068113 1558400 1249337 7346 - 19 6362991 -5 40 212934712 33.46 30 40 40 10 15 40 1432749 1231352 1769799 1920093 8998 - 20 6362991 -5 40 212787944 33.44 29 40 40 11 13 40 1311657 1411663 2126316 1513282 73 - 21 6362991 -5 40 211369187 33.22 28 40 40 12 10 40 1887985 1846300 1300326 1318380 10000 - 22 6362991 -5 40 213371720 33.53 30 40 40 10 15 40 542299 3446249 516615 1848190 9638 - 23 6362991 -5 40 221975899 34.89 36 40 40 4 30 40 347679 1233267 926621 3855355 69 - 24 6362991 -5 40 194378421 30.55 21 40 40 19 -5 40 433560 674358 3262764 1992242 67 - 25 6362991 -5 40 199773985 31.40 23 40 40 17 -2 40 944760 325595 1322800 3769641 195 - 26 6362991 -5 40 179404759 28.20 17 34 40 23 -5 40 3457922 156013 1494664 1254293 99 - 27 6362991 -5 40 163386668 25.68 13 28 40 27 -5 40 1392177 281250 3867895 821491 178 - 28 6362991 -5 40 156230534 24.55 12 25 40 28 -5 40 907189 981249 4174945 299437 171 - 29 6362991 -5 40 163236046 25.65 13 28 40 27 -5 40 1097171 3418678 1567013 280008 121 - 30 6362991 -5 40 151309826 23.78 12 23 40 28 -5 40 3514775 2036194 566277 245613 132 - 31 6362991 -5 40 141392520 22.22 10 21 40 30 -5 40 1569000 4571357 124732 97721 181 - 32 6362991 -5 40 143436943 22.54 10 21 40 30 -5 40 1453607 4519441 38176 351107 660 - 33 6362991 -5 40 114269843 17.96 6 14 30 24 -5 40 3311001 2161254 155505 734297 934 - 34 6362991 -5 40 140638447 22.10 10 20 40 30 -5 40 1501615 1637357 18113 3205237 669 - 35 6362991 -5 40 138910532 21.83 10 20 40 30 -5 40 1532519 3495057 23229 1311834 352 - 36 6362991 -5 40 117158566 18.41 7 15 30 23 -5 40 4074444 1402980 63287 822035 245 - + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> -</tool> + </tool> <!-- FASTQ-Statistics is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_renamer.xml --- a/tools/fastx_toolkit/fastx_renamer.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_renamer.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ -<tool id="cshl_fastx_renamer" name="Rename" version="0.0.11" > - <description>sequence identifiers</description> +<tool id="cshl_fastx_renamer" name="Rename sequences" version="0.0.11" > + <description></description> <command>zcat -f $input | fastx_renamer -n $TYPE -o $output -v </command> <inputs> @@ -50,7 +50,11 @@ +1 40 40 40 40 40 40 40 40 40 40 38 40 40 40 40 40 14 40 40 40 40 40 36 40 13 14 24 24 9 24 9 40 10 10 15 40 - +------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> <!-- FASTQ-to-FASTA is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_reverse_complement.xml --- a/tools/fastx_toolkit/fastx_reverse_complement.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_reverse_complement.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ <tool id="cshl_fastx_reverse_complement" name="Reverse-Complement"> - <description>sequences</description> + <description></description> <command>zcat -f '$input' | fastx_reverse_complement -v -o $output</command> <inputs> <param format="fasta,fastqsolexa" name="input" type="data" label="Library to reverse-complement" /> @@ -47,6 +47,11 @@ TACCNNCTTTGAATTACAAGGANGAGGCTACAGACA +CSHL_1_FC42AGWWWXX:8:1:3:740 26 27 17 15 5 5 24 26 29 31 32 33 27 21 27 33 33 33 33 33 33 27 5 27 33 33 33 33 33 33 33 33 34 33 33 33 +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
+ </help> </tool> diff -r 97381671a8e7 -r e9104d403af7 tools/fastx_toolkit/fastx_trimmer.xml --- a/tools/fastx_toolkit/fastx_trimmer.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/fastx_toolkit/fastx_trimmer.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,9 +1,9 @@ -<tool id="cshl_fastx_trimmer" name="Trim"> - <description>sequences</description> +<tool id="cshl_fastx_trimmer" name="Trim sequences"> + <description></description> <command>zcat -f '$input' | fastx_trimmer -v -f $first -l $last -o $output</command> <inputs> - <param format="fasta,fastqsolexa" name="input" type="data" label="Library to clip" /> + <param format="fasta,fastasanger" name="input" type="data" label="Library to clip" /> <param name="first" size="4" type="integer" value="1"> <label>First base to keep</label> @@ -65,6 +65,12 @@ >2-1 AGGCT + ------ + +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
+ </help> </tool> <!-- FASTX-Trimmer is part of the FASTX-toolkit, by A.Gordon (gordon(a)cshl.edu) --> diff -r 97381671a8e7 -r e9104d403af7 tools/metag_tools/short_reads_figure_score.xml --- a/tools/metag_tools/short_reads_figure_score.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/metag_tools/short_reads_figure_score.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ -<tool id="quality_score_distribution" name="Build distribution of base quality"> -<description>values</description> +<tool id="quality_score_distribution" name="Build base quality distribution"> +<description></description> <command interpreter="python">short_reads_figure_score.py $input1 $output1 </command> diff -r 97381671a8e7 -r e9104d403af7 tools/metag_tools/short_reads_trim_seq.xml --- a/tools/metag_tools/short_reads_trim_seq.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/metag_tools/short_reads_trim_seq.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ <tool id="trim_reads" name="Select high quality segments" version="1.0.0"> -<description>from short reads</description> +<description></description> <command interpreter="python"> short_reads_trim_seq.py $trim $length $output1 $input1 $input2 $sequencing_method_choice.input3 diff -r 97381671a8e7 -r e9104d403af7 tools/metag_tools/split_paired_reads.xml --- a/tools/metag_tools/split_paired_reads.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/metag_tools/split_paired_reads.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ -<tool id="split_paired_reads" name="Split" version="1.0.0"> - <description>paired-end reads into two ends</description> +<tool id="split_paired_reads" name="Split paired end reads" version="1.0.0"> + <description></description> <command interpreter="python"> split_paired_reads.py $input $output1 $output2 </command> diff -r 97381671a8e7 -r e9104d403af7 tools/solid_tools/solid_qual_boxplot.xml --- a/tools/solid_tools/solid_qual_boxplot.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/solid_tools/solid_qual_boxplot.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="solid_qual_boxplot" name="Quality Boxplot" version="1.0.0"> +<tool id="solid_qual_boxplot" name="Draw quality score boxplot" version="1.0.0"> <description>for SOLiD data</description> <command interpreter="bash">qualsolid_boxplot_graph.sh -t '$input.name' -i $input -o $output</command> @@ -31,6 +31,10 @@ .. image:: ../static/images/solid_qual.png +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> diff -r 97381671a8e7 -r e9104d403af7 tools/solid_tools/solid_qual_stats.xml --- a/tools/solid_tools/solid_qual_stats.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/solid_tools/solid_qual_stats.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,4 +1,4 @@ -<tool id="solid_qual_stats" name="Quality Statistics" version="1.0.0"> +<tool id="solid_qual_stats" name="Compute quality statistics" version="1.0.0"> <description>for SOLiD data</description> <command interpreter="python">solid_qual_stats.py $input $output1</command> @@ -60,6 +60,10 @@ 34 6362991 2 29 140638447 12.10 3 10 25 22 2 29 35 6362991 2 29 138910532 11.83 3 10 25 22 2 29 +------ +This tool is based on `FASTX-toolkit`__ by Assaf Gordon. + + .. __:
http://hannonlab.cshl.edu/fastx_toolkit/
</help> </tool> diff -r 97381671a8e7 -r e9104d403af7 tools/sr_mapping/bowtie_wrapper.xml --- a/tools/sr_mapping/bowtie_wrapper.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/sr_mapping/bowtie_wrapper.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ -<tool id="bowtie_wrapper" name="Bowtie" version="1.0.0"> - <description> fast alignment of reads against reference sequence </description> +<tool id="bowtie_wrapper" name="Map with Bowtie" version="1.0.0"> + <description></description> <command interpreter="python"> bowtie_wrapper.py --threads="8" @@ -148,7 +148,7 @@ <option value="history">Use one from the history</option> </param> <when value="indexed"> - <param name="indices" type="select" label="Select a reference genome"> + <param name="indices" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team"> <options from_file="bowtie_indices.loc"> <column name="value" index="1" /> <column name="name" index="0" /> @@ -215,7 +215,7 @@ <option value="paired">Paired-end</option> </param> <when value="single"> - <param name="input1" type="data" format="fastqsanger" label="FASTQ file" /> + <param name="input1" type="data" format="fastqsanger" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> <conditional name="params"> <param name="settings_type" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list"> <option value="pre_set">Commonly used</option> @@ -272,8 +272,8 @@ </conditional> <!-- params --> </when> <!-- single --> <when value="paired"> - <param name="input1" type="data" format="fastqsanger" label="Forward FASTQ file" /> - <param name="input2" type="data" format="fastqsanger" label="Reverse FASTQ file" /> + <param name="input1" type="data" format="fastqsanger" label="Forward FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> + <param name="input2" type="data" format="fastqsanger" label="Reverse FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> <conditional name="params"> <param name="settings_type" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list"> <option value="pre_set">Commonly used</option> diff -r 97381671a8e7 -r e9104d403af7 tools/sr_mapping/bwa_wrapper.xml --- a/tools/sr_mapping/bwa_wrapper.xml Mon Sep 21 20:13:20 2009 -0400 +++ b/tools/sr_mapping/bwa_wrapper.xml Tue Sep 22 08:59:36 2009 -0400 @@ -1,5 +1,5 @@ -<tool id="bwa_wrapper" name="BWA" version="1.0.1"> - <description> fast mapping of reads against reference sequence</description> +<tool id="bwa_wrapper" name="Map with BWA" version="1.0.1"> + <description></description> <command interpreter="python"> bwa_wrapper.py --threads="8" @@ -76,7 +76,7 @@ <option value="history">Use one from the history</option> </param> <when value="indexed"> - <param name="indices" type="select" label="Select a reference genome"> + <param name="indices" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team"> <options from_file="sequence_index_color.loc"> <column name="value" index="1" /> <column name="name" index="0" /> @@ -116,11 +116,11 @@ <option value="paired">Paired-end</option> </param> <when value="single"> - <param name="input1" type="data" format="fastqsanger" label="FASTQ file" /> + <param name="input1" type="data" format="fastqsanger" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> </when> <when value="paired"> - <param name="input1" type="data" format="fastqsanger" label="Forward FASTQ file" /> - <param name="input2" type="data" format="fastqsanger" label="Reverse FASTQ file" /> + <param name="input1" type="data" format="fastqsanger" label="Forward FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> + <param name="input2" type="data" format="fastqsanger" label="Reverse FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/> </when> </conditional> <conditional name="params">
1
0
0
0
[hg] galaxy 2746: Modified Concatenate queries tool to have two ...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/1cf9480dd090
changeset: 2746:1cf9480dd090 user: Kelly Vincent <kpvincent(a)bx.psu.edu> date: Tue Sep 22 10:09:23 2009 -0400 description: Modified Concatenate queries tool to have two base files to concatenate and the option to add a third or more. Also removed to unnecessary sort1 test files. 5 file(s) affected in this change: test-data/cat_wrapper_out1.bed test-data/sort1_alpha.bed test-data/sort1_num.bed tools/filters/catWrapper.py tools/filters/catWrapper.xml diffs (226 lines): diff -r e9104d403af7 -r 1cf9480dd090 test-data/cat_wrapper_out1.bed --- a/test-data/cat_wrapper_out1.bed Tue Sep 22 08:59:36 2009 -0400 +++ b/test-data/cat_wrapper_out1.bed Tue Sep 22 10:09:23 2009 -0400 @@ -131,3 +131,28 @@ chrX 152648964 152649196 NM_000425_cds_0_0_chrX_152648965_r 0 - chrX 152691446 152691471 AF101728_cds_0_0_chrX_152691447_f 0 + chrX 152694029 152694263 BC052303_cds_0_0_chrX_152694030_r 0 - +chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547, +chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310, +chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235, +chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252, +chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903, +chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0, +chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572, +chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269, +chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884, +chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015, +chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087, +chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331, +chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568, +chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243, +chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246, +chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402, +chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455, +chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679, +chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945, +chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681, +chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718, +chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260, +chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0, +chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804, +chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057, diff -r e9104d403af7 -r 1cf9480dd090 test-data/sort1_alpha.bed --- a/test-data/sort1_alpha.bed Tue Sep 22 08:59:36 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547, -chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310, -chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235, -chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252, -chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903, -chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0, -chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572, -chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269, -chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884, -chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015, -chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087, -chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331, -chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568, -chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243, -chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246, -chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402, -chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455, -chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679, -chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945, -chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681, -chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718, -chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260, -chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0, -chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804, -chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057, -chrX 122719582 122773357 NM_001167 0 + 122745047 122766566 0 7 96,909,100,79,43,201,6985, 0,25433,28421,31040,32533,40295,46790, -chrX 152648233 152662158 NM_000425 0 - 152648964 152662138 0 28 963,12,73,135,156,120,174,123,202,116,223,71,198,111,125,157,167,112,144,132,185,112,171,123,203,106,11,100, 0,1436,1545,1951,2390,2653,2889,3156,3367,3772,4717,5122,5424,5868,6066,6370,6629,6909,7588,7871,8124,8456,8858,9125,10220,10660,11296,13825, -chrX 152691216 152693487 NM_000054 0 + 152691446 152693029 0 3 255,885,664, 0,616,1607, -chrX 152693677 152712545 NM_001666 0 - 152694029 152712503 0 22 586,100,93,184,74,234,106,135,78,61,103,28,85,192,102,222,129,183,63,163,205,109, 0,1693,2066,2364,2635,2794,3129,3323,3545,3752,5323,5647,5841,6032,6401,11455,11778,13249,13719,13987,14227,18759, diff -r e9104d403af7 -r 1cf9480dd090 test-data/sort1_num.bed --- a/test-data/sort1_num.bed Tue Sep 22 08:59:36 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -chr1 147962192 147962580 CCDS989.1_cds_0_0_chr1_147962193_r 0 - -chr1 147984545 147984630 CCDS990.1_cds_0_0_chr1_147984546_f 0 + -chr1 148078400 148078582 CCDS993.1_cds_0_0_chr1_148078401_r 0 - -chr1 148185136 148185276 CCDS996.1_cds_0_0_chr1_148185137_f 0 + -chr10 55251623 55253124 CCDS7248.1_cds_0_0_chr10_55251624_r 0 - -chr11 116124407 116124501 CCDS8374.1_cds_0_0_chr11_116124408_r 0 - -chr11 116206508 116206563 CCDS8377.1_cds_0_0_chr11_116206509_f 0 + -chr11 116211733 116212337 CCDS8378.1_cds_0_0_chr11_116211734_r 0 - -chr11 1812377 1812407 CCDS7726.1_cds_0_0_chr11_1812378_f 0 + -chr12 38440094 38440321 CCDS8736.1_cds_0_0_chr12_38440095_r 0 - -chr13 112381694 112381953 CCDS9526.1_cds_0_0_chr13_112381695_f 0 + -chr14 98710240 98712285 CCDS9949.1_cds_0_0_chr14_98710241_r 0 - -chr15 41486872 41487060 CCDS10096.1_cds_0_0_chr15_41486873_r 0 - -chr15 41673708 41673857 CCDS10097.1_cds_0_0_chr15_41673709_f 0 + -chr15 41679161 41679250 CCDS10098.1_cds_0_0_chr15_41679162_r 0 - -chr15 41826029 41826196 CCDS10101.1_cds_0_0_chr15_41826030_f 0 + -chr16 142908 143003 CCDS10397.1_cds_0_0_chr16_142909_f 0 + -chr16 179963 180135 CCDS10401.1_cds_0_0_chr16_179964_r 0 - -chr16 244413 244681 CCDS10402.1_cds_0_0_chr16_244414_f 0 + -chr16 259268 259383 CCDS10403.1_cds_0_0_chr16_259269_r 0 - -chr18 23786114 23786321 CCDS11891.1_cds_0_0_chr18_23786115_r 0 - -chr18 59406881 59407046 CCDS11985.1_cds_0_0_chr18_59406882_f 0 + -chr18 59455932 59456337 CCDS11986.1_cds_0_0_chr18_59455933_r 0 - -chr18 59600586 59600754 CCDS11988.1_cds_0_0_chr18_59600587_f 0 + -chr19 59068595 59069564 CCDS12866.1_cds_0_0_chr19_59068596_f 0 + -chr19 59236026 59236146 CCDS12872.1_cds_0_0_chr19_59236027_r 0 - -chr19 59297998 59298008 CCDS12877.1_cds_0_0_chr19_59297999_f 0 + -chr19 59302168 59302288 CCDS12878.1_cds_0_0_chr19_59302169_r 0 - -chr2 118288583 118288668 CCDS2120.1_cds_0_0_chr2_118288584_f 0 + -chr2 118394148 118394202 CCDS2121.1_cds_0_0_chr2_118394149_r 0 - -chr2 220190202 220190242 CCDS2441.1_cds_0_0_chr2_220190203_f 0 + -chr2 220229609 220230869 CCDS2443.1_cds_0_0_chr2_220229610_r 0 - -chr20 33330413 33330423 CCDS13249.1_cds_0_0_chr20_33330414_r 0 - -chr20 33513606 33513792 CCDS13255.1_cds_0_0_chr20_33513607_f 0 + -chr20 33579500 33579527 CCDS13256.1_cds_0_0_chr20_33579501_r 0 - -chr20 33593260 33593348 CCDS13257.1_cds_0_0_chr20_33593261_f 0 + -chr21 32707032 32707192 CCDS13614.1_cds_0_0_chr21_32707033_f 0 + -chr21 32869641 32870022 CCDS13615.1_cds_0_0_chr21_32869642_r 0 - -chr21 33321040 33322012 CCDS13620.1_cds_0_0_chr21_33321041_f 0 + -chr21 33744994 33745040 CCDS13625.1_cds_0_0_chr21_33744995_r 0 - -chr22 30120223 30120265 CCDS13897.1_cds_0_0_chr22_30120224_f 0 + -chr22 30160419 30160661 CCDS13898.1_cds_0_0_chr22_30160420_r 0 - -chr22 30665273 30665360 CCDS13901.1_cds_0_0_chr22_30665274_f 0 + -chr22 30939054 30939266 CCDS13903.1_cds_0_0_chr22_30939055_r 0 - -chr5 131424298 131424460 CCDS4149.1_cds_0_0_chr5_131424299_f 0 + -chr5 131556601 131556672 CCDS4151.1_cds_0_0_chr5_131556602_r 0 - -chr5 131621326 131621419 CCDS4152.1_cds_0_0_chr5_131621327_f 0 + -chr5 131847541 131847666 CCDS4155.1_cds_0_0_chr5_131847542_r 0 - -chr6 108299600 108299744 CCDS5061.1_cds_0_0_chr6_108299601_r 0 - -chr6 108594662 108594687 CCDS5063.1_cds_0_0_chr6_108594663_f 0 + -chr6 108640045 108640151 CCDS5064.1_cds_0_0_chr6_108640046_r 0 - -chr6 108722976 108723115 CCDS5067.1_cds_0_0_chr6_108722977_f 0 + -chr7 113660517 113660685 CCDS5760.1_cds_0_0_chr7_113660518_f 0 + -chr7 116512159 116512389 CCDS5771.1_cds_0_0_chr7_116512160_r 0 - -chr7 116714099 116714152 CCDS5773.1_cds_0_0_chr7_116714100_f 0 + -chr7 116945541 116945787 CCDS5774.1_cds_0_0_chr7_116945542_r 0 - -chr8 118881131 118881317 CCDS6324.1_cds_0_0_chr8_118881132_r 0 - -chr9 128764156 128764189 CCDS6914.1_cds_0_0_chr9_128764157_f 0 + -chr9 128787519 128789136 CCDS6915.1_cds_0_0_chr9_128787520_r 0 - -chr9 128882427 128882523 CCDS6917.1_cds_0_0_chr9_128882428_f 0 + -chr9 128937229 128937445 CCDS6919.1_cds_0_0_chr9_128937230_r 0 - -chrX 122745047 122745924 CCDS14606.1_cds_0_0_chrX_122745048_f 0 + -chrX 152648964 152649196 CCDS14733.1_cds_0_0_chrX_152648965_r 0 - -chrX 152691446 152691471 CCDS14735.1_cds_0_0_chrX_152691447_f 0 + -chrX 152694029 152694263 CCDS14736.1_cds_0_0_chrX_152694030_r 0 - diff -r e9104d403af7 -r 1cf9480dd090 tools/filters/catWrapper.py --- a/tools/filters/catWrapper.py Tue Sep 22 08:59:36 2009 -0400 +++ b/tools/filters/catWrapper.py Tue Sep 22 10:09:23 2009 -0400 @@ -11,29 +11,19 @@ def main(): outfile = sys.argv[1] infile = sys.argv[2] - + catfiles = sys.argv[3:] try: fout = open(sys.argv[1],'w') - except: - stop_err("Output file cannot be opened for writing.") - + except Exxception, ex: + stop_err("Output file cannot be opened for writing\n" + str(ex)) try: fin = open(sys.argv[2],'r') - except: - stop_err("Input file cannot be opened for reading.") - - if len(sys.argv) < 4: - os.system("cp %s %s" %(infile,outfile)) - sys.exit() - - cmdline = "cat %s " %(infile) - for inp in sys.argv[3:]: - cmdline = cmdline + inp + " " - cmdline = cmdline + ">" + outfile + except Exception, ex: + stop_err("Input file cannot be opened for reading\n" + str(ex)) + cmdline = "cat %s %s > %s" % (infile, ' '.join(catfiles), outfile) try: os.system(cmdline) - except: - stop_err("Error encountered with cat.") + except Exception, ex: + stop_err("Error encountered with cat\n" + str(ex)) -if __name__ == "__main__": - main() \ No newline at end of file +if __name__ == "__main__": main() \ No newline at end of file diff -r e9104d403af7 -r 1cf9480dd090 tools/filters/catWrapper.xml --- a/tools/filters/catWrapper.xml Tue Sep 22 08:59:36 2009 -0400 +++ b/tools/filters/catWrapper.xml Tue Sep 22 10:09:23 2009 -0400 @@ -1,17 +1,19 @@ -<tool id="cat1" name="Concatenate queries"> +<tool id="cat1" name="Concatenate queries" version="1.0.1"> <description>tail-to-head</description> <command interpreter="python"> catWrapper.py $out_file1 - $input1 + $input1 + $input2 #for $q in $queries - ${q.input2} + ${q.input3} #end for </command> <inputs> - <param name="input1" type="data" label="Concatenate Query"/> - <repeat name="queries" title="Query"> - <param name="input2" type="data" label="Select" /> + <param name="input1" type="data" label="First query to concatenate:"/> + <param name="input2" type="data" label="Second query to concatenate:"/> + <repeat name="queries" title="Additional query"> + <param name="input3" type="data" label="Select" /> </repeat> </inputs> <outputs> @@ -21,14 +23,16 @@ <test> <param name="input1" value="1.bed"/> <param name="input2" value="2.bed"/> + <param name="input3" value="3.bed"/> <output name="out_file1" file="cat_wrapper_out1.bed"/> </test> <!--TODO: if possible, enhance the underlying test code to handle this test - the problem is multiple params with the same name "input2" + the problem is multiple params with the same name "input3" <test> <param name="input1" value="1.bed"/> <param name="input2" value="2.bed"/> - <param name="input2" value="3.bed"/> + <param name="input3" value="3.bed"/> + <param name="input3" value="4.bed"/> <output name="out_file1" file="cat_wrapper_out2.bed"/> </test> -->
1
0
0
0
[hg] galaxy 2747: Missing string formatting operator as reported...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/4d32e2d934d0
changeset: 2747:4d32e2d934d0 user: Nate Coraor <nate(a)bx.psu.edu> date: Tue Sep 22 10:55:50 2009 -0400 description: Missing string formatting operator as reported by bitbucket user kuntzagk 1 file(s) affected in this change: lib/galaxy/jobs/runners/sge.py diffs (12 lines): diff -r 1cf9480dd090 -r 4d32e2d934d0 lib/galaxy/jobs/runners/sge.py --- a/lib/galaxy/jobs/runners/sge.py Tue Sep 22 10:09:23 2009 -0400 +++ b/lib/galaxy/jobs/runners/sge.py Tue Sep 22 10:55:50 2009 -0400 @@ -297,7 +297,7 @@ self.ds.control( job.job_runner_external_id, DRMAA.Session.TERMINATE ) log.debug( "(%s/%s) Removed from SGE queue at user's request" % ( job.id, job.job_runner_external_id ) ) except DRMAA.InvalidJobError: - log.debug( "(%s/%s) User killed running job, but it was already dead" ( job.id, job.job_runner_external_id ) ) + log.debug( "(%s/%s) User killed running job, but it was already dead" % ( job.id, job.job_runner_external_id ) ) def recover( self, job, job_wrapper ): """Recovers jobs stuck in the queued/running state when Galaxy started"""
1
0
0
0
[hg] galaxy 2741: Removed print stmts in listener
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/2f2c07fa1a39
changeset: 2741:2f2c07fa1a39 user: rc date: Mon Sep 21 15:40:58 2009 -0400 description: Removed print stmts in listener 1 file(s) affected in this change: scripts/galaxy_messaging/amqp_consumer.py diffs (43 lines): diff -r df1f5b739a53 -r 2f2c07fa1a39 scripts/galaxy_messaging/amqp_consumer.py --- a/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 14:45:56 2009 -0400 +++ b/scripts/galaxy_messaging/amqp_consumer.py Mon Sep 21 15:40:58 2009 -0400 @@ -26,6 +26,10 @@ from amqplib import client_0_8 as amqp +import logging +logging.basicConfig(level=logging.DEBUG) +log = logging.getLogger( 'GalaxyAMQP' ) + galaxy_config_file = 'universe_wsgi.ini' global dbconnstr @@ -42,16 +46,16 @@ return rc def recv_callback(msg): - #print 'Received: ' + msg.body + ' from channel #' + str(msg.channel.channel_id) dom = xml.dom.minidom.parseString(msg.body) barcode = get_value(dom, 'barcode') state = get_value(dom, 'state') - print barcode, state + log.debug('Barcode: '+barcode) + log.debug('State: '+state) # update the galaxy db galaxy = GalaxyDbInterface(dbconnstr) sample_id = galaxy.get_sample_id(field_name='bar_code', value=barcode) if sample_id == -1: - print 'Invalid barcode.' + log.debug('Invalid barcode.') return galaxy.change_state(sample_id, state) @@ -63,7 +67,7 @@ amqp_config = {} for option in config.options("galaxy:amqp"): amqp_config[option] = config.get("galaxy:amqp", option) - print amqp_config + log.debug(str(amqp_config)) conn = amqp.Connection(host=amqp_config['host']+":"+amqp_config['port'], userid=amqp_config['userid'], password=amqp_config['password'],
1
0
0
0
[hg] galaxy 2742: Merge with ad4f25a155f02f31edabc5baa822a92610e...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/46852d01ff16
changeset: 2742:46852d01ff16 user: rc date: Mon Sep 21 15:43:38 2009 -0400 description: Merge with ad4f25a155f02f31edabc5baa822a92610e9b4f4 0 file(s) affected in this change: diffs (59 lines): diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/barcode_splitter_output_example.png Binary file static/fastx_icons/barcode_splitter_output_example.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fasta_clipping_histogram_1.png Binary file static/fastx_icons/fasta_clipping_histogram_1.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fasta_clipping_histogram_2.png Binary file static/fastx_icons/fasta_clipping_histogram_2.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_nucleotides_distribution_1.png Binary file static/fastx_icons/fastq_nucleotides_distribution_1.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_nucleotides_distribution_2.png Binary file static/fastx_icons/fastq_nucleotides_distribution_2.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_nucleotides_distribution_3.png Binary file static/fastx_icons/fastq_nucleotides_distribution_3.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_nucleotides_distribution_4.png Binary file static/fastx_icons/fastq_nucleotides_distribution_4.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_quality_boxplot_1.png Binary file static/fastx_icons/fastq_quality_boxplot_1.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_quality_boxplot_2.png Binary file static/fastx_icons/fastq_quality_boxplot_2.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastq_quality_boxplot_3.png Binary file static/fastx_icons/fastq_quality_boxplot_3.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 static/fastx_icons/fastx_clipper_example.png Binary file static/fastx_icons/fastx_clipper_example.png has changed diff -r 2f2c07fa1a39 -r 46852d01ff16 tool_conf.xml.sample --- a/tool_conf.xml.sample Mon Sep 21 15:40:58 2009 -0400 +++ b/tool_conf.xml.sample Mon Sep 21 15:43:38 2009 -0400 @@ -170,7 +170,7 @@ <tool file="fastx_toolkit/fastx_collapser.xml" /> </section> <section name="NGS: QC and manipulation" id="cshl_library_information"> - <label text="Genetic FASTQ data" id="fastq" /> + <label text="Generic FASTQ data" id="fastq" /> <tool file="fastx_toolkit/fastx_quality_statistics.xml" /> <tool file="fastx_toolkit/fastq_quality_boxplot.xml" /> <tool file="fastx_toolkit/fastx_nucleotides_distribution.xml" /> @@ -185,10 +185,10 @@ <tool file="fastx_toolkit/fastq_quality_filter.xml" /> <!--<tool file="fastx_toolkit/fastx_barcode_splitter.xml" />--> <tool file="metag_tools/split_paired_reads.xml" /> - <label text="Roche-454 Specific" id="454" /> + <label text="Roche-454 data" id="454" /> <tool file="metag_tools/short_reads_figure_score.xml" /> <tool file="metag_tools/short_reads_trim_seq.xml" /> - <label text="AB-SOLiD Specific" id="solid" /> + <label text="AB-SOLiD data" id="solid" /> <tool file="solid_tools/solid_qual_stats.xml" /> <tool file="solid_tools/solid_qual_boxplot.xml" /> </section> diff -r 2f2c07fa1a39 -r 46852d01ff16 tools/samtools/sam2interval.xml --- a/tools/samtools/sam2interval.xml Mon Sep 21 15:40:58 2009 -0400 +++ b/tools/samtools/sam2interval.xml Mon Sep 21 15:43:38 2009 -0400 @@ -55,7 +55,7 @@ ref 28 33 - r003 16 ref 29 30 6H5M * 0 0 TAGGC * NM:i:0 ref 36 45 - r001 83 ref 37 30 9M = 7 -39 CAGCGCCAT * -Setting *Print all?* is set to **No** will generate the following:: +Setting *Print all?* to **No** will generate the following:: ref 6 22 + r001 ref 8 19 + r002
1
0
0
0
[hg] galaxy 2743: Modified sort to allow sorting by multiple col...
by Nate Coraor
25 Sep '09
25 Sep '09
details:
http://www.bx.psu.edu/hg/galaxy/rev/ce15d5e5b6ad
changeset: 2743:ce15d5e5b6ad user: Kelly Vincent <kpvincent(a)bx.psu.edu> date: Mon Sep 21 17:02:26 2009 -0400 description: Modified sort to allow sorting by multiple columns 5 file(s) affected in this change: test-data/sort_in1.bed test-data/sort_out1.bed test-data/sort_out2.bed tools/filters/sorter.py tools/filters/sorter.xml diffs (304 lines): diff -r 46852d01ff16 -r ce15d5e5b6ad test-data/sort_in1.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sort_in1.bed Mon Sep 21 17:02:26 2009 -0400 @@ -0,0 +1,29 @@ +chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568, +chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243, +chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246, +chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402, +chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455, +chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679, +chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945, +chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681, +chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903, +chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0, +chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718, +chrX 122719582 122773357 NM_001167 0 + 122745047 122766566 0 7 96,909,100,79,43,201,6985, 0,25433,28421,31040,32533,40295,46790, +chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260, +chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0, +chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804, +chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057, +chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884, +chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015, +chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087, +chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331, +chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547, +chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310, +chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235, +chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252, +chrX 152648233 152662158 NM_000425 0 - 152648964 152662138 0 28 963,12,73,135,156,120,174,123,202,116,223,71,198,111,125,157,167,112,144,132,185,112,171,123,203,106,11,100, 0,1436,1545,1951,2390,2653,2889,3156,3367,3772,4717,5122,5424,5868,6066,6370,6629,6909,7588,7871,8124,8456,8858,9125,10220,10660,11296,13825, +chrX 152691216 152693487 NM_000054 0 + 152691446 152693029 0 3 255,885,664, 0,616,1607, +chrX 152693677 152712545 NM_001666 0 - 152694029 152712503 0 22 586,100,93,184,74,234,106,135,78,61,103,28,85,192,102,222,129,183,63,163,205,109, 0,1693,2066,2364,2635,2794,3129,3323,3545,3752,5323,5647,5841,6032,6401,11455,11778,13249,13719,13987,14227,18759, +chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572, +chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269, diff -r 46852d01ff16 -r ce15d5e5b6ad test-data/sort_out1.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sort_out1.bed Mon Sep 21 17:02:26 2009 -0400 @@ -0,0 +1,29 @@ +chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568, +chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243, +chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246, +chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402, +chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455, +chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679, +chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945, +chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681, +chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903, +chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0, +chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718, +chrX 122719582 122773357 NM_001167 0 + 122745047 122766566 0 7 96,909,100,79,43,201,6985, 0,25433,28421,31040,32533,40295,46790, +chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260, +chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0, +chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804, +chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057, +chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884, +chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015, +chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087, +chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331, +chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547, +chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310, +chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235, +chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252, +chrX 152648233 152662158 NM_000425 0 - 152648964 152662138 0 28 963,12,73,135,156,120,174,123,202,116,223,71,198,111,125,157,167,112,144,132,185,112,171,123,203,106,11,100, 0,1436,1545,1951,2390,2653,2889,3156,3367,3772,4717,5122,5424,5868,6066,6370,6629,6909,7588,7871,8124,8456,8858,9125,10220,10660,11296,13825, +chrX 152691216 152693487 NM_000054 0 + 152691446 152693029 0 3 255,885,664, 0,616,1607, +chrX 152693677 152712545 NM_001666 0 - 152694029 152712503 0 22 586,100,93,184,74,234,106,135,78,61,103,28,85,192,102,222,129,183,63,163,205,109, 0,1693,2066,2364,2635,2794,3129,3323,3545,3752,5323,5647,5841,6032,6401,11455,11778,13249,13719,13987,14227,18759, +chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572, +chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269, diff -r 46852d01ff16 -r ce15d5e5b6ad test-data/sort_out2.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sort_out2.bed Mon Sep 21 17:02:26 2009 -0400 @@ -0,0 +1,29 @@ +chr6 108298214 108386086 NM_007214 0 - 108299600 108385906 0 21 1530,105,99,102,159,174,60,83,148,155,93,133,95,109,51,59,62,113,115,100,304, 0,2490,6246,10831,12670,23164,23520,27331,31052,32526,34311,36130,36365,38609,41028,42398,43048,51479,54500,59097,87568, +chr6 108593954 108616704 NM_003269 0 + 108594662 108615360 0 9 733,146,88,236,147,97,150,106,1507, 0,5400,8778,10445,12037,14265,14749,15488,21243, +chr6 108639410 108689143 NM_152827 0 - 108640045 108688818 0 3 741,125,487, 0,2984,49246, +chr6 108722790 108950942 NM_145315 0 + 108722976 108950321 0 13 325,224,52,102,131,100,59,83,71,101,141,114,750, 0,28931,52094,60760,61796,71339,107102,152319,181970,182297,215317,224802,227402, +chr7 113320332 113924911 AK131266 0 + 113862563 113893433 0 20 285,91,178,90,58,75,138,51,201,178,214,105,88,84,77,102,122,70,164,1124, 0,201692,340175,448290,451999,484480,542213,543265,543478,545201,556083,558358,565876,567599,573029,573245,575738,577123,577946,603455, +chr7 116511232 116557294 NM_003391 0 - 116512159 116556994 0 5 1157,265,278,227,383, 0,20384,37843,43339,45679, +chr7 116713967 116902666 NM_000492 0 + 116714099 116901113 0 27 185,111,109,216,90,164,126,247,93,183,192,95,87,724,129,38,251,80,151,228,101,249,156,90,173,106,1754, 0,24290,29071,50936,54313,55285,56585,60137,62053,68678,79501,107776,110390,111971,114967,122863,123569,126711,130556,131618,134650,147559,162475,172879,184725,185496,186945, +chr7 116944658 117107512 AF377960 0 - 116945541 116979926 0 23 1129,102,133,64,186,206,179,188,153,100,87,80,96,276,118,255,151,100,204,1654,225,108,173, 0,7364,8850,10413,13893,14398,17435,24259,24615,35177,35359,45901,47221,49781,56405,66857,69787,72208,73597,80474,100111,150555,162681, +chr2 118288484 118306183 NM_006773 0 + 118288583 118304530 0 14 184,285,144,136,101,200,115,140,162,153,114,57,178,1796, 0,2765,4970,6482,6971,7183,7468,9890,10261,10768,11590,14270,14610,15903, +chr2 118389378 118390700 BC005078 0 - 118390395 118390500 0 1 1322, 0, +chr8 118880786 119193239 NM_000127 0 - 118881131 119192466 0 11 531,172,161,90,96,119,133,120,108,94,1735, 0,5355,7850,13505,19068,20309,23098,30863,36077,37741,310718, +chrX 122719582 122773357 NM_001167 0 + 122745047 122766566 0 7 96,909,100,79,43,201,6985, 0,25433,28421,31040,32533,40295,46790, +chr9 128763240 128783870 NM_174933 0 + 128764156 128783586 0 12 261,118,74,159,76,48,56,63,129,117,127,370, 0,522,875,5630,12374,12603,15040,15175,18961,19191,20037,20260, +chr9 128787362 128789566 NM_014908 0 - 128787519 128789136 0 1 2204, 0, +chr9 128789530 128848928 NM_015354 0 + 128789552 128848511 0 44 54,55,74,85,81,45,93,120,212,115,201,90,66,120,127,153,127,88,77,115,121,67,129,140,107,207,170,70,68,196,78,86,146,182,201,93,159,138,75,228,132,74,130,594, 0,1491,5075,8652,9254,10312,11104,11317,20808,21702,23060,25462,31564,32908,33566,34851,35204,35595,35776,37202,38860,39111,39891,40349,42422,45499,45827,46675,47158,47621,50453,50840,51474,51926,53831,54186,55119,55619,57449,57605,57947,58352,58541,58804, +chr9 128849867 128870133 NM_020145 0 - 128850516 128869987 0 11 757,241,101,90,24,63,93,134,129,142,209, 0,1071,1736,2085,2635,4201,6376,6736,13056,14247,20057, +chr5 131170738 131357870 AF099740 0 - 131311206 131357817 0 31 112,124,120,81,65,40,120,129,61,88,94,79,72,102,144,117,89,73,96,135,135,78,74,52,33,179,100,102,65,115,248, 0,11593,44117,47607,104668,109739,114675,126366,135488,137518,138009,140437,152389,153373,155388,159269,160793,162981,164403,165577,166119,167611,169501,178260,179675,180901,181658,182260,182953,183706,186884, +chr5 131424245 131426795 NM_000588 0 + 131424298 131426383 0 5 215,42,90,42,535, 0,313,1658,1872,2015, +chr5 131556201 131590458 NM_004199 0 - 131556601 131582218 0 15 471,97,69,66,54,100,71,177,194,240,138,152,97,100,170, 0,2316,2802,5596,6269,11138,11472,15098,16528,17674,21306,24587,25142,25935,34087, +chr5 131621285 131637046 NM_003687 0 + 131621326 131635821 0 7 134,152,82,179,164,118,1430, 0,4915,8770,13221,13609,14097,14331, +chr1 147962006 147975713 NM_005997 0 - 147962192 147975670 0 6 574,145,177,115,153,160, 0,1543,7859,9048,9340,13547, +chr1 147984101 148035079 BC007833 0 + 147984545 148033414 0 14 529,32,81,131,118,153,300,206,84,49,85,130,46,1668, 0,25695,28767,33118,33695,33998,35644,38005,39629,40577,41402,43885,48367,49310, +chr1 148077485 148111797 NM_002651 0 - 148078400 148111728 0 12 1097,121,133,266,124,105,110,228,228,45,937,77, 0,2081,2472,6871,9907,10257,11604,14199,15637,18274,23636,34235, +chr1 148185113 148187485 NM_002796 0 + 148185136 148187378 0 7 163,207,147,82,117,89,120, 0,416,877,1199,1674,1977,2252, +chrX 152648233 152662158 NM_000425 0 - 152648964 152662138 0 28 963,12,73,135,156,120,174,123,202,116,223,71,198,111,125,157,167,112,144,132,185,112,171,123,203,106,11,100, 0,1436,1545,1951,2390,2653,2889,3156,3367,3772,4717,5122,5424,5868,6066,6370,6629,6909,7588,7871,8124,8456,8858,9125,10220,10660,11296,13825, +chrX 152691216 152693487 NM_000054 0 + 152691446 152693029 0 3 255,885,664, 0,616,1607, +chrX 152693677 152712545 NM_001666 0 - 152694029 152712503 0 22 586,100,93,184,74,234,106,135,78,61,103,28,85,192,102,222,129,183,63,163,205,109, 0,1693,2066,2364,2635,2794,3129,3323,3545,3752,5323,5647,5841,6032,6401,11455,11778,13249,13719,13987,14227,18759, +chr2 220108603 220116964 NM_001927 0 + 220108689 220116217 0 9 664,61,96,162,126,221,44,83,789, 0,1718,1874,2118,2451,2963,5400,7286,7572, +chr2 220229182 220233943 NM_024536 0 - 220229609 220233765 0 4 1687,180,574,492, 0,1990,2660,4269, diff -r 46852d01ff16 -r ce15d5e5b6ad tools/filters/sorter.py --- a/tools/filters/sorter.py Mon Sep 21 15:43:38 2009 -0400 +++ b/tools/filters/sorter.py Mon Sep 21 17:02:26 2009 -0400 @@ -1,113 +1,32 @@ -# Filename: sorter.py -# Author: Ian N. Schenck -# Version: 8/22/2005 -# # This script sorts a file based on the inputs: # -cols - column to sort on -# -order - ASC or DESC-ing order +# -order - ASC- or DESCending order # -i - input filename # -o - output filename -import string -import sys -import re -import commands -from os import environ +import os, re, string, sys -def getopts(argv): - opts = {} - while argv: - if argv[0][0] == '-': - opts[argv[0]] = argv[1] - argv = argv[2:] - else: - argv = argv[1:] - return opts +def stop_err( msg ): + sys.stderr.write( "%s\n" % msg ) + sys.exit() def main(): - args = sys.argv[1:] + try: + inputfile = sys.argv[1] + outputfile = '-o %s' % sys.argv[2] + order = ('', '-r')[sys.argv[3] == 'DESC'] + sort_type = ('','-n')[sys.argv[4] == 'num'] + columns = sys.argv[5:] + cols = [ '-k%s,%s'%(n, n) for n in columns ] + except Exception, ex: + stop_err('Error parsing input parameters\n' + str(ex)) + # Launch sort. + cmd = "sort -f -t $'\t' %s %s %s %s %s" % (sort_type, ' '.join(cols), order, outputfile, inputfile) try: - opts = getopts(args) - except IndexError: - print "Usage:" - print " -o Output filename" - print " -i Input filename" - print " -cols Column to sort (base 1)" - print " -order ASC or DESC" - print " -style num or alpha" - return 0 - - outputfile = opts.get("-o") - if outputfile == None: - print "No output file specified." - return -1 - - inputfile = opts.get("-i") - if inputfile == None: - print "No input file specified." - return -2 - - column = opts.get("-cols") - if column == None or column == 'None': - print "Sort column not specified." - return -3 - - order = opts.get("-order") - if order == None: - print "Sort order not specified." - return -4 - - style = opts.get("-style") - if style == None: - style = "num" - - # At this point, all command line options have been collected. - # Verify arguments are valid. - - fileRegEx = re.compile("^[A-Za-z0-9./\-_]+$") - numberRegEx = re.compile("^[0-9]+$") - sortRegEx = re.compile("^(ASC|DESC)$") - if not fileRegEx.match(outputfile): - print "Illegal output filename." - return -5 - if not fileRegEx.match(inputfile): - print "Illegal input filename." - return -6 - if not numberRegEx.match(column): - print "Column number not an integer." - return -7 - if not sortRegEx.match(order): - print "Sort order must be ASCending or DESCending." - return -8 - - # Check sort column against max columns in input file. - - column = string.atoi(column) - if column > len( open(inputfile).readline().split('\t') ): - print "Column "+str(column)+" does not exist." - return -9 - - # Everything is kosher. - - if order == "DESC": - order = " -r" - else: - order = "" - - if style == "num": - style = " -n " - else: - style = " " - - # Launch sort. - - environ['LC_ALL'] = 'POSIX' - commandline = "sort -f"+style+"-k "+str(column)+" -t $'\t' -o "+outputfile+" "+inputfile+order - - errorcode, stdout = commands.getstatusoutput(commandline) - - return errorcode + os.system(cmd) + except Exception, ex: + stop_err('Error running sort command\n' + str(ex)) if __name__ == "__main__": main() diff -r 46852d01ff16 -r ce15d5e5b6ad tools/filters/sorter.xml --- a/tools/filters/sorter.xml Mon Sep 21 15:43:38 2009 -0400 +++ b/tools/filters/sorter.xml Mon Sep 21 17:02:26 2009 -0400 @@ -1,14 +1,27 @@ <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> + <command interpreter="python"> + sorter.py + $input + $out_file1 + $order + $style + $firstcol + #for $col in $column_set: + ${col.column} + #end for + </command> <inputs> <param format="tabular" name="input" type="data" label="Sort Query" /> - <param name="column" label="on column" type="data_column" data_ref="input" accept_default="true" /> + <param name="firstcol" label="on column" type="data_column" data_ref="input" accept_default="true" /> + <repeat name="column_set" title="Column selection"> + <param name="column" label="on column" type="data_column" data_ref="input" accept_default="true" /> + </repeat> <param name="order" type="select" label="in"> <option value="DESC">Descending order</option> <option value="ASC">Ascending order</option> </param> - <param name="style" type="select" label="Flavor"> + <param name="style" type="select" label="with flavor"> <option value="num">Numerical sort</option> <option value="alpha">Alphabetical sort</option> </param> @@ -18,18 +31,20 @@ </outputs> <tests> <test> - <param name="input" value="1.bed"/> - <param name="column" value="1"/> + <param name="input" value="sort_in1.bed"/> + <param name="firstcol" value="1"/> + <param name="column" value="3" /> <param name="order" value="ASC"/> <param name="style" value="num"/> - <output name="out_file1" file="sort1_num.bed"/> + <output name="out_file1" file="sort_out1.bed"/> </test> <test> - <param name="input" value="7.bed"/> + <param name="input" value="sort_in1.bed"/> + <param name="firstcol" value="3" /> <param name="column" value="1"/> <param name="order" value="ASC"/> <param name="style" value="alpha"/> - <output name="out_file1" file="sort1_alpha.bed"/> + <output name="out_file1" file="sort_out2.bed"/> </test> </tests> <help> @@ -42,7 +57,7 @@ **Syntax** -This tool sorts the dataset on any column in either ascending or descending order. +This tool sorts the dataset on any number of columns in either ascending or descending order (all columns will be ascending or descending). * Numerical sort orders numbers by their magnitude, ignores all characters besides numbers, and evaluates a string of numbers to the value they signify. * Alphabetical sort is a phonebook type sort based on the conventional order of letters in an alphabet. Each nth letter is compared with the nth letter of other words in the list, starting at the first letter of each word and advancing to the second, third, fourth, and so on, until the order is established. Therefore, in an alphabetical sort, 2 comes after 100 (1 < 2).
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200