mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_16.07' into dev
Conflicts: run.sh static/scripts/bundled/analysis.bundled.js static/scripts/bundled/analysis.bundled.js.map static/scripts/bundled/libs.bundled.js static/scripts/bundled/libs.bundled.js.map
This commit is contained in:
@@ -43,7 +43,7 @@ class SlurmJobRunner( DRMAAJobRunner ):
|
||||
cmd = [ 'scontrol', '-o' ]
|
||||
if '.' in ajs.job_id:
|
||||
# custom slurm-drmaa-with-cluster-support job id syntax
|
||||
job_id, cluster = ajs.job_id.split('.', maxsplit=1)
|
||||
job_id, cluster = ajs.job_id.split('.', 1)
|
||||
cmd.extend( [ '-M', cluster ] )
|
||||
else:
|
||||
job_id = ajs.job_id
|
||||
|
||||
@@ -611,7 +611,7 @@ class DefaultToolAction( object ):
|
||||
"""
|
||||
if output.actions:
|
||||
for action in output.actions.actions:
|
||||
if action.tag == "metadata":
|
||||
if action.tag == "metadata" and action.default:
|
||||
metadata_new_value = fill_template( action.default, context=params ).split(",")
|
||||
dataset.metadata.__setattr__(str(action.name), metadata_new_value)
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
"""Entry point for the usage of Cheetah templating within Galaxy."""
|
||||
from Cheetah.Template import Template
|
||||
|
||||
|
||||
def fill_template( template_text, context=None, **kwargs ):
|
||||
"""Fill a cheetah template out for specified context.
|
||||
|
||||
If template_text is None, an exception will be thrown, if context
|
||||
is None (the default) - keyword arguments to this function will be used
|
||||
as the context.
|
||||
"""
|
||||
if template_text is None:
|
||||
raise TypeError("Template text specified as None to fill_template.")
|
||||
if not context:
|
||||
context = kwargs
|
||||
return str( Template( source=template_text, searchList=[context] ) )
|
||||
|
||||
@@ -312,7 +312,7 @@ class HistoryContentsController( BaseAPIController, UsesLibraryMixin, UsesLibrar
|
||||
return rval
|
||||
|
||||
def __create_dataset_collection( self, trans, history, payload, **kwd ):
|
||||
source = kwd.get("source", "new_collection")
|
||||
source = kwd.get( "source", payload.get( "source", "new_collection" ) )
|
||||
service = trans.app.dataset_collections_service
|
||||
if source == "new_collection":
|
||||
create_params = api_payload_to_create_params( payload )
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,36 @@
|
||||
<tool id="dbkey_output_action" name="dbkey_output_action" version="0.1.0">
|
||||
<command>echo foo > $mapped_reads</command>
|
||||
<inputs>
|
||||
<param name="input" type="data" />
|
||||
<param name="index" type="select" label="Using reference genome">
|
||||
<options from_data_table="test_fasta_indexes">
|
||||
<filter type="data_meta" ref="input" key="dbkey" column="1" />
|
||||
<validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />
|
||||
</options>
|
||||
</param>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data format="txt" name="mapped_reads">
|
||||
<actions>
|
||||
<action type="metadata" name="dbkey">
|
||||
<option type="from_data_table" name="test_fasta_indexes" column="1" offset="0">
|
||||
<filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
||||
<filter type="param_value" ref="index" column="0"/>
|
||||
</option>
|
||||
</action>
|
||||
</actions>
|
||||
</data>
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
<param name="input" value="simple_line.txt" dbkey="hg18" />
|
||||
<param name="index" value="hg18"/>
|
||||
<output name="mapped_reads">
|
||||
<metadata name="dbkey" value="hg18" />
|
||||
<assert_contents>
|
||||
<has_text text="foo" />
|
||||
</assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
</tests>
|
||||
</tool>
|
||||
@@ -21,6 +21,7 @@
|
||||
<tool file="inputs_as_json.xml" />
|
||||
<tool file="dbkey_filter_input.xml" />
|
||||
<tool file="dbkey_filter_multi_input.xml" />
|
||||
<tool file="dbkey_output_action.xml" />
|
||||
<tool file="composite_output.xml" />
|
||||
<tool file="composite_output_tests.xml" />
|
||||
<tool file="unicode_stream.xml" />
|
||||
|
||||
Reference in New Issue
Block a user