1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c802de6bf0ba/
changeset: c802de6bf0ba
user: jgoecks
date: 2013-01-11 15:14:21
summary: Fixes for loading embedded grids in Trackster.
affected #: 1 file
diff -r 790d86fdc5a5fd7b5de2683ca07c0665094bb73e -r c802de6bf0ba697d9a5038ab41dfa1425f0c296f templates/tracks/history_select_grid.mako
--- a/templates/tracks/history_select_grid.mako
+++ b/templates/tracks/history_select_grid.mako
@@ -10,21 +10,20 @@
<%def name="select_header()"><script type="text/javascript">
- // Handle all label clicks.
- var f = function() {
+ // Load all grid URLs into modal-body element so that
+ // grid + links stays embedded.
+ var load_urls_into_modal_body = function() {
$(".addtracktab, #grid-table a").click(function() {
- var parent_body = $(".divider").parent();
- if (parent_body.length !== 0) {
- parent_body.load($(this).attr("href"));
- f();
+ var modal_body = $(".modal-body");
+ if (modal_body.length !== 0) {
+ modal_body.load($(this).attr("href"));
return false;
}
});
};
// Need to process label URLs when document loaded and when grid changes.
$(document).ready(function() {
- f();
- // $('#grid-table-body').bind('update', f);
+ load_urls_into_modal_body();
});
</script><style>
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/790d86fdc5a5/
changeset: 790d86fdc5a5
user: clements
date: 2013-01-10 23:01:02
summary: Updated default text at bottom of welcome page that comes up when you first launch your own Galaxy.
affected #: 2 files
diff -r 674273be9a1ffba71ce15462a9f5efd5569503a7 -r 790d86fdc5a5fd7b5de2683ca07c0665094bb73e static/welcome.html.sample
--- a/static/welcome.html.sample
+++ b/static/welcome.html.sample
@@ -15,7 +15,8 @@
<br/><img src="images/noodles.png" alt="WWFSMD?" style="display: block; margin-left: auto; margin-right: auto;" /><hr/>
- This project is supported in part by <a target="_blank" class="reference" href="http://www.nsf.gov">NSF</a>, <a target="_blank" class="reference" href="http://www.genome.gov">NHGRI</a>, and <a target="_blank" class="reference" href="http://www.huck.psu.edu">the Huck Institutes of the Life Sciences</a>.
+ <a target="_blank" class="reference" href="http://galaxyproject.org/">Galaxy</a> is an open, web-based platform for data intensive biomedical research. The <a target="_blank" class="reference" href="http://wiki.galaxyproject.org/GalaxyTeam">Galaxy team</a> is a part of <a target="_blank" class="reference" href="http://www.bx.psu.edu">BX</a> at <a target="_blank" class="reference" href="http://www.psu.edu">Penn State</a>, and the <a target="_blank" class="reference" href="http://www.biology.emory.edu/">Biology</a> and <a target="_blank" class="reference" href="http://www.mathcs.emory.edu/">Mathematics and Computer Science</a> departments at <a target="_blank" class="reference" href="http://www.emory.edu/">Emory University</a>. The <a target="_blank" class="reference" href="http://galaxyproject.org/">Galaxy Project</a> is supported in part by <a target="_blank" class="reference" href="http://www.genome.gov">NHGRI</a>, <a target="_blank" class="reference" href="http://www.nsf.gov">NSF</a>, <a target="_blank" class="reference" href="http://www.huck.psu.edu">The Huck Institutes of the Life Sciences</a>, <a target="_blank" class="reference" href="http://www.ics.psu.edu">The Institute for CyberScience at Penn State</a>, and <a target="_blank" class="reference" href="http://www.emory.edu/">Emory University</a>.</p>
+
</div></body></html>
diff -r 674273be9a1ffba71ce15462a9f5efd5569503a7 -r 790d86fdc5a5fd7b5de2683ca07c0665094bb73e static/welcome.rst
--- a/static/welcome.rst
+++ b/static/welcome.rst
@@ -24,24 +24,35 @@
==========
* `Galaxy documentation`__
-* `Galaxy wiki page`__
-* `People and Technology behind Galaxy`__
-* Report bugs and problems to Galaxy mailing list: `galaxy(a)bx.psu.edu`__
+* `Galaxy wiki`__
+* Report bugs and problems to Galaxy mailing list: `galaxy-dev(a)bx.psu.edu`__
.. __: /static/help.html
-.. __: http://www.bx.psu.edu/cgi-bin/trac.cgi
-.. __: http://wiki.g2.bx.psu.edu/Galaxy%20Team
-.. __: mailto:galaxy@bx.psu.edu
+.. __: http://wiki.galaxyproject.org/
+.. __: mailto:galaxy-dev@bx.psu.edu
Version: <b>2.1</b> Revision: <b>$Rev$</b>
-----
-The Galaxy team is a part of the `Center for Comparative Genomics and Bioinformatics`__ at `Penn State`__.
+`Galaxy`__ is an open, web-based platform for data intensive biomedical research on which you can perform, reproduce, and share complete analyses. The `Galaxy team`__ is a part of the `Center for Comparative Genomics and Bioinformatics`__ at `Penn State`__, and the `Biology`__ and `Mathematics and Computer Science`__ departments at `Emory University`__. The `Galaxy Project`__ is supported in part by `NHGRI`__, `NSF`__, `The Huck Institutes of the Life Sciences`__, `The Institute for CyberScience at Penn State`__, and `Emory University`__.
+The Galaxy team is a part of the
+
+.. __: http://galaxyproject.org/
+.. __: http://wiki.galaxyproject.org/GalaxyTeam
.. __: http://www.bx.psu.edu
.. __: http://www.psu.edu
+.. __: http://www.biology.emory.edu/
+.. __: http://www.mathcs.emory.edu/
+.. __: http://www.emory.edu/
+.. __: http://galaxyproject.org/
+.. __: http://www.genome.gov/
+.. __: http://www.nsf.gov/
+.. __: http://www.huck.psu.edu/
+.. __: http://www.ics.psu.edu/
+.. __: http://www.emory.edu/
-----
-Galaxy build 502
\ No newline at end of file
+Galaxy build 502
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/674273be9a1f/
changeset: 674273be9a1f
user: clements
date: 2013-01-10 22:22:08
summary: Updated license to Academic Free License v3.0.
affected #: 1 file
diff -r 58851b49011218dbb11370392bbc03f9b1e69a9f -r 674273be9a1ffba71ce1546=
2a9f5efd5569503a7 LICENSE.txt
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,25 +1,57 @@
-Copyright (c) 2005 Pennsylvania State University
+Copyright (c) 2005-2013 Pennsylvania State University
=20
-Permission is hereby granted, free of charge, to any person obtaining=20
-a copy of this software and associated documentation files (the=20
-"Software"), to deal in the Software without restriction, including=20
-without limitation the rights to use, copy, modify, merge, publish,=20
-distribute, sublicense, and/or sell copies of the Software, and to=20
-permit persons to whom the Software is furnished to do so, subject to=20
-the following conditions:
+Licensed under the Academic Free License version 3.0
=20
-The above copyright notice and this permission notice shall be=20
-included in all copies or substantial portions of the Software.
+1) Grant of Copyright License. Licensor grants You a worldwide, royalty-fr=
ee, non-exclusive, sublicensable license, for the duration of the copyright=
, to do the following:
=20
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,=20
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF=20
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.=20
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY=20
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,=20
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE=20
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.=20
+a) to reproduce the Original Work in copies, either alone or as part of a =
collective work;
+
+b) to translate, adapt, alter, transform, modify, or arrange the Original =
Work, thereby creating derivative works ("Derivative Works") based upon the=
Original Work;
+
+c) to distribute or communicate copies of the Original Work and Derivative=
Works to the public, under any license of your choice that does not contra=
dict the terms and conditions, including Licensor's reserved rights and rem=
edies, in this Academic Free License;
+
+d) to perform the Original Work publicly; and
+
+e) to display the Original Work publicly.
+
+2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,=
non-exclusive, sublicensable license, under patent claims owned or control=
led by the Licensor that are embodied in the Original Work as furnished by =
the Licensor, for the duration of the patents, to make, use, sell, offer fo=
r sale, have made, and import the Original Work and Derivative Works.
+
+3) Grant of Source Code License. The term "Source Code" means the preferre=
d form of the Original Work for making modifications to it and all availabl=
e documentation describing how to modify the Original Work. Licensor agrees=
to provide a machine-readable copy of the Source Code of the Original Work=
along with each copy of the Original Work that Licensor distributes. Licen=
sor reserves the right to satisfy this obligation by placing a machine-read=
able copy of the Source Code in an information repository reasonably calcul=
ated to permit inexpensive and convenient access by You for as long as Lice=
nsor continues to distribute the Original Work.
+
+4) Exclusions From License Grant. Neither the names of Licensor, nor the n=
ames of any contributors to the Original Work, nor any of their trademarks =
or service marks, may be used to endorse or promote products derived from t=
his Original Work without express prior permission of the Licensor. Except =
as expressly stated herein, nothing in this License grants any license to L=
icensor's trademarks, copyrights, patents, trade secrets or any other intel=
lectual property. No patent license is granted to make, use, sell, offer fo=
r sale, have made, or import embodiments of any patent claims other than th=
e licensed claims defined in Section 2. No license is granted to the tradem=
arks of Licensor even if such marks are included in the Original Work. Noth=
ing in this License shall be interpreted to prohibit Licensor from licensin=
g under terms different from this License any Original Work that Licensor o=
therwise would have a right to license.
+
+5) External Deployment. The term "External Deployment" means the use, dist=
ribution, or communication of the Original Work or Derivative Works in any =
way such that the Original Work or Derivative Works may be used by anyone o=
ther than You, whether those works are distributed or communicated to those=
persons or made available as an application intended for use over a networ=
k. As an express condition for the grants of license hereunder, You must tr=
eat any External Deployment by You of the Original Work or a Derivative Wor=
k as a distribution under section 1(c).
+
+6) Attribution Rights. You must retain, in the Source Code of any Derivati=
ve Works that You create, all copyright, patent, or trademark notices from =
the Source Code of the Original Work, as well as any notices of licensing a=
nd any descriptive text identified therein as an "Attribution Notice." You =
must cause the Source Code for any Derivative Works that You create to carr=
y a prominent Attribution Notice reasonably calculated to inform recipients=
that You have modified the Original Work.
+
+7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants th=
at the copyright in and to the Original Work and the patent rights granted =
herein by Licensor are owned by the Licensor or are sublicensed to You unde=
r the terms of this License with the permission of the contributor(s) of th=
ose copyrights and patent rights. Except as expressly stated in the immedia=
tely preceding sentence, the Original Work is provided under this License o=
n an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, includi=
ng, without limitation, the warranties of non-infringement, merchantability=
or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF =
THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an e=
ssential part of this License. No license to the Original Work is granted b=
y this License except under this disclaimer.
+
+8) Limitation of Liability. Under no circumstances and under no legal theo=
ry, whether in tort (including negligence), contract, or otherwise, shall t=
he Licensor be liable to anyone for any indirect, special, incidental, or c=
onsequential damages of any character arising as a result of this License o=
r the use of the Original Work including, without limitation, damages for l=
oss of goodwill, work stoppage, computer failure or malfunction, or any and=
all other commercial damages or losses. This limitation of liability shall=
not apply to the extent applicable law prohibits such limitation.
+
+9) Acceptance and Termination. If, at any time, You expressly assented to =
this License, that assent indicates your clear and irrevocable acceptance o=
f this License and all of its terms and conditions. If You distribute or co=
mmunicate copies of the Original Work or a Derivative Work, You must make a=
reasonable effort under the circumstances to obtain the express assent of =
recipients to the terms of this License. This License conditions your right=
s to undertake the activities listed in Section 1, including your right to =
create Derivative Works based upon the Original Work, and doing so without =
honoring these terms and conditions is prohibited by copyright law and inte=
rnational treaty. Nothing in this License is intended to affect copyright e=
xceptions and limitations (including "fair use" or "fair dealing"). This Li=
cense shall terminate immediately and You may no longer exercise any of the=
rights granted to You by this License upon your failure to honor the condi=
tions in Section 1(c).
+
+10) Termination for Patent Action. This License shall terminate automatica=
lly and You may no longer exercise any of the rights granted to You by this=
License as of the date You commence an action, including a cross-claim or =
counterclaim, against Licensor or any licensee alleging that the Original W=
ork infringes a patent. This termination provision shall not apply for an a=
ction alleging patent infringement by combinations of the Original Work wit=
h other software or hardware.
+
+11) Jurisdiction, Venue and Governing Law. Any action or suit relating to =
this License may be brought only in the courts of a jurisdiction wherein th=
e Licensor resides or in which Licensor conducts its primary business, and =
under the laws of that jurisdiction excluding its conflict-of-law provision=
s. The application of the United Nations Convention on Contracts for the In=
ternational Sale of Goods is expressly excluded. Any use of the Original Wo=
rk outside the scope of this License or after its termination shall be subj=
ect to the requirements and penalties of copyright or patent law in the app=
ropriate jurisdiction. This section shall survive the termination of this L=
icense.
+
+12) Attorneys' Fees. In any action to enforce the terms of this License or=
seeking damages relating thereto, the prevailing party shall be entitled t=
o recover its costs and expenses, including, without limitation, reasonable=
attorneys' fees and costs incurred in connection with such action, includi=
ng any appeal of such action. This section shall survive the termination of=
this License.
+
+13) Miscellaneous. If any provision of this License is held to be unenforc=
eable, such provision shall be reformed only to the extent necessary to mak=
e it enforceable.
+
+14) Definition of "You" in This License. "You" throughout this License, wh=
ether in upper or lower case, means an individual or a legal entity exercis=
ing rights under, and complying with all of the terms of, this License. For=
legal entities, "You" includes any entity that controls, is controlled by,=
or is under common control with you. For purposes of this definition, "con=
trol" means (i) the power, direct or indirect, to cause the direction or ma=
nagement of such entity, whether by contract or otherwise, or (ii) ownershi=
p of fifty percent (50%) or more of the outstanding shares, or (iii) benefi=
cial ownership of such entity.
+
+15) Right to Use. You may use the Original Work in all ways not otherwise =
restricted or conditioned by this License or by law, and Licensor promises =
not to interfere with or be responsible for such uses by You.
+
+16) Modification of This License. This License is Copyright =C2=A9 2005 La=
wrence Rosen. Permission is granted to copy, distribute, or communicate thi=
s License without modification. Nothing in this License permits You to modi=
fy this License as applied to the Original Work or to Derivative Works. How=
ever, You may modify the text of this License and copy, distribute or commu=
nicate your modified version (the "Modified License") and apply it to other=
original works of authorship subject to the following conditions: (i) You =
may not indicate in any way that your Modified License is the "Academic Fre=
e License" or "AFL" and you may not use those names in the name of your Mod=
ified License; (ii) You must replace the notice specified in the first para=
graph above with the notice "Licensed under <insert your license name here>=
" or with a notice of your own that is not confusingly similar to the notic=
e in this License; and (iii) You may not claim that your original works are=
open source software unless your Modified License has been approved by Ope=
n Source Initiative (OSI) and You comply with its license review and certif=
ication process.
+
+A brief explanation of this license is available: http://www.rosenlaw.com/=
OSL3.0-explained.pdf
=20
Some icons found in Galaxy are from the Silk Icons set, available under
the Creative Commons Attribution 2.5 License, from:
=20
http://www.famfamfam.com/lab/icons/silk/
+
+
+Other images and documentation are licensed under the Creative Commons Att=
ribution 3.0 (CC BY 3.0) License. See=20
+
+http://creativecommons.org/licenses/by/3.0/
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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a4113cc1cb5e/
changeset: a4113cc1cb5e
user: dan
date: 2013-01-10 20:57:37
summary: Fixes for Tool.check_and_update_param_values_helper() to check that the type of value provided is valid for the input parameter currently declared. Fixes an issue where rurun would select the wrong input dataset.
affected #: 6 files
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -2128,16 +2128,16 @@
return params_to_strings( self.inputs, params, app )
def params_from_strings( self, params, app, ignore_errors=False ):
return params_from_strings( self.inputs, params, app, ignore_errors )
- def check_and_update_param_values( self, values, trans ):
+ def check_and_update_param_values( self, values, trans, update_values=True ):
"""
Check that all parameters have values, and fill in with default
values where necessary. This could be called after loading values
from a database in case new parameters have been added.
"""
messages = {}
- self.check_and_update_param_values_helper( self.inputs, values, trans, messages )
+ self.check_and_update_param_values_helper( self.inputs, values, trans, messages, update_values=update_values )
return messages
- def check_and_update_param_values_helper( self, inputs, values, trans, messages, context=None, prefix="" ):
+ def check_and_update_param_values_helper( self, inputs, values, trans, messages, context=None, prefix="", update_values=True ):
"""
Recursive helper for `check_and_update_param_values_helper`
"""
@@ -2183,10 +2183,11 @@
# Regular tool parameter, no recursion needed
try:
#this will fail when a parameter's type has changed to a non-compatible one: e.g. conditional group changed to dataset input
- input.value_from_basic( values[ input.name ], trans.app, ignore_errors=False )
+ input.value_from_basic( input.value_to_basic( values[ input.name ], trans.app ), trans.app, ignore_errors=False )
except:
messages[ input.name ] = "Value no longer valid for '%s%s', replaced with default" % ( prefix, input.label )
- values[ input.name ] = input.get_initial_value( trans, context )
+ if update_values:
+ values[ input.name ] = input.get_initial_value( trans, context )
def handle_unvalidated_param_values( self, input_values, app ):
"""
Find any instances of `UnvalidatedValue` within input_values and
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -747,9 +747,9 @@
return { "__class__": "RuntimeValue" }
return value
def value_from_basic( self, value, app, ignore_errors=False ):
- if isinstance( value, dict ) and value["__class__"] == "UnvalidatedValue":
+ if isinstance( value, dict ) and value.get( "__class__", None ) == "UnvalidatedValue":
return UnvalidatedValue( value["value"] )
- return super( SelectToolParameter, self ).value_from_basic( value, app )
+ return super( SelectToolParameter, self ).value_from_basic( value, app, ignore_errors=ignore_errors )
def need_late_validation( self, trans, context ):
"""
Determine whether we need to wait to validate this parameters value
@@ -943,7 +943,7 @@
if not isinstance( value, list ):
value = value.split( '\n' )
for column in value:
- for column2 in column.split( ',' ):
+ for column2 in str( column ).split( ',' ):
column2 = column2.strip()
if column2:
column_list.append( column2 )
@@ -1586,8 +1586,11 @@
elif isinstance( value, list) and len(value) > 0 and isinstance( value[0], DummyDataset):
return None
elif isinstance( value, list ):
- return ",".join( [ val if isinstance( val, basestring ) else str(val.id) for val in value] )
- return value.id
+ return ",".join( [ str( self.to_string( val, app ) ) for val in value ] )
+ try:
+ return value.id
+ except:
+ return str( value )
def to_python( self, value, app ):
# Both of these values indicate that no dataset is selected. However, 'None'
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/tools/parameters/grouping.py
--- a/lib/galaxy/tools/parameters/grouping.py
+++ b/lib/galaxy/tools/parameters/grouping.py
@@ -68,21 +68,25 @@
return rval
def value_from_basic( self, value, app, ignore_errors=False ):
rval = []
- for i, d in enumerate( value ):
- rval_dict = {}
- # If the special __index__ key is not set, create it (for backward
- # compatibility)
- rval_dict['__index__'] = d.get( '__index__', i )
- # Restore child inputs
- for input in self.inputs.itervalues():
- if ignore_errors and input.name not in d:
- # If we do not have a value, and are ignoring errors, we simply
- # do nothing. There will be no value for the parameter in the
- # conditional's values dictionary.
- pass
- else:
- rval_dict[ input.name ] = input.value_from_basic( d[input.name], app, ignore_errors )
- rval.append( rval_dict )
+ try:
+ for i, d in enumerate( value ):
+ rval_dict = {}
+ # If the special __index__ key is not set, create it (for backward
+ # compatibility)
+ rval_dict['__index__'] = d.get( '__index__', i )
+ # Restore child inputs
+ for input in self.inputs.itervalues():
+ if ignore_errors and input.name not in d:
+ # If we do not have a value, and are ignoring errors, we simply
+ # do nothing. There will be no value for the parameter in the
+ # conditional's values dictionary.
+ pass
+ else:
+ rval_dict[ input.name ] = input.value_from_basic( d[input.name], app, ignore_errors )
+ rval.append( rval_dict )
+ except Exception, e:
+ if not ignore_errors:
+ raise e
return rval
def visit_inputs( self, prefix, value, callback ):
for i, d in enumerate( value ):
@@ -441,24 +445,28 @@
return rval
def value_from_basic( self, value, app, ignore_errors=False ):
rval = dict()
- current_case = rval['__current_case__'] = value['__current_case__']
- # Test param
- if ignore_errors and self.test_param.name not in value:
- # If ignoring errors, do nothing. However this is potentially very
- # problematic since if we are missing the value of test param,
- # the entire conditional is wrong.
- pass
- else:
- rval[ self.test_param.name ] = self.test_param.value_from_basic( value[ self.test_param.name ], app, ignore_errors )
- # Inputs associated with current case
- for input in self.cases[current_case].inputs.itervalues():
- if ignore_errors and input.name not in value:
- # If we do not have a value, and are ignoring errors, we simply
- # do nothing. There will be no value for the parameter in the
- # conditional's values dictionary.
+ try:
+ current_case = rval['__current_case__'] = value['__current_case__']
+ # Test param
+ if ignore_errors and self.test_param.name not in value:
+ # If ignoring errors, do nothing. However this is potentially very
+ # problematic since if we are missing the value of test param,
+ # the entire conditional is wrong.
pass
else:
- rval[ input.name ] = input.value_from_basic( value[ input.name ], app, ignore_errors )
+ rval[ self.test_param.name ] = self.test_param.value_from_basic( value[ self.test_param.name ], app, ignore_errors )
+ # Inputs associated with current case
+ for input in self.cases[current_case].inputs.itervalues():
+ if ignore_errors and input.name not in value:
+ # If we do not have a value, and are ignoring errors, we simply
+ # do nothing. There will be no value for the parameter in the
+ # conditional's values dictionary.
+ pass
+ else:
+ rval[ input.name ] = input.value_from_basic( value[ input.name ], app, ignore_errors )
+ except Exception, e:
+ if not ignore_errors:
+ raise e
return rval
def visit_inputs( self, prefix, value, callback ):
current_case = value['__current_case__']
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/tools/parameters/validation.py
--- a/lib/galaxy/tools/parameters/validation.py
+++ b/lib/galaxy/tools/parameters/validation.py
@@ -182,10 +182,13 @@
def from_element( cls, param, elem ):
return cls( message=elem.get( 'message', None ), check=elem.get( 'check', "" ), skip=elem.get( 'skip', "" ) )
def validate( self, value, history=None ):
- if value and value.missing_meta( check = self.check, skip = self.skip ):
- if self.message is None:
- self.message = "Metadata missing, click the pencil icon in the history item to edit / save the metadata attributes"
- raise ValueError( self.message )
+ if value:
+ if not isinstance( value, model.DatasetInstance ):
+ raise ValueError( 'A non-dataset value was provided.' )
+ if value.missing_meta( check = self.check, skip = self.skip ):
+ if self.message is None:
+ self.message = "Metadata missing, click the pencil icon in the history item to edit / save the metadata attributes"
+ raise ValueError( self.message )
class UnspecifiedBuildValidator( Validator ):
"""
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/util/hash_util.py
--- a/lib/galaxy/util/hash_util.py
+++ b/lib/galaxy/util/hash_util.py
@@ -32,3 +32,10 @@
def hmac_new( key, value ):
return hmac.new( key, value, sha ).hexdigest()
+
+def is_hashable( value ):
+ try:
+ hash( value )
+ except:
+ return False
+ return True
diff -r ce62bf5a91f86d0c53764bda3df4975486d7512e -r a4113cc1cb5eaa68091c9a73375f00555b66dd11 lib/galaxy/webapps/galaxy/controllers/tool_runner.py
--- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
@@ -4,6 +4,7 @@
from galaxy.web.base.controller import *
from galaxy.util.bunch import Bunch
+from galaxy.util.hash_util import is_hashable
from galaxy.tools import DefaultToolState
from galaxy.tools.parameters.basic import UnvalidatedValue
from galaxy.tools.parameters import params_to_incoming
@@ -174,7 +175,7 @@
params_objects = job.get_param_values( trans.app, ignore_errors = True )
except:
raise Exception( "Failed to get parameters for dataset id %d " % data.id )
- upgrade_messages = tool.check_and_update_param_values( params_objects, trans )
+ upgrade_messages = tool.check_and_update_param_values( params_objects, trans, update_values=False )
# Need to remap dataset parameters. Job parameters point to original
# dataset used; parameter should be the analygous dataset in the
# current history.
@@ -199,12 +200,13 @@
if isinstance(value,list):
values = []
for val in value:
- if val in history.datasets:
- values.append( val )
- elif val in hda_source_dict:
- values.append( hda_source_dict[ val ])
+ if is_hashable( val ):
+ if val in history.datasets:
+ values.append( val )
+ elif val in hda_source_dict:
+ values.append( hda_source_dict[ val ])
return values
- if value not in history.datasets and value in hda_source_dict:
+ if is_hashable( value ) and value not in history.datasets and value in hda_source_dict:
return hda_source_dict[ value ]
visit_input_values( tool.inputs, params_objects, rerun_callback )
# Create a fake tool_state for the tool, with the parameters values
https://bitbucket.org/galaxy/galaxy-central/commits/58851b490112/
changeset: 58851b490112
user: dan
date: 2013-01-10 22:15:30
summary: Merging heads
affected #: 5 files
diff -r ca12edce5f10d1411599dcb687d7d51706af99cb -r 58851b49011218dbb11370392bbc03f9b1e69a9f lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -2128,16 +2128,16 @@
return params_to_strings( self.inputs, params, app )
def params_from_strings( self, params, app, ignore_errors=False ):
return params_from_strings( self.inputs, params, app, ignore_errors )
- def check_and_update_param_values( self, values, trans ):
+ def check_and_update_param_values( self, values, trans, update_values=True ):
"""
Check that all parameters have values, and fill in with default
values where necessary. This could be called after loading values
from a database in case new parameters have been added.
"""
messages = {}
- self.check_and_update_param_values_helper( self.inputs, values, trans, messages )
+ self.check_and_update_param_values_helper( self.inputs, values, trans, messages, update_values=update_values )
return messages
- def check_and_update_param_values_helper( self, inputs, values, trans, messages, context=None, prefix="" ):
+ def check_and_update_param_values_helper( self, inputs, values, trans, messages, context=None, prefix="", update_values=True ):
"""
Recursive helper for `check_and_update_param_values_helper`
"""
@@ -2183,10 +2183,11 @@
# Regular tool parameter, no recursion needed
try:
#this will fail when a parameter's type has changed to a non-compatible one: e.g. conditional group changed to dataset input
- input.value_from_basic( values[ input.name ], trans.app, ignore_errors=False )
+ input.value_from_basic( input.value_to_basic( values[ input.name ], trans.app ), trans.app, ignore_errors=False )
except:
messages[ input.name ] = "Value no longer valid for '%s%s', replaced with default" % ( prefix, input.label )
- values[ input.name ] = input.get_initial_value( trans, context )
+ if update_values:
+ values[ input.name ] = input.get_initial_value( trans, context )
def handle_unvalidated_param_values( self, input_values, app ):
"""
Find any instances of `UnvalidatedValue` within input_values and
diff -r ca12edce5f10d1411599dcb687d7d51706af99cb -r 58851b49011218dbb11370392bbc03f9b1e69a9f lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -747,9 +747,9 @@
return { "__class__": "RuntimeValue" }
return value
def value_from_basic( self, value, app, ignore_errors=False ):
- if isinstance( value, dict ) and value["__class__"] == "UnvalidatedValue":
+ if isinstance( value, dict ) and value.get( "__class__", None ) == "UnvalidatedValue":
return UnvalidatedValue( value["value"] )
- return super( SelectToolParameter, self ).value_from_basic( value, app )
+ return super( SelectToolParameter, self ).value_from_basic( value, app, ignore_errors=ignore_errors )
def need_late_validation( self, trans, context ):
"""
Determine whether we need to wait to validate this parameters value
@@ -943,7 +943,7 @@
if not isinstance( value, list ):
value = value.split( '\n' )
for column in value:
- for column2 in column.split( ',' ):
+ for column2 in str( column ).split( ',' ):
column2 = column2.strip()
if column2:
column_list.append( column2 )
@@ -1586,8 +1586,11 @@
elif isinstance( value, list) and len(value) > 0 and isinstance( value[0], DummyDataset):
return None
elif isinstance( value, list ):
- return ",".join( [ val if isinstance( val, basestring ) else str(val.id) for val in value] )
- return value.id
+ return ",".join( [ str( self.to_string( val, app ) ) for val in value ] )
+ try:
+ return value.id
+ except:
+ return str( value )
def to_python( self, value, app ):
# Both of these values indicate that no dataset is selected. However, 'None'
diff -r ca12edce5f10d1411599dcb687d7d51706af99cb -r 58851b49011218dbb11370392bbc03f9b1e69a9f lib/galaxy/tools/parameters/validation.py
--- a/lib/galaxy/tools/parameters/validation.py
+++ b/lib/galaxy/tools/parameters/validation.py
@@ -182,10 +182,13 @@
def from_element( cls, param, elem ):
return cls( message=elem.get( 'message', None ), check=elem.get( 'check', "" ), skip=elem.get( 'skip', "" ) )
def validate( self, value, history=None ):
- if value and value.missing_meta( check = self.check, skip = self.skip ):
- if self.message is None:
- self.message = "Metadata missing, click the pencil icon in the history item to edit / save the metadata attributes"
- raise ValueError( self.message )
+ if value:
+ if not isinstance( value, model.DatasetInstance ):
+ raise ValueError( 'A non-dataset value was provided.' )
+ if value.missing_meta( check = self.check, skip = self.skip ):
+ if self.message is None:
+ self.message = "Metadata missing, click the pencil icon in the history item to edit / save the metadata attributes"
+ raise ValueError( self.message )
class UnspecifiedBuildValidator( Validator ):
"""
diff -r ca12edce5f10d1411599dcb687d7d51706af99cb -r 58851b49011218dbb11370392bbc03f9b1e69a9f lib/galaxy/util/hash_util.py
--- a/lib/galaxy/util/hash_util.py
+++ b/lib/galaxy/util/hash_util.py
@@ -32,3 +32,10 @@
def hmac_new( key, value ):
return hmac.new( key, value, sha ).hexdigest()
+
+def is_hashable( value ):
+ try:
+ hash( value )
+ except:
+ return False
+ return True
diff -r ca12edce5f10d1411599dcb687d7d51706af99cb -r 58851b49011218dbb11370392bbc03f9b1e69a9f lib/galaxy/webapps/galaxy/controllers/tool_runner.py
--- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
+++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py
@@ -4,6 +4,7 @@
from galaxy.web.base.controller import *
from galaxy.util.bunch import Bunch
+from galaxy.util.hash_util import is_hashable
from galaxy.tools import DefaultToolState
from galaxy.tools.parameters.basic import UnvalidatedValue
from galaxy.tools.parameters import params_to_incoming
@@ -174,7 +175,7 @@
params_objects = job.get_param_values( trans.app, ignore_errors = True )
except:
raise Exception( "Failed to get parameters for dataset id %d " % data.id )
- upgrade_messages = tool.check_and_update_param_values( params_objects, trans )
+ upgrade_messages = tool.check_and_update_param_values( params_objects, trans, update_values=False )
# Need to remap dataset parameters. Job parameters point to original
# dataset used; parameter should be the analygous dataset in the
# current history.
@@ -199,12 +200,13 @@
if isinstance(value,list):
values = []
for val in value:
- if val in history.datasets:
- values.append( val )
- elif val in hda_source_dict:
- values.append( hda_source_dict[ val ])
+ if is_hashable( val ):
+ if val in history.datasets:
+ values.append( val )
+ elif val in hda_source_dict:
+ values.append( hda_source_dict[ val ])
return values
- if value not in history.datasets and value in hda_source_dict:
+ if is_hashable( value ) and value not in history.datasets and value in hda_source_dict:
return hda_source_dict[ value ]
visit_input_values( tool.inputs, params_objects, rerun_callback )
# Create a fake tool_state for the tool, with the parameters values
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ca12edce5f10/
changeset: ca12edce5f10
user: jgoecks
date: 2013-01-10 21:49:55
summary: Preserve dbkey when navigating histories and datasets in Trackster.
affected #: 1 file
diff -r 40a5470e3082c07fb30381ea0dce83543e85ad46 -r ca12edce5f10d1411599dcb687d7d51706af99cb templates/tracks/history_select_grid.mako
--- a/templates/tracks/history_select_grid.mako
+++ b/templates/tracks/history_select_grid.mako
@@ -70,7 +70,14 @@
<% data_libraries_active = " activetab" %>
%endif
%endif
- <a class="addtracktab${histories_active}" href="${h.url_for( action='list_histories' )}">Histories</a>
+ ## Add filter parameters manually because they include a hyphen and hence cannot be
+ ## added as key words.
+ <%
+ dbkey = '?'
+ if cur_filter_dict:
+ dbkey = cur_filter_dict.get( 'dbkey', '?' )
+ %>
+ <a class="addtracktab${histories_active}" href="${h.url_for( action='list_histories')}?f-dbkey=${dbkey}">Histories</a><a class="addtracktab${data_libraries_active}" href="${h.url_for( action='list_libraries' )}">Data Libraries</a><div class="divider"></div></%def>
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 commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/40a5470e3082/
changeset: 40a5470e3082
user: jgoecks
date: 2013-01-10 21:26:21
summary: Default to first chromosome if viewport exists but is empty.
affected #: 1 file
diff -r b79236271786713189eae418da5626c159c4f119 -r 40a5470e3082c07fb30381ea0dce83543e85ad46 static/scripts/viz/trackster_ui.js
--- a/static/scripts/viz/trackster_ui.js
+++ b/static/scripts/viz/trackster_ui.js
@@ -191,8 +191,7 @@
$.when( view.load_chroms_deferred ).then(function(chrom_info) {
// Viewport config.
if (viewport_config) {
- var
- chrom = viewport_config.chrom,
+ var chrom = viewport_config.chrom,
start = viewport_config.start,
end = viewport_config.end,
overview_drawable_name = viewport_config.overview;
@@ -200,6 +199,10 @@
if (chrom && (start !== undefined) && end) {
view.change_chrom(chrom, start, end);
}
+ else {
+ // No valid viewport, so use first chromosome.
+ view.change_chrom(chrom_info[0].chrom);
+ }
}
else {
// No viewport, so use first chromosome.
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.