1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/9d268e6d85f3/
changeset: 9d268e6d85f3
branches:
user: dan
date: 2011-06-07 16:46:52
summary: Fix for Select All / Unselect All functionality when more than one set of checkboxes is present on a page.
affected #: 1 file (2 bytes)
--- a/templates/tool_form.mako Tue Jun 07 09:04:55 2011 -0400
+++ b/templates/tool_form.mako Tue Jun 07 10:46:52 2011 -0400
@@ -51,7 +51,7 @@
});
function checkUncheckAll( name, check ) {
- $("input[name=" + name + "][type='checkbox']").attr('checked', !!check);
+ $("input[name='" + name + "'][type='checkbox']").attr('checked', !!check);
}
// Inserts the Select All / Unselect All buttons for checkboxes
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/eeb9fdfcbe00/
changeset: eeb9fdfcbe00
branches:
user: dan
date: 2011-06-07 15:04:55
summary: Fix for incorrect variable name reuse ('roles'), occurring when importing multiple datasets from a history into a library.
affected #: 1 file (40 bytes)
--- a/lib/galaxy/web/controllers/library_common.py Mon Jun 06 16:17:09 2011 -0400
+++ b/lib/galaxy/web/controllers/library_common.py Tue Jun 07 09:04:55 2011 -0400
@@ -1221,7 +1221,7 @@
# it exists, then we need to apply the LIBRARY_MANAGE permission to the library dataset.
dataset_manage_permissions_action = trans.app.security_agent.get_action( 'DATASET_MANAGE_PERMISSIONS' ).action
flush_needed = False
- for action, roles in dataset_permissions_dict.items():
+ for action, dataset_permissions_roles in dataset_permissions_dict.items():
if isinstance( action, Action ):
action = action.action
if action == dataset_manage_permissions_action:
@@ -1229,7 +1229,7 @@
action = trans.app.security_agent.get_action( 'LIBRARY_MANAGE' ).action
# Allow the permissions inherited from the folder to over-ride the same permissions on the dataset.
if action not in current_library_dataset_actions:
- for ldp in [ trans.model.LibraryDatasetPermissions( action, ldda.library_dataset, role ) for role in roles ]:
+ for ldp in [ trans.model.LibraryDatasetPermissions( action, ldda.library_dataset, role ) for role in dataset_permissions_roles ]:
trans.sa_session.add( ldp )
flush_needed = True
if flush_needed:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/1f9173561795/
changeset: 1f9173561795
branches:
user: jgoecks
date: 2011-06-06 22:17:09
summary: Fix GFF3 reader bug.
affected #: 1 file (10 bytes)
--- a/lib/galaxy/datatypes/util/gff_util.py Mon Jun 06 15:45:16 2011 -0400
+++ b/lib/galaxy/datatypes/util/gff_util.py Mon Jun 06 16:17:09 2011 -0400
@@ -217,7 +217,7 @@
# GFF3 test:
parent_id = interval.attributes.get( 'Parent', None )
cur_id = interval.attributes.get( 'ID', None )
- if feature_id and parent_id != feature_parent_id and feature_id != cur_id:
+ if ( cur_id and cur_id != feature_id ) or ( parent_id and parent_id != feature_id ):
break
# GTF test:
gene_id = interval.attributes.get( 'gene_id', None )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/e0de7ec40a80/
changeset: e0de7ec40a80
branches:
user: greg
date: 2011-06-06 21:45:16
summary: Code cleanup for uploading files to a repo in the tool shed.
affected #: 3 files (8.8 KB)
--- a/lib/galaxy/webapps/community/controllers/repository.py Mon Jun 06 15:30:02 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/repository.py Mon Jun 06 15:45:16 2011 -0400
@@ -16,9 +16,12 @@
# Characters that must be html escaped
MAPPED_CHARS = { '>' :'>',
- '<' :'<' }
+ '<' :'<',
+ '"' : '"',
+ '&' : '&',
+ '\'' : ''' }
MAX_CONTENT_SIZE = 32768
-VALID_CHARS = set( string.letters + string.digits + "'\"-=_.()/+*^,:?!#[]%\\$@;" )
+VALID_CHARS = set( string.letters + string.digits + "'\"-=_.()/+*^,:?!#[]%\\$@;{}" )
VALID_REPOSITORYNAME_RE = re.compile( "^[a-z0-9\_]+$" )
class CategoryListGrid( grids.Grid ):
@@ -673,7 +676,7 @@
for i, line in enumerate( open( file_path ) ):
to_html = '%s%s' % ( to_html, self.to_html_str( line ) )
if len( to_html ) > MAX_CONTENT_SIZE:
- large_str = '\nFile contents truncated because file size is larger than maximum viewing size of %d\n' % MAX_CONTENT_SIZE
+ large_str = '\nFile contents truncated because file size is larger than maximum viewing size of %s\n' % util.nice_size( MAX_CONTENT_SIZE )
to_html = '%s%s' % ( to_html, self.to_html_str( large_str ) )
break
return to_html
@@ -706,9 +709,9 @@
translated.append( ' ' )
elif c == '\t':
translated.append( ' ' )
- elif c in [ '\r\n', '\n' ]:
+ elif c == '\n':
translated.append( '<br/>' )
- else:
+ elif c not in [ '\r' ]:
translated.append( 'X' )
return ''.join( translated )
def __build_allow_push_select_field( self, trans, current_push_list, selected_value='none' ):
--- a/lib/galaxy/webapps/community/controllers/upload.py Mon Jun 06 15:30:02 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/upload.py Mon Jun 06 15:45:16 2011 -0400
@@ -60,12 +60,9 @@
elif file_data not in ( '', None ):
uploaded_file = file_data.file
if uploaded_file:
- # TODO: our current support for browsing repo contents requires a copy
- # of the repository files in the repo root directory. To produce these
- # copies, we update without passing the -r null flag (see below). When
- # we're uploading more files, we have to clean out the repo root directory
- # so we can move them into it. We need to eliminate all this when we figure
- # out how to browse the repository files.
+ # Our current support for browsing repo contents requires a copy of the
+ # repository files in the repo root directory. To produce these copies,
+ # we update without passing the "-r null" flag.
os.chdir( repo_dir )
os.system( 'hg update -r null > /dev/null 2>&1' )
os.chdir( current_working_dir )
@@ -76,16 +73,16 @@
tar = tarfile.open( uploaded_file.name )
istar = True
except tarfile.ReadError, e:
+ tar = None
istar = False
- if istar:
- ok, message = self.__check_archive( tar )
- if ok:
- if repository.is_new:
+ if repository.is_new:
+ if istar:
+ # We have an archive ( a tarball )
+ ok, message = self.__check_archive( tar )
+ if ok:
tar.extractall( path=repo_dir )
tar.close()
uploaded_file.close()
- # TODO: The following will only work on new, empty repos,
- # need to also handle repos with existing contents
for root, dirs, files in os.walk( repo_dir, topdown=False ):
# Don't visit .hg directories and don't include hgrc files in commit.
if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0:
@@ -109,78 +106,9 @@
repo.dirstate.add( file_path )
files_to_commit.append( file_path )
else:
- # The repo already contains the file, so we need to make sure the file being
- # uploaded is different from the file in the repo. This is a temporary brute-
- # force method.
- # Make a clone of the repository in a temporary location
- tmp_dir = tempfile.mkdtemp()
- tmp_archive_dir = os.path.join( tmp_dir, 'tmp_archive_dir' )
- if not os.path.exists( tmp_archive_dir ):
- os.makedirs( tmp_archive_dir )
- cmd = "hg clone %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
- os.chdir( tmp_archive_dir )
- os.system( cmd )
- os.chdir( current_working_dir )
- cloned_repo_dir = os.path.join( tmp_archive_dir, 'repo_%d' % repository.id )
- if upload_point is not None:
- full_path = os.path.abspath( os.path.join( cloned_repo_dir, upload_point, file_data.filename ) )
- else:
- full_path = os.path.abspath( os.path.join( cloned_repo_dir, file_data.filename ) )
- # Extract the uploaded tarball to the load_point within the cloned repository hierarchy
- tar.extractall( path=full_path )
tar.close()
- uploaded_file.close()
- # We want these change sets to be associated with the owner of the repository, so we'll
- # set the HGUSER environment variable accordingly.
- os.environ[ 'HGUSER' ] = trans.user.username
- # Add the file to the cloned repository. If it's already tracked, this should do nothing.
- os.chdir( cloned_repo_dir )
- os.system( 'hg add > /dev/null 2>&1' )
- os.chdir( current_working_dir )
- os.chdir( cloned_repo_dir )
- # Commit the change set to the cloned repository
- os.system( "hg commit -m '%s' > /dev/null 2>&1" % commit_message )
- os.chdir( current_working_dir )
- # Push the change set to the master repository
- cmd = "hg push %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
- os.chdir( cloned_repo_dir )
- os.system( cmd )
- # Change the current working directory to the original
- os.chdir( current_working_dir )
- # Since we extracted the archive into repo_dir, a copy of the archive's
- # files remains there. The following will remove them. It would be
- # more ideal if we could use the mercurial api to do this, but I haven't
- # yet discovered a way to pass the -r null flag to repo.update().
- # TODO: our current support for browsing repo contents requires a copy
- # of the repository files in the repo root directory. To produce these
- # copies, we'll update without passing the -r null flag. When we figure
- # out how to browse the repository files, uncomment the -r flag below.
- os.chdir( repo_dir )
- os.system( 'hg update > /dev/null 2>&1' )
- os.chdir( current_working_dir )
- # Remove tmp directory
- shutil.rmtree( tmp_dir )
- message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
- trans.response.send_redirect( web.url_for( controller='repository',
- action='browse_repository',
- message=message,
- id=trans.security.encode_id( repository.id ) ) )
-
-
else:
- tar.close()
- else:
- """
- # TODO: This segment uses the mercurial api (and works), but we need the
- # api section below to be functional in order for this segment to be used.
- # In the meantime, we use the repository.is_new check below...
- repo_contains = file_path in [ i for i in ctx.manifest() ]
- if not repo_contains:
- repo.dirstate.add( file_path )
- files_to_commit.append( file_path )
- """
- if repository.is_new:
- # We're uploading a single file
+ # We have a single file
if upload_point is not None:
full_path = os.path.abspath( os.path.join( upload_point, file_data.filename ) )
file_path = os.path.join( upload_point, file_data.filename )
@@ -190,98 +118,18 @@
shutil.move( uploaded_file.name, full_path )
repo.dirstate.add( file_path )
files_to_commit.append( file_path )
- else:
- """
- # TODO: This segment attempts to use the mercurial api, but is not functional.
- # Until we get it working, we're using the brute force method below it.
- fctx = None
- for changeset in repo.changelog:
- ctx = repo.changectx( changeset )
- if file_path not in ctx.files():
- continue
- fctx = ctx[ file_path ]
- break
- # We now have the parent version of the upload file.
- if fctx:
- data = fctx.data()
- # TODO: obviously very bad way of comparing files...
- file_path_data = open( full_path ).read()
- different = data != file_path_data
- if different:
- # TODO: how do you insert a new version of an existing file using the mercurial api???
- # the follwoin gis not correct!
- #repo.dirstate.normallookup( file_path )
- #files_to_commit.append( file_path )
- pass
- """
- # The repo already contains the file, so we need to make sure the file being
- # uploaded is different from the file in the repo. This is a temporary brute-
- # force method.
- # Make a clone of the repository in a temporary location
- tmp_dir = tempfile.mkdtemp()
- tmp_archive_dir = os.path.join( tmp_dir, 'tmp_archive_dir' )
- if not os.path.exists( tmp_archive_dir ):
- os.makedirs( tmp_archive_dir )
- cmd = "hg clone %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
- os.chdir( tmp_archive_dir )
- os.system( cmd )
- os.chdir( current_working_dir )
- cloned_repo_dir = os.path.join( tmp_archive_dir, 'repo_%d' % repository.id )
- if upload_point is not None:
- full_path = os.path.abspath( os.path.join( cloned_repo_dir, upload_point, file_data.filename ) )
- else:
- full_path = os.path.abspath( os.path.join( cloned_repo_dir, file_data.filename ) )
- # Move the uploaded file to the load_point within the cloned repository hierarchy
- shutil.move( uploaded_file.name, full_path )
- # We want these change sets to be associated with the owner of the repository, so we'll
- # set the HGUSER environment variable accordingly.
- os.environ[ 'HGUSER' ] = trans.user.username
- # Add the file to the cloned repository. If it's already tracked, this should do nothing.
- os.chdir( cloned_repo_dir )
- os.system( 'hg add > /dev/null 2>&1' )
- os.chdir( current_working_dir )
- os.chdir( cloned_repo_dir )
- # Commit the change set to the cloned repository
- os.system( "hg commit -m '%s' > /dev/null 2>&1" % commit_message )
- os.chdir( current_working_dir )
- # Push the change set to the master repository
- cmd = "hg push %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
- os.chdir( cloned_repo_dir )
- os.system( cmd )
- os.chdir( current_working_dir )
- # Since we extracted the archive into repo_dir, a copy of the archive's
- # files remains there. The following will remove them. It would be
- # more ideal if we could use the mercurial api to do this, but I haven't
- # yet discovered a way to pass the -r null flag to repo.update().
- # TODO: our current support for browsing repo contents requires a copy
- # of the repository files in the repo root directory. To produce these
- # copies, we'll update without passing the -r null flag. When we figure
- # out how to browse the repository files, uncomment the -r flag below.
- os.chdir( repo_dir )
- os.system( 'hg update > /dev/null 2>&1' )
- os.chdir( current_working_dir )
- # Remove tmp directory
- shutil.rmtree( tmp_dir )
- message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
- trans.response.send_redirect( web.url_for( controller='repository',
- action='browse_repository',
- message=message,
- id=trans.security.encode_id( repository.id ) ) )
+ else:
+ # We're uploading files to a repository with existing
+ # contents, so clone the repository to a temporary location.
+ tmp_dir, cloned_repo_dir = self.__handle_hg_clone( trans, repository, upload_point, uploaded_file, file_data, repo_dir, current_working_dir, istar, tar=tar )
+ # Commit and push the changes from the cloned repo to the master repo.
+ self.__handle_hg_push( trans, repository, file_data, commit_message, current_working_dir, cloned_repo_dir, repo_dir, tmp_dir )
if ok:
if files_to_commit:
repo.dirstate.write()
repo.commit( text=commit_message )
- # Since we extracted the archive into repo_dir, a copy of the archive's
- # files remains there. The following will remove them. It would be
- # more ideal if we could use the mercurial api to do this, but I haven't
- # yet discovered a way to pass the -r null flag to repo.update().
- # TODO: our current support for browsing repo contents requires a copy
- # of the repository files in the repo root directory. To produce these
- # copies, we'll update without passing the -r null flag. When we figure
- # out how to browse the repository files, uncomment the -r flag below.
os.chdir( repo_dir )
os.system( 'hg update > /dev/null 2>&1' )
- #os.system( 'hg update -r null' )
os.chdir( current_working_dir )
message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
trans.response.send_redirect( web.url_for( controller='repository',
@@ -290,17 +138,8 @@
id=trans.security.encode_id( repository.id ) ) )
else:
status = 'error'
- # Since we extracted the archive into repo_dir, a copy of the archive's
- # files remains there. The following will remove them. It would be
- # more ideal if we could use the mercurial api to do this, but I haven't
- # yet discovered a way to pass the -r null flag to repo.update().
- # TODO: our current support for browsing repo contents requires a copy
- # of the repository files in the repo root directory. To produce these
- # copies, we'll update without passing the -r null flag. When we figure
- # out how to browse the repository files, uncomment the -r flag below.
os.chdir( repo_dir )
os.system( 'hg update > /dev/null 2>&1' )
- #os.system( 'hg update -r null' )
os.chdir( current_working_dir )
selected_categories = [ trans.security.decode_id( id ) for id in category_ids ]
return trans.fill_template( '/webapps/community/repository/upload.mako',
@@ -308,6 +147,57 @@
commit_message=commit_message,
message=message,
status=status )
+ def __handle_hg_clone( self, trans, repository, upload_point, uploaded_file, file_data, repo_dir, current_working_dir, istar, tar=None ):
+ tmp_dir = tempfile.mkdtemp()
+ tmp_archive_dir = os.path.join( tmp_dir, 'tmp_archive_dir' )
+ if not os.path.exists( tmp_archive_dir ):
+ os.makedirs( tmp_archive_dir )
+ # Make a clone of the repository in a temporary location
+ cmd = "hg clone %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
+ os.chdir( tmp_archive_dir )
+ os.system( cmd )
+ os.chdir( current_working_dir )
+ cloned_repo_dir = os.path.join( tmp_archive_dir, 'repo_%d' % repository.id )
+ if upload_point is not None:
+ full_path = os.path.abspath( os.path.join( cloned_repo_dir, upload_point, file_data.filename ) )
+ else:
+ full_path = os.path.abspath( os.path.join( cloned_repo_dir, file_data.filename ) )
+ if istar:
+ # Extract the uploaded tarball to the load_point within the cloned repository hierarchy
+ tar.extractall( path=full_path )
+ tar.close()
+ uploaded_file.close()
+ else:
+ # Move the uploaded file to the load_point within the cloned repository hierarchy
+ shutil.move( uploaded_file.name, full_path )
+ return tmp_dir, cloned_repo_dir
+ def __handle_hg_push( self, trans, repository, file_data, commit_message, current_working_dir, cloned_repo_dir, repo_dir, tmp_dir ):
+ # We want these change sets to be associated with the owner of the repository, so we'll
+ # set the HGUSER environment variable accordingly.
+ os.environ[ 'HGUSER' ] = trans.user.username
+ # Add the file to the cloned repository. If it's already tracked, this should do nothing.
+ os.chdir( cloned_repo_dir )
+ os.system( 'hg add > /dev/null 2>&1' )
+ os.chdir( current_working_dir )
+ os.chdir( cloned_repo_dir )
+ # Commit the change set to the cloned repository
+ os.system( "hg commit -m '%s' > /dev/null 2>&1" % commit_message )
+ os.chdir( current_working_dir )
+ # Push the change set to the master repository
+ cmd = "hg push %s > /dev/null 2>&1" % os.path.abspath( repo_dir )
+ os.chdir( cloned_repo_dir )
+ os.system( cmd )
+ os.chdir( current_working_dir )
+ # Make a copy of the updated repository files for browsing.
+ os.chdir( repo_dir )
+ os.system( 'hg update > /dev/null 2>&1' )
+ os.chdir( current_working_dir )
+ shutil.rmtree( tmp_dir )
+ message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
+ trans.response.send_redirect( web.url_for( controller='repository',
+ action='browse_repository',
+ message=message,
+ id=trans.security.encode_id( repository.id ) ) )
def __check_archive( self, archive ):
for member in archive.getmembers():
# Allow regular files and directories only
--- a/templates/webapps/community/upload/upload.mako Mon Jun 06 15:30:02 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-<%namespace file="/message.mako" import="render_msg" />
-
-<%!
- def inherit(context):
- if context.get('use_panels'):
- return '/webapps/community/base_panels.mako'
- else:
- return '/base.mako'
-%>
-
-<%inherit file="${inherit(context)}"/>
-
-<%
- if selected_upload_type == 'tool':
- title = 'Upload a tool archive'
- type_label = 'tool'
- elif selected_upload_type == 'toolsuite':
- title = 'Upload a tool suite archive'
- type_label = 'tool suite'
-%>
-
-<%def name="title()">
- ${title}
-</%def>
-
-<%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- $( function() {
- $( "select[refresh_on_change='true']").change( function() {
- $( "#upload_form" ).submit();
- });
- });
- </script>
-</%def>
-
-<h2>${title}</h2>
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<div class="toolForm">
- <div class="toolFormTitle">${title}</div>
- <div class="toolFormBody">
- ## TODO: nginx
- <form id="upload_form" name="upload_form" action="${h.url_for( controller='tool_upload', action='upload' )}" enctype="multipart/form-data" method="post">
- %if replace_id is not None:
- <input type='hidden' name="replace_id" value="${replace_id}"/>
- %endif
- <div class="form-row">
- <label>Upload Type</label>
- <div class="form-row-input">
- ${upload_type_select_list.get_html()}
- </div>
- <div class="toolParamHelp" style="clear: both;">
- Need help creating a ${type_label} archive? See details below.
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>File:</label>
- <div class="form-row-input"><input type="file" name="file_data"/></div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>Category</label>
- <div class="form-row-input">
- <select name="category_id" multiple>
- %for category in categories:
- %if category.id in selected_categories:
- <option value="${trans.security.encode_id( category.id )}" selected>${category.name}</option>
- %else:
- <option value="${trans.security.encode_id( category.id )}">${category.name}</option>
- %endif
- %endfor
- </select>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>URL:</label>
- <div class="form-row-input"><input type="text" name="url" style="width: 100%;"/></div>
- <div class="toolParamHelp" style="clear: both;">
- Instead of uploading directly from your computer, you may instruct Galaxy to download the file from a Web or FTP address.
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" class="primary-button" name="upload_button" value="Upload">
- </div>
- </form>
- </div>
-</div>
-<p/>
-<div class="toolFormTitle">Creating an archive containing a tool or a suite of tools</div>
-<p>
- A tool or tool suite archive is a tar-format file (bzipped or gzipped tar are valid)
- containing all the files necessary to load the tool(s) into a Galaxy instance.
-</p>
-%if selected_upload_type == 'toolsuite':
- <h3>Tool Suite Archive</h3>
- <p>
- A tools suite must include a file named <code>suite_config.xml</code> which provides information about the id, name,
- version and description of the tool suite, as well as the id, name, version and description of each tool
- in the suite. Here is an example <code>suite_config.xml</code> file.
- </p>
- <p>
-<pre>
- <suite id="lastz_toolsuite" name="Suite of Lastz tools" version="1.0.0">
- <description>This suite contains all of my Lastz tools for Galaxy</description>
- <tool id="lastz_wrapper_2" name="Lastz" version="1.1.0">
- <description> map short reads against reference sequence</description>
- </tool>
- <tool id="lastz_paired_reads_wrapper" name="Lastz paired reads" version="1.0.0">
- <description> map short paired reads against reference sequence</description>
- </tool>
- </suite>
-</pre>
- </p>
- </p>
- <p>
- New versions of the suite can be uploaded, replacing an older version of the suite, but the version attribute
- of the <suite> tag must be altered the same way that the version attribute of a single tool config must be altered
- if uploading a new version of a tool.
- </p>
- <p>
- The id, name and version attributes of each <tool> tag in the <code>suite_config.xml</code> file must exactly match the same
- attributes in each associated tool config in the archive or you will not be allowed to upload the archive.
- </p>
- <p>
- In addition to the <code>suite_config.xml</code> file, the archive must include all
- <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config files</a>,
- executables, functional test data (if your tool config includes functional tests) and other files needed for each
- of the tools in your suite to function within Galaxy. See the information about single tool archives below for
- additional hints to enable ease-of-use when others download your suite of tools.
- </p>
- <p>
- For example, to package the above Lastz suite of tools:
-<pre>
- user@host:~% tar jcvf ~/Desktop/galaxy_lastz_toolsuite.tar.bz2 lastzsuite
- lastzsuite/
- lastzsuite/README
- lastzsuite/suite_config.xml
- lastzsuite/lastz_paired_reads_wrapper.py
- lastzsuite/lastz_paired_reads_wrapper.xml
- lastzsuite/lastz_wrapper.py
- lastzsuite/lastz_wrapper.xml
- lastzsuite/lastz-distrib-1.02.00/
- lastzsuite/lastz-distrib-1.02.00/src/
- lastzsuite/lastz-distrib-1.02.00/src/Makefile
- lastzsuite/lastz-distrib-1.02.00/src/version.mak
- lastzsuite/lastz-distrib-1.02.00/src/lastz.c
- lastzsuite/lastz-distrib-1.02.00/src/lastz.h
- ...
-</pre>
- ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
- </p>
-%endif
-<h3>Single Tool Archive</h3>
-<p>
- A single tool archive must include a
- <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config file</a>
- and will probably also include a tool script. If any steps are necessary to install your tool beyond the basic
- instructions below, include a README file to provide details. If the tool (or parts of it) are written in C,
- the source code can be included (or put links to the source in the README). Do not include pre-compiled binaries
- without source since Galaxy is run on a wide variety of platforms. Also, if you are only wrapping or providing a
- Galaxy config for a tool that is not your own, be sure the license allows for redistribution before including any
- part of that tool in the archive.
-</p>
-<p>
- There are no requirements about the directory structure inside the archive, but for ease of use it's generally
- a good idea to put everything inside a sub-directory, instead of directly at the top level.
-</p>
-<p>
- For example, to package the Lastz tool's config file, Galaxy wrapper, and the C source:
-<pre>
- user@host:~% tar jcvf ~/Desktop/galaxy_lastz_tool.tar.bz2 lastz
- lastz/
- lastz/README
- lastz/lastz_wrapper.py
- lastz/lastz_wrapper.xml
- lastz/lastz-distrib-1.02.00/
- lastz/lastz-distrib-1.02.00/src/
- lastz/lastz-distrib-1.02.00/src/Makefile
- lastz/lastz-distrib-1.02.00/src/version.mak
- lastz/lastz-distrib-1.02.00/src/lastz.c
- lastz/lastz-distrib-1.02.00/src/lastz.h
- ...
-</pre>
- ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
-</p>
-<h3>Editing Information, Categories, and Submitting For Approval</h3>
-<p>
- Simply uploading a tool to the Galaxy too shed will not allow other users to find and download your tool. It will
- need to be approved by an administrator before it appears in the tool list.
-</p>
-<p>
- After your archive has successfully uploaded, you will be redirected to the Edit Tool page. Provide a detailed
- description of what the tool does - this will be used by administrators to understand the tool before approving it
- for display on the site. Once approved, this information will be displayed to users who view your tool. In addition,
- the site administrators will have configured a number of categories with which you can associate your tool to make it
- easy to find by users looking to solve specific problems. Associate as many categories as are relevant to your tool.
- You may change the description and associated categories as often as you'd like until you click the "<strong>Submit for
- approval</strong>" button. Once submitted, the tool will be approved or rejected by an administrator. If the tool is
- rejected, you will see information about why it was rejected, and you can make appropriate changes to the archive and
- re-submit it for approval. When it is approved, your archive will be visible to everyone. At that point, the description
- and associated categories can only be changed by an administrator.
-</p>
-<p>
- When the tool has been approved or rejected, you may upload a new version by browsing to the tool's "View Tool" page,
- clicking the "Tool actions" menu in the upper right corner of the page, and selecting "Upload a new version" from the
- menu.
-</p>
-<hr/>
-<h3>Downloading and Installing Tools</h3>
-<p>
- A tool's download link will send you the tool archive. Once downloaded, unpack the tool on your local Galaxy instance's server:
-<pre>
- user@host:~% tar xvf galaxy_lastz_tool.tar
- ...
- user@host:~% tar zxvf galaxy_lastz_tool.tar.gz
- ...
- user@host:~% tar jxvf galaxy_lastz_tool.tar.bz2
- ...
-</pre>
- If the archive includes a README file, consult it for installation instructions. If not, follow these basic steps:
- <ol>
- <li>Create a directory under <code>galaxy_dist/tools/</code> to house downloaded tool(s).</li>
- <li>In the new directory, place the XML and any script file(s) which were contained in the archive.</li>
- <li>
- If the tool includes binaries, you'll need to copy them to a directory on your <code>$PATH</code>. If the tool depends on
- C binaries but does not come with them (only source), you'll need to compile the source first.
- </li>
- <li>Add the tool to <code>galaxy_dist/tool_conf.xml</code>.</li>
- <li>Restart your Galaxy server process.</li>
- </ol>
-</p>
-<p>
- In the near future, we plan to implement a more direct method to install tools via the Galaxy administrator user interface instead
- of placing files on the filesystem and manually managing the <code>tool_conf.xml</code> file.
-</p>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/d34c83a1301e/
changeset: d34c83a1301e
branches:
user: kanwei
date: 2011-06-06 21:30:02
summary: Improve docs for Grouping tool. Closes #576
affected #: 1 file (364 bytes)
--- a/tools/stats/grouping.xml Mon Jun 06 13:17:18 2011 -0400
+++ b/tools/stats/grouping.xml Mon Jun 06 15:30:02 2011 -0400
@@ -88,7 +88,11 @@
**Syntax**
-This tool allows you to group the input dataset by a particular column and perform aggregate functions: Mean, Median, Mode, Sum, Max, Min, Count, Randomly pick, and Concatenate on any column.
+This tool allows you to group the input dataset by a particular column and perform aggregate functions: Mean, Median, Mode, Sum, Max, Min, Count, Concatenate, and Randomly pick on any column(s).
+
+The Concatenate function will take, for each group, each item in the specified column and build a comma delimited list. Concatenate Unique will do the same but will build a list of unique items with no repetition.
+
+Count and Count Unique are equivalent to Concatenate and Concatenate Unique, but will only count the number of items and will return an integer.
- If multiple modes are present, all are reported.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/b7c4c1bcf03d/
changeset: b7c4c1bcf03d
branches:
user: jgoecks
date: 2011-06-06 17:17:31
summary: Trackster: use error padding only when needed by placing error messages in div above tiles rather than in tiles.
affected #: 3 files (966 bytes)
--- a/static/june_2007_style/blue/trackster.css Mon Jun 06 11:12:04 2011 -0400
+++ b/static/june_2007_style/blue/trackster.css Mon Jun 06 11:17:31 2011 -0400
@@ -26,6 +26,7 @@
.label-track .track-content{background:white;}
.track-tile{background:white;}
.track-tile canvas{position:relative;z-index:100;border:solid white;border-width:2px 0px 0px 0px;}
+.tile-message {border-bottom:solid 1px red;text-align:center;color:red;background-color:white;}
.track.error .track-content{background-color:#ECB4AF;background-image:none;}
.track.nodata .track-content{background-color:#eee;background-image:none;}
.track.pending .track-content{background-color:white;background-image:none;}
--- a/static/june_2007_style/trackster.css.tmpl Mon Jun 06 11:12:04 2011 -0400
+++ b/static/june_2007_style/trackster.css.tmpl Mon Jun 06 11:17:31 2011 -0400
@@ -167,6 +167,13 @@
border-width: 2px 0px 0px 0px;
}
+.tile-message {
+ border-bottom: solid 1px red;
+ text-align: center;
+ color: red;
+ background-color: white;
+}
+
.track.error .track-content {
background-color: #ECB4AF;
background-image: none;
--- a/static/scripts/trackster.js Mon Jun 06 11:12:04 2011 -0400
+++ b/static/scripts/trackster.js Mon Jun 06 11:17:31 2011 -0400
@@ -172,7 +172,7 @@
// height of individual features within tracks. Feature height, then, should always be less
// than track height.
CHAR_HEIGHT_PX = 9, // FIXME: font size may not be static
- ERROR_PADDING = 10, // Padding at the top of tracks for error messages
+ ERROR_PADDING = 15, // Padding at the top of tracks for error messages
SUMMARY_TREE_TOP_PADDING = CHAR_HEIGHT_PX + 2,
// Maximum number of rows un a slotted track
MAX_FEATURE_DEPTH = 100,
@@ -1507,8 +1507,9 @@
this.max_val = max_val;
};
-var FeatureTrackTile = function(index, resolution, canvas) {
+var FeatureTrackTile = function(index, resolution, canvas, message) {
Tile.call(this, index, resolution, canvas);
+ this.message = message;
};
/**
@@ -1993,6 +1994,27 @@
}
}
+ //
+ // If some tiles have messages, set padding of tiles without messages
+ // so features and rows align.
+ //
+ var messages_to_show = false;
+ for (var tile_index = 0; tile_index < drawn_tiles.length; tile_index++) {
+ if (drawn_tiles[tile_index].message) {
+ messages_to_show = true;
+ break;
+ }
+ }
+ if (messages_to_show) {
+ for (var tile_index = 0; tile_index < drawn_tiles.length; tile_index++) {
+ tile = drawn_tiles[tile_index];
+ if (!tile.message) {
+ // Need to align with other tile(s) that have message(s).
+ tile.canvas.css("padding-top", ERROR_PADDING);
+ }
+ }
+ }
+
// Store initial canvas in case we need to use it for overview
/* This is completely broken, just saves the first tile it sees
regardless of if it should be the overview
@@ -2620,8 +2642,7 @@
// Create painter, and canvas of sufficient size to contain all features
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)( filtered, tile_low, tile_high, this.prefs, mode, ref_seq );
- // FIXME: ERROR_PADDING is an ugly gap most of the time
- var required_height = painter.get_required_height( slots_required ) + ERROR_PADDING;
+ var required_height = painter.get_required_height(slots_required);
var canvas = this.view.canvas_manager.new_canvas();
canvas.width = width + left_offset;
@@ -2634,31 +2655,26 @@
ctx.textAlign = "right";
this.container_div.find(".yaxislabel").remove();
- // If there is a message, draw it on canvas so that it moves around with canvas, and make the border red
- // to indicate region where message is applicable
+ if (result.data) {
+ // Set example feature. This is needed so that track can update its UI based on feature attributes.
+ this.example_feature = (result.data.length ? result.data[0] : undefined);
+
+ // Draw features.
+ painter.draw(ctx, width, required_height, slots);
+ }
+
+ // If tile has a message, create container div with both a message div and the canvas.
if (result.message) {
- ctx.fillStyle = "red";
- ctx.textAlign = "left";
- var old_base = ctx.textBaseline;
- ctx.textBaseline = "top";
- ctx.fillRect(left_offset, 0, canvas.width - left_offset, 1);
- ctx.fillText(result.message, left_offset, 2);
- ctx.textBaseline = old_base;
-
- // If there's no data, return.
- if (!result.data) {
- return new Tile(tile_index, resolution, canvas, required_height);
- }
+ var container_div = $("<div/>");
+ var message_div = $("<div/>").addClass("tile-message").text(result.message).css('width', canvas.width);
+ message_div.css({position: 'absolute', top: 0});
+ $(canvas).css("top", 15);
+ container_div.append(message_div);
+ container_div.append(canvas);
+ canvas = container_div;
}
- // Set example feature. This is needed so that track can update its UI based on feature attributes.
- this.example_feature = (result.data.length ? result.data[0] : undefined);
-
- // Draw features
- ctx.translate(left_offset, ERROR_PADDING);
- painter.draw(ctx, width, required_height, slots);
-
- return new FeatureTrackTile(tile_index, resolution, canvas);
+ return new FeatureTrackTile(tile_index, resolution, canvas, result.message);
}
});
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/e4ef73d003f6/
changeset: e4ef73d003f6
branches:
user: kanwei
date: 2011-06-06 17:12:04
summary: Restore error icon for color-blindness; needs further testing
affected #: 1 file (41 bytes)
--- a/templates/root/history_common.mako Mon Jun 06 09:37:06 2011 -0400
+++ b/templates/root/history_common.mako Mon Jun 06 11:12:04 2011 -0400
@@ -69,6 +69,7 @@
<a class="icon-button delete tooltip" title="Delete" href="${h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh )}" id="historyItemDeleter-${data.id}"></a>
%endif
</div>
+ <span class="state-icon"></span><span class="historyItemTitle">${hid}: ${data.display_name()}</span></div>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.