1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/5344a6864d47/
changeset: 5344a6864d47
user: jgoecks
date: 2011-09-19 06:07:24
summary: Trackster: do not use child tracks for now because they do not work with new request_redraw structure.
affected #: 1 file (-1 bytes)
--- a/static/scripts/trackster.js Thu Sep 15 17:10:39 2011 -0400
+++ b/static/scripts/trackster.js Mon Sep 19 00:07:24 2011 -0400
@@ -1228,7 +1228,7 @@
new_track = new ToolDataFeatureTrack(track_name, view, current_track.hda_ldda, undefined, {}, {}, current_track);
new_track.change_mode(current_track.mode);
}
- this.track.add_track(new_track);
+ this.track.view.add_track(new_track);
new_track.content_div.text("Starting job.");
// Run tool.
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/32b3ed6d5255/
changeset: 32b3ed6d5255
user: jgoecks
date: 2011-09-15 23:10:39
summary: Comment the Trinity assembler out of the sample tool conf so that it must be explicitly enabled.
affected #: 1 file (-1 bytes)
--- a/tool_conf.xml.sample Wed Sep 14 14:41:19 2011 -0400
+++ b/tool_conf.xml.sample Thu Sep 15 17:10:39 2011 -0400
@@ -338,8 +338,11 @@
<tool file="ngs_rna/cufflinks_wrapper.xml" /><tool file="ngs_rna/cuffcompare_wrapper.xml" /><tool file="ngs_rna/cuffdiff_wrapper.xml" />
+ <!-- Trinity is very memory-intensive and should only be enabled/run
+ on instances with sufficient resources.
<label text="De novo Assembly" id="de_novo_assembly "/><tool file="ngs_rna/trinity_all.xml" />
+ --><label text="Filtering" id="filtering" /><tool file="ngs_rna/filter_transcripts_via_tracking.xml" /></section>
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/0540dedaaca0/
changeset: 0540dedaaca0
user: natefoo
date: 2011-09-14 20:40:38
summary: New API scripts to do POST/PUT/DELETE without any guidance. Use like:
./update.py key url param1=val param2=val
affected #: 3 files (0 bytes)
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/ca6db8f67477/
changeset: ca6db8f67477
user: natefoo
date: 2011-09-14 20:36:38
summary: New API features:
* The @web.require_admin decorator can now be used on API methods
* When using model.model_class.get_api_value(), api_*_visible_keys can now
be mapper attributes to other model classes (get_api_value() recursion)
* Monkeypatch the route mapper to contain a resource_with_deleted() method.
This works just like the existing mapper.resource() method but adds extra
routes.
The following is a supplement to the Routes RESTful services
documentation at:
https://routes.groovie.org/restful.html
Using:
mapper.resources_with_deleted( "message", "items" )
Would result in the same routes as in the use of resource(), with the
addition of:
map.connect("deleted_messages", "/messages/deleted",
controller=messages, action="index", deleted=True,
conditions=dict(method=["GET"])
map.connect("deleted_message", "/messages/deleted/{id}",
controller=messages, action="show", deleted=True,
conditions=dict(method=["GET"])
map.connect("undelete_deleted_message", "/messages/deleted/{id}/undelete",
controller=messages, action="index",
conditions=dict(method=["POST"])
Which adds to the convention:
GET /messages/deleted => messages.index(deleted=True) => url("deleted_messages")
GET /messages/deleted/1 => messages.show(id, deleted=True) => url("deleted_message", id=1)
POST /messages/deleted/1/undelete => messages.undelete(id) => url("undelete_deleted_message", id=1)
affected #: 3 files (1.7 KB)
--- a/lib/galaxy/model/item_attrs.py Tue Sep 13 16:55:17 2011 -0400
+++ b/lib/galaxy/model/item_attrs.py Wed Sep 14 14:36:38 2011 -0400
@@ -1,4 +1,5 @@
from sqlalchemy.sql.expression import func
+from sqlalchemy.orm.collections import InstrumentedList
# Cannot import galaxy.model b/c it creates a circular import graph.
import galaxy
import logging
@@ -156,6 +157,13 @@
#api_collection_visible_keys = ( 'id' )
#api_element_visible_keys = ( 'id' )
def get_api_value( self, view='collection', value_mapper = None ):
+ def get_value( key, item ):
+ try:
+ return item.get_api_value( view=view, value_mapper=value_mapper )
+ except:
+ if key in value_mapper:
+ return value_mapper.get( key )( item )
+ return item
if value_mapper is None:
value_mapper = {}
rval = {}
@@ -165,9 +173,13 @@
raise Exception( 'Unknown API view: %s' % view )
for key in visible_keys:
try:
- rval[key] = self.__getattribute__( key )
- if key in value_mapper:
- rval[key] = value_mapper.get( key )( rval[key] )
+ item = self.__getattribute__( key )
+ if type( item ) == InstrumentedList:
+ rval[key] = []
+ for i in item:
+ rval[key].append( get_value( key, i ) )
+ else:
+ rval[key] = get_value( key, item )
except AttributeError:
rval[key] = None
return rval
--- a/lib/galaxy/web/framework/__init__.py Tue Sep 13 16:55:17 2011 -0400
+++ b/lib/galaxy/web/framework/__init__.py Wed Sep 14 14:36:38 2011 -0400
@@ -117,7 +117,7 @@
return error
trans.response.set_content_type( "application/json" )
trans.set_user( provided_key.user )
-# Perform api_run_as processing, possibly changing identity
+ # Perform api_run_as processing, possibly changing identity
if 'run_as' in kwargs:
if not trans.user_can_do_run_as():
error_message = 'User does not have permissions to run jobs as another user'
@@ -147,13 +147,18 @@
def require_admin( func ):
def decorator( self, trans, *args, **kwargs ):
if not trans.user_is_admin():
+ msg = "You must be an administrator to access this feature."
admin_users = trans.app.config.get( "admin_users", "" ).split( "," )
+ user = trans.get_user()
if not admin_users:
- return trans.show_error_message( "You must be logged in as an administrator to access this feature, but no administrators are set in the Galaxy configuration." )
- user = trans.get_user()
- if not user:
- return trans.show_error_message( "You must be logged in as an administrator to access this feature." )
- return trans.show_error_message( "You must be an administrator to access this feature." )
+ msg = "You must be logged in as an administrator to access this feature, but no administrators are set in the Galaxy configuration."
+ elif not user:
+ msg = "You must be logged in as an administrator to access this feature."
+ trans.response.status = 403
+ if trans.response.get_content_type() == 'application/json':
+ return msg
+ else:
+ return trans.show_error_message( msg )
return func( self, trans, *args, **kwargs )
return decorator
--- a/lib/galaxy/web/framework/base.py Tue Sep 13 16:55:17 2011 -0400
+++ b/lib/galaxy/web/framework/base.py Wed Sep 14 14:36:38 2011 -0400
@@ -29,6 +29,21 @@
log = logging.getLogger( __name__ )
+def __resource_with_deleted( self, member_name, collection_name, **kwargs ):
+ """
+ Method to monkeypatch on to routes.mapper.Mapper which does the same thing
+ as resource() with the addition of standardized routes for handling
+ elements in Galaxy's "deleted but not really deleted" fashion.
+ """
+ collection_path = kwargs.get( 'path_prefix', '' ) + '/' + collection_name + '/deleted'
+ member_path = collection_path + '/:id'
+ self.connect( 'deleted_' + collection_name, collection_path, controller=collection_name, action='index', deleted=True )
+ self.connect( 'deleted_' + member_name, member_path, controller=collection_name, action='show', deleted=True )
+ self.connect( 'undelete_deleted_' + member_name, member_path + '/undelete', controller=collection_name, action='undelete',
+ conditions=dict( method=['POST'] ) )
+ self.resource( member_name, collection_name, **kwargs )
+routes.Mapper.resource_with_deleted = __resource_with_deleted
+
class WebApplication( object ):
"""
A simple web application which maps requests to objects using routes,
@@ -320,6 +335,8 @@
Sets the Content-Type header
"""
self.headers[ "content-type" ] = type
+ def get_content_type( self ):
+ return self.headers[ "content-type" ]
def send_redirect( self, url ):
"""
Send an HTTP redirect response to (target `url`)
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/c6452f6558ee/
changeset: c6452f6558ee
user: jgoecks
date: 2011-09-13 22:55:17
summary: Trackster: improve method for fetching additional data and simply data fetching.
affected #: 3 files (1.4 KB)
--- a/lib/galaxy/visualization/tracks/data_providers.py Mon Sep 12 14:51:26 2011 -0400
+++ b/lib/galaxy/visualization/tracks/data_providers.py Tue Sep 13 16:55:17 2011 -0400
@@ -3,7 +3,7 @@
"""
import sys
-from math import floor, ceil, log, pow
+from math import ceil, log
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
@@ -13,14 +13,12 @@
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
-from bx.arrays.array_tree import FileArrayTreeDict
from bx.bbi.bigwig_file import BigWigFile
from galaxy.util.lrucache import LRUCache
from galaxy.visualization.tracks.summary import *
import galaxy_utils.sequence.vcf
from galaxy.datatypes.tabular import Vcf
from galaxy.datatypes.interval import Bed, Gff, Gtf
-from galaxy.datatypes.util.gff_util import parse_gff_attributes
from pysam import csamtools, ctabix
@@ -32,7 +30,20 @@
return None
else:
return float(n)
-
+
+def get_bounds( reads, start_pos_index, end_pos_index ):
+ """
+ Returns the minimum and maximum position for a set of reads.
+ """
+ max_low = sys.maxint
+ max_high = -sys.maxint
+ for read in reads:
+ if read[ start_pos_index ] < max_low:
+ max_low = read[ start_pos_index ]
+ if read[ end_pos_index ] > max_high:
+ max_high = read[ end_pos_index ]
+ return max_low, max_high
+
class TracksDataProvider( object ):
""" Base class for tracks data providers. """
@@ -75,8 +86,11 @@
def get_data( self, chrom, start, end, start_val=0, max_vals=None, **kwargs ):
"""
Returns data in region defined by chrom, start, and end. start_val and
- max_vals are used to denote the data to return: start_val is the first value to
+ max_vals are used to denote the data to return: start_val is the first element to
return and max_vals indicates the number of values to return.
+
+ Return value must be a dictionary with the following attributes:
+ dataset_type, data
"""
# Override.
pass
@@ -218,18 +232,23 @@
def get_data( self, chrom, start, end, start_val=0, max_vals=sys.maxint, **kwargs ):
"""
- Fetch reads in the region.
+ Fetch reads in the region and additional metadata.
- Each read is a list with the format
- [<guid>, <start>, <end>, <name>, <read_1>, <read_2>]
- where <read_1> has the format
- [<start>, <end>, <cigar>, ?<read_seq>?]
- and <read_2> has the format
- [<start>, <end>, <cigar>, ?<read_seq>?]
- For single-end reads, read has format:
- [<guid>, <start>, <end>, <name>, cigar, seq]
- NOTE: read end and sequence data are not valid for reads outside of
- requested region and should not be used.
+ Returns a dict with the following attributes:
+ data - a list of reads with the format
+ [<guid>, <start>, <end>, <name>, <read_1>, <read_2>]
+ where <read_1> has the format
+ [<start>, <end>, <cigar>, ?<read_seq>?]
+ and <read_2> has the format
+ [<start>, <end>, <cigar>, ?<read_seq>?]
+ For single-end reads, read has format:
+ [<guid>, <start>, <end>, <name>, cigar, seq]
+ NOTE: read end and sequence data are not valid for reads outside of
+ requested region and should not be used.
+
+ max_low - lowest coordinate for the returned reads
+ max_high - highest coordinate for the returned reads
+ message - error/informative message
"""
start, end = int(start), int(end)
orig_data_filename = self.original_dataset.file_name
@@ -304,9 +323,13 @@
r2 = [ read['mate_start'], read['mate_start'] ]
results.append( [ "%i_%s" % ( read_start, qname ), read_start, read_end, qname, r1, r2 ] )
-
+
+ # Clean up.
bamfile.close()
- return { 'data': results, 'message': message }
+
+ max_low, max_high = get_bounds( results, 1, 2 )
+
+ return { 'data': results, 'message': message, 'max_low': max_low, 'max_high': max_high }
class BBIDataProvider( TracksDataProvider ):
"""
@@ -334,9 +357,10 @@
return None
all_dat = all_dat[0] # only 1 summary
- return { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) }
+ return { 'data' : { 'max': float( all_dat['max'] ), \
+ 'min': float( all_dat['min'] ), \
+ 'total_frequency': float( all_dat['coverage'] ) } \
+ }
start = int(start)
end = int(end)
@@ -361,7 +385,7 @@
result.append( (pos, float_nan(dat_dict['mean']) ) )
pos += step_size
- return result
+ return { 'data': result }
class BigBedDataProvider( BBIDataProvider ):
def _get_dataset( self ):
@@ -654,7 +678,7 @@
float( feature[5] )]
rval.append(payload)
- return { 'data_type' : 'vcf', 'data': rval, 'message': message }
+ return { 'data': rval, 'message': message }
class GFFDataProvider( TracksDataProvider ):
"""
--- a/lib/galaxy/web/controllers/tracks.py Mon Sep 12 14:51:26 2011 -0400
+++ b/lib/galaxy/web/controllers/tracks.py Tue Sep 13 16:55:17 2011 -0400
@@ -530,15 +530,9 @@
data_provider = data_provider_class( converted_dataset=converted_dataset, original_dataset=dataset, dependencies=deps )
# Get and return data from data_provider.
- data = data_provider.get_data( chrom, low, high, int(start_val), int(max_vals), **kwargs )
- message = None
- if isinstance(data, dict) and 'message' in data:
- message = data['message']
- tracks_dataset_type = data.get( 'data_type', tracks_dataset_type )
- track_data = data['data']
- else:
- track_data = data
- return { 'dataset_type': tracks_dataset_type, 'extra_info': extra_info, 'data': track_data, 'message': message }
+ result = data_provider.get_data( chrom, low, high, int(start_val), int(max_vals), **kwargs )
+ result.update( { 'dataset_type': tracks_dataset_type, 'extra_info': extra_info } )
+ return result
@web.json
def save( self, trans, **kwargs ):
--- a/static/scripts/trackster.js Mon Sep 12 14:51:26 2011 -0400
+++ b/static/scripts/trackster.js Tue Sep 13 16:55:17 2011 -0400
@@ -443,9 +443,9 @@
$.extend(extra_params, {start_val: cur_data.data.length + 1});
}
else if (req_type === this.BROAD_DATA_REQ) {
- // Set query low to be past the last feature returned so that an area of extreme feature depth
- // is bypassed.
- query_low = cur_data.data[cur_data.data.length - 1][2] + 1;
+ // To get past an area of extreme feature depth, set query low to be after either
+ // (a) the maximum high or HACK/FIXME (b) the end of the last feature returned.
+ query_low = (cur_data.max_high ? cur_data.max_high : cur_data.data[cur_data.data.length - 1][2]) + 1;
}
//
@@ -463,6 +463,9 @@
// Update data and message.
if (result.data) {
result.data = cur_data.data.concat(result.data);
+ if (result.max_low) {
+ result.max_low = cur_data.max_low;
+ }
if (result.message) {
// HACK: replace number in message with current data length. Works but is ugly.
result.message = result.message.replace(/[0-9]+/, result.data.length);
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/cafb70f10379/
changeset: cafb70f10379
user: jgoecks
date: 2011-09-12 20:51:26
summary: Fix trackster bug in determining tile bounds and in documentation.
affected #: 1 file (0 bytes)
--- a/static/scripts/trackster.js Fri Sep 09 16:05:52 2011 -0400
+++ b/static/scripts/trackster.js Mon Sep 12 14:51:26 2011 -0400
@@ -2495,7 +2495,7 @@
var tile_low = tile_index * DENSITY * resolution,
tile_length = DENSITY * resolution,
// Tile high cannot be larger than view.max_high, which the chromosome length.
- tile_high = (tile_low + tile_length <= this.view.max ? tile_low + tile_length : this.view.max_high);
+ tile_high = (tile_low + tile_length <= this.view.max_high ? tile_low + tile_length : this.view.max_high);
return [tile_low, tile_high];
},
/**
@@ -2998,7 +2998,7 @@
* @param mode mode to draw in
* @param resolution view resolution
* @param tile_index index of tile to be drawn
- * @param w_scale base pairs per pixel
+ * @param w_scale pixels per base
* @param ref_seq reference sequence data
*/
draw_tile: function(result, mode, resolution, tile_index, w_scale, ref_seq) {
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/35063fa0b2cb/
changeset: 35063fa0b2cb
user: greg
date: 2011-09-09 22:05:52
summary: Two minor but important bug fixes in searching for and displaying tool shed repositories.
affected #: 2 files (513 bytes)
--- a/lib/galaxy/webapps/community/controllers/common.py Fri Sep 09 12:15:27 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/common.py Fri Sep 09 16:05:52 2011 -0400
@@ -380,7 +380,7 @@
return message, status
def get_repository_by_name( trans, name ):
"""Get a repository from the database via name"""
- return trans.sa_session.query( app.model.Repository ).filter_by( name=name ).one()
+ return trans.sa_session.query( trans.model.Repository ).filter_by( name=name ).one()
def get_changectx_for_changeset( trans, repo, changeset_revision, **kwd ):
"""Retrieve a specified changectx from a repository"""
for changeset in repo.changelog:
--- a/lib/galaxy/webapps/community/controllers/repository.py Fri Sep 09 12:15:27 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/repository.py Fri Sep 09 16:05:52 2011 -0400
@@ -241,6 +241,14 @@
# What we've done is rendered the search box for the RepositoryListGrid on the grid.mako
# template for the CategoryListGrid. See ~/templates/webapps/community/category/grid.mako.
# Since we are searching repositories and not categories, redirect to browse_repositories().
+ if 'id' in kwd and 'f-free-text-search' in kwd and kwd[ 'id' ] == kwd[ 'f-free-text-search' ]:
+ # The value of 'id' has been set to the search string, which is a repository name.
+ # We'll try to get the desired encoded repository id to pass on.
+ try:
+ repository = get_repository_by_name( trans, kwd[ 'id' ] )
+ kwd[ 'id' ] = trans.security.encode_id( repository.id )
+ except:
+ pass
return self.browse_repositories( trans, **kwd )
if 'operation' in kwd:
operation = kwd['operation'].lower()
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/a0a77ce93344/
changeset: a0a77ce93344
user: dan
date: 2011-09-09 18:15:27
summary: Fix tabs in secure_hash_message_digest.xml.
affected #: 1 file (12 bytes)
--- a/tools/filters/secure_hash_message_digest.xml Fri Sep 09 12:01:43 2011 -0400
+++ b/tools/filters/secure_hash_message_digest.xml Fri Sep 09 12:15:27 2011 -0400
@@ -2,10 +2,10 @@
<description>on a dataset</description><command interpreter="python">secure_hash_message_digest.py --input "${input1}" --output "${out_file1}"
#if $algorithms.value:
- #for $algorithm in str( $algorithms ).split( "," ):
- --algorithm "${algorithm}"
- #end for
- #end if
+ #for $algorithm in str( $algorithms ).split( "," ):
+ --algorithm "${algorithm}"
+ #end for
+ #end if
</command><inputs><param format="data" name="input1" type="data" label="Text file"/>
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/ea163dae4490/
changeset: ea163dae4490
user: dan
date: 2011-09-09 18:01:43
summary: Add tool for calculating Secure Hashes / Message Digests of a dataset using the user selected algorithms.
affected #: 4 files (59 bytes)
--- a/tool_conf.xml.sample Fri Sep 09 11:18:05 2011 -0400
+++ b/tool_conf.xml.sample Fri Sep 09 12:01:43 2011 -0400
@@ -56,6 +56,7 @@
<tool file="filters/tailWrapper.xml" /><tool file="filters/trimmer.xml" /><tool file="filters/wc_gnu.xml" />
+ <tool file="filters/secure_hash_message_digest.xml" /><tool file="stats/dna_filtering.xml" /><tool file="new_operations/tables_arithmetic_operations.xml" /></section>
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.