# HG changeset patch # User lecorguille # Date 1490213085 14400 # Node ID 626d3db664ef4e21291f1ae6410c26861cff738e # Parent dc4d3e2b9968a312cab87fd1c3b2f45d8ecfc802 planemo upload for repository https://github.com/workflow4metabolomics/xcms commit b1ebca6e0188e0aa0645e67259d6729ce80a6bdf diff -r dc4d3e2b9968 -r 626d3db664ef Makefile --- a/Makefile Thu Mar 02 08:20:04 2017 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -# USAGE: make [install|clean] - -# -------- VARIABLE -------- - -OBJ=xcms_set.tgz -DEP=abims_xcms_xcmsSet.xml tool_dependencies.xml repository_dependencies.xml static test-data - - -# ------------------------ - -all: $(OBJ) - -$(OBJ): $(DEP) - tar --exclude=".svn" -zchf $@ $^ - -# ------------------------ - -install: $(OBJ) - mv *.tgz ~ - -clean: - rm *.tgz - diff -r dc4d3e2b9968 -r 626d3db664ef README.rst --- a/README.rst Thu Mar 02 08:20:04 2017 -0500 +++ b/README.rst Wed Mar 22 16:04:45 2017 -0400 @@ -1,11 +1,33 @@ +Job Dynamic Destination Mapping +------------------------------- + +**Why** + +xcmsSet wrapper allow both individual file and zip file which can contain several samples. +Thus, it can be interesting to adjust the number of thread according to the input type. +For example: 1 thread for a single mzXML or NetCDF file and 8 threads for a zip file. + +**What** + +The [Dynamic Destination Mapping](https://galaxyproject.org/admin/config/jobs/#dynamic-destination-mapping) allow Galaxy to choose a destination at runtime based on factors such as the job inputs, user submitting the job, cluster status, etc... + +**How** + + - The file `destinations_input_type.py` (shiped with this tool) must be place in `lib/galaxy/jobs/rules/` + - The `job_conf.xml` must be inspired by the `job_conf.xml.sample` shiped with this tool + - The final destination names must match between the `job_conf.xml` and the `destinations_input_type.py` + - Restart Galaxy + Changelog/News -------------- -**Version 2.1.0 - 03/02/2017** +**Version 2.1.0 - 22/02/2017** - NEW: The W4M tools will be able now to take as input a single file. It will allow to submit in parallel several files and merge them afterward using "xcms.xcmsSet Merger" before "xcms.group". +- BUGFIX: the default value of "matchedFilter" -> "Step size to use for profile generation" which was of 0.01 have been changed to fix with the XMCS default values to 0.1 + **Version 2.0.11 - 22/12/2016** - BUGFIX: propose scanrange for all methods @@ -53,4 +75,3 @@ - IMPROVEMENT: new datatype/dataset formats (rdata.xcms.raw, rdata.xcms.group, rdata.xcms.retcor ...) will facilitate the sequence of tools and so avoid incompatibility errors. - IMPROVEMENT: parameter labels have changed to facilitate their reading. - diff -r dc4d3e2b9968 -r 626d3db664ef abims_xcms_xcmsSet.xml --- a/abims_xcms_xcmsSet.xml Thu Mar 02 08:20:04 2017 -0500 +++ b/abims_xcms_xcmsSet.xml Wed Mar 22 16:04:45 2017 -0400 @@ -48,9 +48,8 @@ ## sigma "$methods.options_m.sigma" max $methods.options_m.max snthresh $methods.options_m.snthresh - ## mzdiff $methods.options_m.mzdiff steps $methods.options_m.steps - ## sleep $methods.options_m.sleep + mzdiff $methods.options_m.mzdiff #end if #elif $methods.method == "MSW": snthr $methods.snthr @@ -109,7 +108,7 @@ - + @@ -124,7 +123,7 @@ - + @@ -132,15 +131,11 @@ - + - + @@ -562,10 +557,12 @@ Changelog/News -------------- -**Version 2.1.0 - 03/02/2017** +**Version 2.1.0 - 22/02/2017** - NEW: The W4M tools will be able now to take as input a single file. It will allow to submit in parallel several files and merge them afterward using "xcms.xcmsSet Merger" before "xcms.group". +- BUGFIX: the default value of "matchedFilter" -> "Step size to use for profile generation" which was of 0.01 have been changed to fix with the XMCS default values to 0.1 + **Version 2.0.11 - 22/12/2016** - BUGFIX: propose scanrange for all methods diff -r dc4d3e2b9968 -r 626d3db664ef destinations_input_type.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/destinations_input_type.py Wed Mar 22 16:04:45 2017 -0400 @@ -0,0 +1,23 @@ +from galaxy.jobs import JobDestination +import logging +import os + +''' +This file must be placed in lib/galaxy/jobs/rules/ +''' + +def input_type(job): + ''' + This function checks the input file format/extension and decide which destination in the job_conf.xml using + - If it's a zip file, we will launch the job in multi-thread mode (-pe thread 8) + - If it's an individual file (mzxml, mzml, mzdata or netcdf), the job will use for instance (-pe thread 1) + ''' + log = logging.getLogger(__name__) + inp_data = dict( [ ( da.name, da.dataset ) for da in job.input_datasets ] ) + inp_data.update( [ ( da.name, da.dataset ) for da in job.input_library_datasets ] ) + input_extension = inp_data[ "input" ].extension + log.debug("The input extension is %s" % input_extension) + if input_extension in ["mzxml","mzml","mzdata","netcdf"]: + return 'thread1-men_free10' + else: # zip file + return 'thread4-men_free10' diff -r dc4d3e2b9968 -r 626d3db664ef job_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/job_conf.xml.sample Wed Mar 22 16:04:45 2017 -0400 @@ -0,0 +1,36 @@ + + + + + + + + galaxy.jobs.rules + + + + + + + + + -V -w n -q galaxy.q + + + + -V -w n -q galaxy.q -pe thread 1 -R y -l mem_free=10G + + + -V -w n -q galaxy.q -pe thread 4 -R y -l mem_free=10G + + + + python + input_type + + + + + + +