1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/0320a5b0d1a7/
changeset: r5086:0320a5b0d1a7
user: rc
date: 2011-02-18 17:18:52
summary: Backed out of changeset 5085:0ce482e2ec78
affected #: 1 file (244 bytes)
--- a/lib/galaxy/web/controllers/requests_common.py Fri Feb 18 10:49:46 2011 -0500
+++ b/lib/galaxy/web/controllers/requests_common.py Fri Feb 18 11:18:52 2011 -0500
@@ -445,7 +445,6 @@
kwd[ 'message' ] = message
handle_error( **kwd )
if params.get( 'save_samples_button', False ):
- samples = []
if encoded_selected_sample_ids:
# We need the list of displayable_sample_widgets to include the same number
# of objects that that request.samples has so that we can enumerate over each
@@ -453,6 +452,7 @@
# used the multi-select check boxes when editing sample widgets, but didn't
# select all of them. We'll first get the set of samples corresponding to the
# checked sample ids.
+ samples = []
selected_samples = []
for encoded_sample_id in encoded_selected_sample_ids:
sample = trans.sa_session.query( trans.model.Sample ).get( trans.security.decode_id( encoded_sample_id ) )
@@ -467,7 +467,7 @@
sample_widgets = self.__get_sample_widgets( trans, request, samples, **kwd )
else:
sample_widgets = displayable_sample_widgets
- return self.__save_samples( trans, cntrller, request, samples, sample_widgets, saving_new_samples=False, **kwd )
+ return self.__save_samples( trans, cntrller, request, sample_widgets, saving_new_samples=False, **kwd )
request_widgets = self.__get_request_widgets( trans, request.id )
sample_copy_select_field = self.__build_copy_sample_select_field( trans, displayable_sample_widgets )
libraries_select_field, folders_select_field = self.__build_library_and_folder_select_fields( trans,
@@ -806,8 +806,7 @@
elif params.get( 'add_sample_button', False ):
return self.add_sample( trans, cntrller, request_id, **kwd )
elif params.get( 'save_samples_button', False ):
- samples = []
- return self.__save_samples( trans, cntrller, request, samples, displayable_sample_widgets, saving_new_samples=True, **kwd )
+ return self.__save_samples( trans, cntrller, request, displayable_sample_widgets, saving_new_samples=True, **kwd )
request_widgets = self.__get_request_widgets( trans, request.id )
sample_copy_select_field = self.__build_copy_sample_select_field( trans, displayable_sample_widgets )
libraries_select_field, folders_select_field = self.__build_library_and_folder_select_fields( trans,
@@ -1084,7 +1083,7 @@
request_widgets=request_widgets,
displayable_sample_widgets=displayable_sample_widgets,
sample_copy_select_field=sample_copy_select_field )
- def __save_samples( self, trans, cntrller, request, samples, sample_widgets, saving_new_samples=False, **kwd ):
+ def __save_samples( self, trans, cntrller, request, samples, saving_new_samples=False, **kwd ):
# Here we handle saving all new samples added by the user as well as saving
# changes to any subset of the request's samples. A sample will not have an
# associated SampleState until the request is submitted, at which time the
@@ -1100,7 +1099,7 @@
else:
redirect_action = 'edit_samples'
# Check for duplicate sample names within the request
- self.__validate_sample_names( trans, cntrller, request, sample_widgets, **kwd )
+ self.__validate_sample_names( trans, cntrller, request, samples, **kwd )
if not saving_new_samples:
library = None
folder = None
@@ -1129,16 +1128,17 @@
# TODO: make changes necessary to just send the samples...
encoded_selected_sample_ids = self.__get_encoded_selected_sample_ids( trans, request, **kwd )
# Make sure all samples have a unique bar_code if the state is changing
- for sample_index, sample in enumerate( samples ):
- if sample is None:
+ for sample_index in range( len( samples ) ):
+ current_sample = samples[ sample_index ]
+ if current_sample is None:
# We have a None value because the user did not select this sample
# on which to perform the action.
continue
- current_sample = sample_widgets[ sample_index ]
+ request_sample = request.samples[ sample_index ]
bar_code = current_sample[ 'bar_code' ]
if bar_code:
# If the sample has a new bar_code, make sure it is unique.
- bc_message = self.__validate_bar_code( trans, sample, bar_code )
+ bc_message = self.__validate_bar_code( trans, request_sample, bar_code )
if bc_message:
message += bc_message
kwd[ 'message' ] = message
@@ -1153,15 +1153,11 @@
library_id = params.get( 'sample_operation_library_id', 'none' )
folder_id = params.get( 'sample_operation_folder_id', 'none' )
library, folder = self.__get_library_and_folder( trans, library_id, folder_id )
- for sample_index, sample in enumerate( samples ):
- if sample is None:
- # We have a None value because the user did not select this sample
- # on which to perform the action.
- continue
- current_sample = sample_widgets[ sample_index ]
+ for sample_index in range( len( samples ) ):
+ current_sample = samples[ sample_index ]
current_sample[ 'library' ] = library
current_sample[ 'folder' ] = folder
- self.__update_samples( trans, cntrller, request, sample_widgets, **kwd )
+ self.__update_samples( trans, cntrller, request, samples, **kwd )
message = 'Changes made to the samples have been saved. '
else:
# Saving a newly created sample. The sample will not have an associated SampleState
@@ -1169,9 +1165,9 @@
# set to the first SampleState configured for the request's RequestType configured
# by the admin ( i.e., the sample's SampleState would be set to request.type.states[0] ).
new_samples = []
- for index in range( len( sample_widgets ) - len( request.samples ) ):
+ for index in range( len( samples ) - len( request.samples ) ):
sample_index = len( request.samples )
- sample_widget = sample_widgets[ sample_index ]
+ sample_widget = samples[ sample_index ]
form_values = trans.model.FormValues( request.type.sample_form, sample_widget[ 'field_values' ] )
trans.sa_session.add( form_values )
trans.sa_session.flush()
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/0ce482e2ec78/
changeset: r5085:0ce482e2ec78
user: rc
date: 2011-02-18 16:49:46
summary: bug fix: bulk operations on samples for changing target data libraries was broken
affected #: 1 file (244 bytes)
--- a/lib/galaxy/web/controllers/requests_common.py Fri Feb 18 10:42:13 2011 -0500
+++ b/lib/galaxy/web/controllers/requests_common.py Fri Feb 18 10:49:46 2011 -0500
@@ -445,6 +445,7 @@
kwd[ 'message' ] = message
handle_error( **kwd )
if params.get( 'save_samples_button', False ):
+ samples = []
if encoded_selected_sample_ids:
# We need the list of displayable_sample_widgets to include the same number
# of objects that that request.samples has so that we can enumerate over each
@@ -452,7 +453,6 @@
# used the multi-select check boxes when editing sample widgets, but didn't
# select all of them. We'll first get the set of samples corresponding to the
# checked sample ids.
- samples = []
selected_samples = []
for encoded_sample_id in encoded_selected_sample_ids:
sample = trans.sa_session.query( trans.model.Sample ).get( trans.security.decode_id( encoded_sample_id ) )
@@ -467,7 +467,7 @@
sample_widgets = self.__get_sample_widgets( trans, request, samples, **kwd )
else:
sample_widgets = displayable_sample_widgets
- return self.__save_samples( trans, cntrller, request, sample_widgets, saving_new_samples=False, **kwd )
+ return self.__save_samples( trans, cntrller, request, samples, sample_widgets, saving_new_samples=False, **kwd )
request_widgets = self.__get_request_widgets( trans, request.id )
sample_copy_select_field = self.__build_copy_sample_select_field( trans, displayable_sample_widgets )
libraries_select_field, folders_select_field = self.__build_library_and_folder_select_fields( trans,
@@ -806,7 +806,8 @@
elif params.get( 'add_sample_button', False ):
return self.add_sample( trans, cntrller, request_id, **kwd )
elif params.get( 'save_samples_button', False ):
- return self.__save_samples( trans, cntrller, request, displayable_sample_widgets, saving_new_samples=True, **kwd )
+ samples = []
+ return self.__save_samples( trans, cntrller, request, samples, displayable_sample_widgets, saving_new_samples=True, **kwd )
request_widgets = self.__get_request_widgets( trans, request.id )
sample_copy_select_field = self.__build_copy_sample_select_field( trans, displayable_sample_widgets )
libraries_select_field, folders_select_field = self.__build_library_and_folder_select_fields( trans,
@@ -1083,7 +1084,7 @@
request_widgets=request_widgets,
displayable_sample_widgets=displayable_sample_widgets,
sample_copy_select_field=sample_copy_select_field )
- def __save_samples( self, trans, cntrller, request, samples, saving_new_samples=False, **kwd ):
+ def __save_samples( self, trans, cntrller, request, samples, sample_widgets, saving_new_samples=False, **kwd ):
# Here we handle saving all new samples added by the user as well as saving
# changes to any subset of the request's samples. A sample will not have an
# associated SampleState until the request is submitted, at which time the
@@ -1099,7 +1100,7 @@
else:
redirect_action = 'edit_samples'
# Check for duplicate sample names within the request
- self.__validate_sample_names( trans, cntrller, request, samples, **kwd )
+ self.__validate_sample_names( trans, cntrller, request, sample_widgets, **kwd )
if not saving_new_samples:
library = None
folder = None
@@ -1128,17 +1129,16 @@
# TODO: make changes necessary to just send the samples...
encoded_selected_sample_ids = self.__get_encoded_selected_sample_ids( trans, request, **kwd )
# Make sure all samples have a unique bar_code if the state is changing
- for sample_index in range( len( samples ) ):
- current_sample = samples[ sample_index ]
- if current_sample is None:
+ for sample_index, sample in enumerate( samples ):
+ if sample is None:
# We have a None value because the user did not select this sample
# on which to perform the action.
continue
- request_sample = request.samples[ sample_index ]
+ current_sample = sample_widgets[ sample_index ]
bar_code = current_sample[ 'bar_code' ]
if bar_code:
# If the sample has a new bar_code, make sure it is unique.
- bc_message = self.__validate_bar_code( trans, request_sample, bar_code )
+ bc_message = self.__validate_bar_code( trans, sample, bar_code )
if bc_message:
message += bc_message
kwd[ 'message' ] = message
@@ -1153,11 +1153,15 @@
library_id = params.get( 'sample_operation_library_id', 'none' )
folder_id = params.get( 'sample_operation_folder_id', 'none' )
library, folder = self.__get_library_and_folder( trans, library_id, folder_id )
- for sample_index in range( len( samples ) ):
- current_sample = samples[ sample_index ]
+ for sample_index, sample in enumerate( samples ):
+ if sample is None:
+ # We have a None value because the user did not select this sample
+ # on which to perform the action.
+ continue
+ current_sample = sample_widgets[ sample_index ]
current_sample[ 'library' ] = library
current_sample[ 'folder' ] = folder
- self.__update_samples( trans, cntrller, request, samples, **kwd )
+ self.__update_samples( trans, cntrller, request, sample_widgets, **kwd )
message = 'Changes made to the samples have been saved. '
else:
# Saving a newly created sample. The sample will not have an associated SampleState
@@ -1165,9 +1169,9 @@
# set to the first SampleState configured for the request's RequestType configured
# by the admin ( i.e., the sample's SampleState would be set to request.type.states[0] ).
new_samples = []
- for index in range( len( samples ) - len( request.samples ) ):
+ for index in range( len( sample_widgets ) - len( request.samples ) ):
sample_index = len( request.samples )
- sample_widget = samples[ sample_index ]
+ sample_widget = sample_widgets[ sample_index ]
form_values = trans.model.FormValues( request.type.sample_form, sample_widget[ 'field_values' ] )
trans.sa_session.add( form_values )
trans.sa_session.flush()
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/e7bc439ef1dd/
changeset: r5084:e7bc439ef1dd
user: dan
date: 2011-02-18 16:42:13
summary: Fix typo in Intersect tool description.
affected #: 1 file (0 bytes)
--- a/tools/new_operations/intersect.xml Thu Feb 17 17:21:54 2011 -0500
+++ b/tools/new_operations/intersect.xml Fri Feb 18 10:42:13 2011 -0500
@@ -1,5 +1,5 @@
<tool id="gops_intersect_1" name="Intersect">
- <description>the intervals of two datastes</description>
+ <description>the intervals of two datasets</description><command interpreter="python">gops_intersect.py
$input1 $input2 $output
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/144e064fa5c5/
changeset: r5079:144e064fa5c5
user: jgoecks
date: 2011-02-17 20:25:56
summary: Set default value for Cuffdiff's minimum alignment count parameter to reflect v0.9.3
affected #: 1 file (3 bytes)
--- a/tools/ngs_rna/cuffdiff_wrapper.xml Thu Feb 17 13:57:38 2011 -0500
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml Thu Feb 17 14:25:56 2011 -0500
@@ -90,7 +90,7 @@
<param name="fdr" type="float" value="0.05" label="False Discovery Rate" help="The allowed false discovery rate."/><param name="min_mapqual" type="integer" value="0" label="Min SAM Mapping Quality" help="Instructs Cufflinks to ignore alignments with a SAM mapping quality lower than this number."/>
- <param name="min_alignment_count" type="integer" value="0" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/>
+ <param name="min_alignment_count" type="integer" value="1000" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/><param name="do_normalization" type="select" label="Perform quartile normalization" help="Removes top 25% of genes from FPKM denominator to improve accuracy of differential expression calls for low abundance transcripts."><option value="No">No</option><option value="Yes">Yes</option>
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/d83fa80e8321/
changeset: r5078:d83fa80e8321
user: natefoo
date: 2011-02-17 19:57:38
summary: Fix displaying the stdout/stderr of a library upload when the stdout/stderr is None
affected #: 1 file (30 bytes)
--- a/templates/library/common/ldda_info.mako Thu Feb 17 12:05:39 2011 -0500
+++ b/templates/library/common/ldda_info.mako Thu Feb 17 13:57:38 2011 -0500
@@ -117,14 +117,14 @@
</div>
%if ldda.creating_job_associations:
<% job = ldda.creating_job_associations[0].job %>
- %if job.stdout.strip() != '':
+ %if job.stdout and job.stdout.strip() != '':
<div class="form-row"><label>Job Standard Output</label><pre>${job.stdout}</pre><div style="clear: both"></div></div>
%endif
- %if job.stderr.strip() != '':
+ %if job.stderr and job.stderr.strip() != '':
<div class="form-row"><label>Job Standard Error</label><pre>${job.stderr}</pre>
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/2a3b27d59bd3/
changeset: r5077:2a3b27d59bd3
user: dannon
date: 2011-02-17 18:05:39
summary: Adjustment to dataset line estimation.
Estimate is now rounded to only the first two digits, like: ~65,000 lines, to make it clearer that it's an estimate.
Will no longer try to estimate for small files, however they ended up without lines set.
affected #: 3 files (757 bytes)
--- a/lib/galaxy/datatypes/data.py Thu Feb 17 08:45:09 2011 -0500
+++ b/lib/galaxy/datatypes/data.py Thu Feb 17 12:05:39 2011 -0500
@@ -388,7 +388,23 @@
return 'text/plain'
def set_meta( self, dataset, **kwd ):
"""
- Set the number of lines of data in dataset,
+ Set the number of lines of data in dataset.
+ """
+ dataset.metadata.data_lines = self.count_data_lines(dataset)
+ def estimate_file_lines( self, dataset ):
+ """
+ Perform a rough estimate by extrapolating number of lines from a small read.
+ """
+ sample_size = 1048576
+ dataset_fh = open( dataset.file_name )
+ dataset_read = dataset_fh.read(sample_size)
+ dataset_fh.close()
+ sample_lines = dataset_read.count('\n')
+ est_lines = int(sample_lines * (float(dataset.get_size()) / float(sample_size)))
+ return est_lines
+ def count_data_lines(self, dataset):
+ """
+ Count the number of lines of data in dataset,
skipping all blank lines and comments.
"""
data_lines = 0
@@ -396,16 +412,7 @@
line = line.strip()
if line and not line.startswith( '#' ):
data_lines += 1
- dataset.metadata.data_lines = data_lines
- def estimate_file_lines( self, dataset ):
- # Perform a rough estimate by extrapolating number of lines from a small read.
- sample_size = 1048576
- dataset_fh = open( dataset.file_name )
- dataset_read = dataset_fh.read(sample_size)
- dataset_fh.close()
- sample_lines = dataset_read.count('\n')
- est_lines = int(sample_lines * (float(dataset.get_size()) / float(sample_size)))
- return est_lines
+ return data_lines
def set_peek( self, dataset, line_count=None, is_multi_byte=False ):
if not dataset.dataset.purged:
# The file must exist on disk for the get_file_peek() method
@@ -418,8 +425,13 @@
# Number of lines is not known ( this should not happen ), and auto-detect is
# needed to set metadata
# This can happen when the file is larger than max_optional_metadata_filesize.
- est_lines = self.estimate_file_lines(dataset)
- dataset.blurb = "~%s %s" % ( util.commaify(str(est_lines)), inflector.cond_plural(est_lines, "line") )
+ if int(dataset.get_size()) <= 1048576:
+ #Small dataset, recount all lines and reset peek afterward.
+ dataset.metadata.data_lines = self.count_data_lines(dataset)
+ self.set_peek(dataset)
+ else:
+ est_lines = self.estimate_file_lines(dataset)
+ dataset.blurb = "~%s %s" % ( util.commaify(util.roundify(str(est_lines))), inflector.cond_plural(est_lines, "line") )
else:
dataset.blurb = "%s %s" % util.commaify( str(line_count) ), inflector.cond_plural(line_count, "line")
else:
--- a/lib/galaxy/datatypes/interval.py Thu Feb 17 08:45:09 2011 -0500
+++ b/lib/galaxy/datatypes/interval.py Thu Feb 17 12:05:39 2011 -0500
@@ -71,7 +71,7 @@
else:
# Number of lines is not known ( this should not happen ), and auto-detect is
# needed to set metadata
- dataset.blurb = "~%s regions" % util.commaify( str( self.estimate_file_lines(dataset) ) )
+ dataset.blurb = "~%s regions" % util.commaify(util.roundify(str(self.estimate_file_lines(dataset))))
else:
dataset.blurb = "%s regions" % util.commaify( str( line_count ) )
else:
--- a/lib/galaxy/util/__init__.py Thu Feb 17 08:45:09 2011 -0500
+++ b/lib/galaxy/util/__init__.py Thu Feb 17 12:05:39 2011 -0500
@@ -298,7 +298,16 @@
return new
else:
return commaify(new)
-
+
+def roundify(amount, sfs = 2):
+ """
+ Take a number in string form and truncate to 'sfs' significant figures.
+ """
+ if len(amount) <= sfs:
+ return amount
+ else:
+ return amount[0:sfs] + '0'*(len(amount) - sfs)
+
def object_to_string( obj ):
return binascii.hexlify( pickle.dumps( obj, 2 ) )
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/bae2fec3cb1b/
changeset: r5076:bae2fec3cb1b
user: dan
date: 2011-02-17 14:45:09
summary: Add wc tool to tool_conf.xml.main
affected #: 1 file (38 bytes)
--- a/tool_conf.xml.main Wed Feb 16 21:46:23 2011 -0500
+++ b/tool_conf.xml.main Thu Feb 17 08:45:09 2011 -0500
@@ -42,7 +42,8 @@
<tool file="filters/randomlines.xml" /><tool file="filters/headWrapper.xml" /><tool file="filters/tailWrapper.xml" />
- <tool file="filters/trimmer.xml" />
+ <tool file="filters/trimmer.xml" />
+ <tool file="filters/wc_gnu.xml" /></section><section name="Convert Formats" id="convert"><tool file="filters/bed2gff.xml" />
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.