changeset 4:05c9b1a7f44e draft default tip

Uploaded new release 1.7.3
author lgueguen
date Thu, 07 Jan 2021 11:12:01 +0000
parents de6d0b7c17af
children
files README.md README.rst abims_sartools_deseq2.xml abims_sartools_deseq2_wrapper.py abims_sartools_edger.xml abims_sartools_edger_wrapper.py macros.xml make_html.py pre_sartools.py pre_sartools.xml repository_dependencies.xml template_script_DESeq2_CL.r test-data/test_output_target.html
diffstat 13 files changed, 380 insertions(+), 405 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Mon Oct 01 05:07:56 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
---------------------------------------------------------------------------------------
-SARTools-Galaxy: a galaxy wrapper for SARTools (Statistical Analysis of RNA-Seq Tools) 
---------------------------------------------------------------------------------------
-
-[![Build Status](https://travis-ci.org/PF2-pasteur-fr/SARTools-Galaxy.svg?branch=master)](https://travis-ci.org/PF2-pasteur-fr/SARTools-Galaxy)
-
-Description:
-------------
-    SARTools is a R package dedicated to the differential analysis of RNA-seq data.
-    
-    SARTools provides tools to generate descriptive and diagnostic graphs, to run the differential analysis with one of the well known DESeq2 or edgeR packages and to export the results into easily readable tab-delimited files. It also facilitates the generation of a HTML report which displays all the figures produced, explains the statistical methods and gives the results of the differential analysis. Note that SARTools does not intend to replace DESeq2 or edgeR: it simply provides an environment to go with them. For more details about the methodology behind DESeq2 or edgeR, the user should read their documentations and papers.
-
-Requirements:
--------------
-    These Galaxy tools need:
-    - R and the following R packages: SARTools, DESeq2, edgeR, genefilter, xtable and knitr.
-    - Rscript and optparse package
-
-    SARTools can be downloaded on github (https://github.com/PF2-pasteur-fr/SARTools). More information about installation can be found at this url.
-
-Requirements using Conda:
--------------------------
-[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/r-sartools/README.html)
-
-[Conda](http://conda.pydata.org/) is package manager that among many other things can be used to manage Python packages.
-
-
-```
-#To install miniconda2
-#http://conda.pydata.org/miniconda.html
-#To install the SARTools R library using conda:
-conda install r-sartools
-#To set an environment:
-conda create -n r-sartools r-sartools`
-#To activate the environment:
-. activate r-sartools
-```
-
-
-Test:
------
-
-`planemo test` using conda: passed 
-
-
-References:
------------
-    The SARTools package has been developped at PF2 - Institut Pasteur by M.-A. Dillies and H. Varet (hugo.varet@pasteur.fr). 
-    Thanks to cite H. Varet, L. Brillet-Guéguen, J.-Y. Coppee and M.-A. Dillies, SARTools: A DESeq2- and EdgeR-Based R Pipeline for Comprehensive Differential Analysis of RNA-Seq Data, PLoS One, 2016, doi: http://dx.doi.org/10.1371/journal.pone.0157022 when using this tool for any analysis published. 
-
-    The Galaxy wrapper and scripts have been developped by Loraine Brillet-Guéguen, Institut Français de Bioinformatique
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst	Thu Jan 07 11:12:01 2021 +0000
@@ -0,0 +1,57 @@
+======================================================================================
+SARTools-Galaxy: a galaxy wrapper for SARTools (Statistical Analysis of RNA-Seq Tools)
+======================================================================================
+
+|Build Status|
+
+Description:
+============
+
+
+SARTools is a R package dedicated to the differential analysis of RNA-seq data.
+
+SARTools provides tools to generate descriptive and diagnostic graphs, to run the differential analysis with one of the well known DESeq2 or edgeR packages and to export the results into easily readable tab-delimited files. It also facilitates the generation of a HTML report which displays all the figures produced, explains the statistical methods and gives the results of the differential analysis. Note that SARTools does not intend to replace DESeq2 or edgeR: it simply provides an environment to go with them. For more details about the methodology behind DESeq2 or edgeR, the user should read their documentations and papers.
+
+SARTools can be downloaded on github (https://github.com/PF2-pasteur-fr/SARTools). More information about installation can be found at this url.
+
+
+Requirements using Conda:
+=========================
+
+|install with bioconda|
+
+`Conda`_ is a package manager that among many other things can be used to manage Python packages.
+
+.. code-block:: bash
+
+   #To install miniconda
+   #http://conda.pydata.org/miniconda.html
+   #To install the SARTools R library using conda:
+   conda install r-sartools
+   #To set an environment:
+   conda create -n r-sartools r-sartools`
+   #To activate the environment:
+   . activate r-sartools
+
+Test:
+=====
+
+``planemo test`` using conda: passed
+
+References:
+===========
+
+
+The SARTools package has been developped at PF2 - Institut Pasteur by M.-A. Dillies and H. Varet (hugo.varet@pasteur.fr).
+
+Thanks to cite H. Varet, L. Brillet-Guéguen, J.-Y. Coppee and M.-A. Dillies, SARTools: A DESeq2- and EdgeR-Based R Pipeline for Comprehensive Differential Analysis of RNA-Seq Data, PLoS One, 2016, doi: http://dx.doi.org/10.1371/journal.pone.0157022 when using this tool for any analysis published.
+
+The Galaxy wrapper and scripts have been developped by Loraine Brillet-Guéguen, Institut Français de Bioinformatique
+
+.. _Conda: http://conda.pydata.org/
+
+.. |Build Status| image:: https://travis-ci.org/PF2-pasteur-fr/SARTools-Galaxy.svg?branch=master
+   :target: https://travis-ci.org/PF2-pasteur-fr/SARTools-Galaxy
+
+.. |install with bioconda| image:: https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat
+   :target: http://bioconda.github.io/recipes/r-sartools/README.html
--- a/abims_sartools_deseq2.xml	Mon Oct 01 05:07:56 2018 -0400
+++ b/abims_sartools_deseq2.xml	Thu Jan 07 11:12:01 2021 +0000
@@ -1,114 +1,96 @@
-<tool id="sartools_deseq2" name="SARTools DESeq2" version="@WRAPPER_VERSION@.0">
+<tool id="sartools_deseq2" name="SARTools DESeq2" version="@TOOL_VERSION@+galaxy0">
     
-    <!-- [REQUIRED] Tool description displayed after the tool name -->
     <description>Compare two or more biological conditions in a RNA-Seq framework with DESeq2</description>
     
     <macros>
-    	<import>macros.xml</import>
+        <import>macros.xml</import>
     </macros>
     
     <expand macro="requirements"/>
     <expand macro="stdio"/>
     
-    <!-- [REQUIRED] The command to execute -->
-    <command interpreter="python"><![CDATA[
-	
-	abims_sartools_deseq2_wrapper.py
-	## parameters
-	@COMMAND_BASIC_PARAMETERS@
-    	#if str( $advanced_parameters.adv_param ) == "show":
-            @COMMAND_BATCH_PARAM@
-            --fitType $advanced_parameters.fitType
-            --cooksCutoff $advanced_parameters.cooksCutoff
-            --independentFiltering $advanced_parameters.independentFiltering
-	    --alpha $advanced_parameters.alpha
-	    --pAdjustMethod $advanced_parameters.pAdjustMethod
-	    --typeTrans $advanced_parameters.typeTrans
-	    --locfunc $advanced_parameters.locfunc
-	    --colors $advanced_parameters.colors
-            --forceCairoGraph $advanced_parameters.forceCairoGraph
-    	#end if
-	## ouputs
-	@COMMAND_OUTPUTS@
+    <command><![CDATA[
+ 
+python '$__tool_directory__/abims_sartools_deseq2_wrapper.py'
+## parameters
+@COMMAND_BASIC_PARAMETERS@
+@COMMAND_BATCH_PARAM@
+--fitType '$advanced_parameters.fitType'
+--cooksCutoff '$advanced_parameters.cooksCutoff'
+--independentFiltering '$advanced_parameters.independentFiltering'
+--alpha '$advanced_parameters.alpha'
+--pAdjustMethod '$advanced_parameters.pAdjustMethod'
+--typeTrans '$advanced_parameters.typeTrans'
+--locfunc '$advanced_parameters.locfunc'
+--colors "'$advanced_parameters.colors'"
+--forceCairoGraph '$advanced_parameters.forceCairoGraph'
+## ouputs
+@COMMAND_OUTPUTS@
        
     ]]></command>
     
-    <!-- [REQUIRED] Input files and tool parameters -->
     <inputs>
         
         <expand macro="basic_parameters" />
- 
-        <conditional name="advanced_parameters" >
-            <param name="adv_param" type="select" label="Advanced Parameters" help="" >
-                <option value="hide" selected="true">Hide</option>
-                <option value="show">Show</option>
+
+        <section name="advanced_parameters" title="Advanced Parameters" expanded="false">
+            <expand macro="batch_param" />
+            <param type="select" label="Mean-variance relationship" argument="--fitType" help="Type of model for the mean-dispersion relationship. Parametric by default." >
+                <option value="parametric" selected="true">parametric</option>
+                <option value="local">local</option>
+                <option value="mean">mean</option>
             </param>
-            <when value="hide" />
-            <when value="show">
-		<expand macro="batch_param" />
-                <param type="select" label="Mean-variance relationship" argument="--fitType" help="Type of model for the mean-dispersion relationship. Parametric by default." >
-          		<option value="parametric" selected="true">parametric</option>
-			<option value="local">local</option>
-			<option value="mean">mean</option>
-		</param>
-		<param type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Perform the outliers detection" argument="--cooksCutoff" help="Checked by default."/>
-		<param type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Perform independent filtering" argument="--independentFiltering" help="Checked by default."/>
-		<expand macro="alpha_param" />
-		<expand macro="padjustmethod_param" />
-            	<param type="select" label="Transformation for PCA/clustering" argument="--typeTrans" help="Method of transformation of the counts for the clustering and the PCA: 'VST' (default) for Variance Stabilizing Transformation, or 'rlog' for Regularized Log Transformation." >
-                	<option value="VST" selected="true">VST</option>
-                	<option value="rlog">rlog</option>
-            	</param>
-            	<param type="select" label="Estimation of the size factors" argument="--locfunc" help="'median' (default) or 'shorth' from the genefilter package." >
-                	<option value="median" selected="true">median</option>
-                	<option value="shorth">shorth</option>
-            	</param>
-		<expand macro="colors_param" />
-		<expand macro="forceCairoGraph_param" />
-            </when>
-        </conditional>
+            <param type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Perform the outliers detection" argument="--cooksCutoff" help="Checked by default."/>
+            <param type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Perform independent filtering" argument="--independentFiltering" help="Checked by default."/>
+            <expand macro="alpha_param" />
+            <expand macro="padjustmethod_param" />
+            <param type="select" label="Transformation for PCA/clustering" argument="--typeTrans" help="Method of transformation of the counts for the clustering and the PCA: 'VST' (default) for Variance Stabilizing Transformation, or 'rlog' for Regularized Log Transformation." >
+                <option value="VST" selected="true">VST</option>
+                <option value="rlog">rlog</option>
+            </param>
+            <param type="select" label="Estimation of the size factors" argument="--locfunc" help="'median' (default) or 'shorth' from the genefilter package." >
+                <option value="median" selected="true">median</option>
+                <option value="shorth">shorth</option>
+            </param>
+            <expand macro="colors_param" />
+            <expand macro="forceCairoGraph_param" />
+        </section>
 
     </inputs>
     
-    <!-- [REQUIRED] Output files -->
     <outputs>
         
         <expand macro="outputs" /> 
               
     </outputs>
     
-    <!-- [OPTIONAL] Tests to be run manually by the Galaxy admin -->
     <tests>
-        <!-- [HELP] Test files have to be in the ~/test-data directory -->
         <test>
         <!-- Test with 2 conditions, 2 replicates, 8217 features -->
             <param name="targetFile" dbkey="?" value="target.txt" />
             <param name="rawDir"   value="raw.zip" dbkey="?" ftype="zip"/>
-	        <param name="adv_param" value="show"/>
             <output name="log">
                 <assert_contents>
-                    <has_text text="KO vs WT    0.1       171" />
+                    <has_text text="KO vs WT    0.1                171" />
                     <has_text text="KO vs WT    2583   2663 5246" />
                     <has_text text="HTML report created" />
                 </assert_contents>
             </output>
         </test>
-<!--        <test>
+<!--    <test>
 -->        <!-- NOT WORKING YET: Test with 3 conditions, 3 replicates, 10160 features, with batch effect -->
-<!--            <param name="targetFile" dbkey="?" value="targetT048.txt" />
+<!--        <param name="targetFile" dbkey="?" value="targetT048.txt" />
             <param name="rawDir"   value="rawT048.zip" dbkey="?" ftype="no_unzip.zip"/>
-	    <param name="condRef" value="T0"/>
-	    <param name="adv_param" value="show"/>
-	    <param name="condition" value="true"/>
+            <param name="condRef" value="T0"/>
+            <param name="condition" value="true"/>
             <output name="tables_html" file="SARTools_DESeq2_targetT048_tables.html" lines_diff="14">
-            	<extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_DESeq2_T4vsT0.complete.txt"/>
-            	<extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_DESeq2_T8vsT0.complete.txt"/>
-            	<extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_DESeq2_T8vsT4.complete.txt"/>
-	    </output>
+                <extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_DESeq2_T4vsT0.complete.txt"/>
+                <extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_DESeq2_T8vsT0.complete.txt"/>
+                <extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_DESeq2_T8vsT4.complete.txt"/>
+            </output>
         </test>
--->    </tests>
+--> </tests>
     
-    <!-- [OPTIONAL] Help displayed in Galaxy -->
     <help><![CDATA[
 
 @HELP_AUTHORS@
@@ -135,17 +117,17 @@
 Parameters
 ----------
 
-	@HELP_BASIC_PARAMETERS@
-	* **batch:** adjustment variable to use as a batch effect, must be a column of the target file (NULL if no batch effect needs to be taken into account);
-	* **alpha:** significance threshold applied to the adjusted p-values to select the differentially expressed features (default is 0.05);
-	* **fitType:** type of model for the mean-dispersion relationship ("parametric" by default, or "local");
-	* **cooksCutoff:** TRUE (default) of FALSE to execute or not the detection of the outliers [4];
-	* **independentFiltering:** TRUE (default) of FALSE to execute or not the independent filtering [5];
-	* **pAdjustMethod:** p-value adjustment method for multiple testing [6, 7] ("BH" by default, "BY" or any value of p.adjust.methods);
-	* **typeTrans:** method of transformation of the counts for the clustering and the PCA (default is "VST" for Variance Stabilizing Transformation, or "rlog" for Regularized Log Transformation);
-	* **locfunc:** function used for the estimation of the size factors (default is "median", or "shorth" from the genefilter package);
-	* **colors:** colors used for the figures (one per biological condition), 8 are given by default.
-	* **forceCairoGraph:** TRUE or FALSE (default) to force the use of cairo with options(bitmapType="cairo").
+ @HELP_BASIC_PARAMETERS@
+ * **batch:** adjustment variable to use as a batch effect, must be a column of the target file (NULL if no batch effect needs to be taken into account);
+ * **alpha:** significance threshold applied to the adjusted p-values to select the differentially expressed features (default is 0.05);
+ * **fitType:** type of model for the mean-dispersion relationship ("parametric" by default, or "local");
+ * **cooksCutoff:** TRUE (default) of FALSE to execute or not the detection of the outliers [4];
+ * **independentFiltering:** TRUE (default) of FALSE to execute or not the independent filtering [5];
+ * **pAdjustMethod:** p-value adjustment method for multiple testing [6, 7] ("BH" by default, "BY" or any value of p.adjust.methods);
+ * **typeTrans:** method of transformation of the counts for the clustering and the PCA (default is "VST" for Variance Stabilizing Transformation, or "rlog" for Regularized Log Transformation);
+ * **locfunc:** function used for the estimation of the size factors (default is "median", or "shorth" from the genefilter package);
+ * **colors:** colors used for the figures (one per biological condition), 8 are given by default.
+ * **forceCairoGraph:** TRUE or FALSE (default) to force the use of cairo with options(bitmapType="cairo").
 
 
 ------------
@@ -154,7 +136,7 @@
 
 @HELP_OUTPUT_FILES@
 
-		
+  
 ---------------------------------------------------
 
 [1] G.-K. Smyth. Limma: linear models for microarray data. In R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, and W. Huber, editors, Bioinformatics and Computational Biology Solutions Using R and Bioconductor, pages 397–420. Springer, New York, 2005.
@@ -172,27 +154,27 @@
 [7] Y. Benjamini and D. Yekutieli. The control of the false discovery rate in multiple testing under dependency. Ann. Statist., 29(4):1165–1188, 2001.
 
 
-   ]]></help>
+    ]]></help>
 
-   <citations>
-    <expand macro="common_citations" /> 
-    <citation type="bibtex">@ARTICLE{Cook77,
-    author = {R.-D. Cook},
-    title = {Detection of Influential Observation in Linear Regression},
-    journal = {Technometrics},
-    year = {1977},
-    month = {February}
-    }</citation>
-    <citation type="bibtex">@ARTICLE{Bourgon10,
-    author = {R. Bourgon, R. Gentleman, and W. Huber},
-    title = {Independent filtering increases detection power for high-throughput experiments},
-    journal = {PNAS},
-    year = {2010},
-    volume = {107},
-    number = {21},
-    pages = {9546–9551},
-    note = {URL: http://www.pnas.org/content/107/21/9546.long}
-    }</citation>
-   </citations>
+    <citations>
+        <expand macro="common_citations" /> 
+        <citation type="bibtex">@ARTICLE{Cook77,
+            author = {R.-D. Cook},
+            title = {Detection of Influential Observation in Linear Regression},
+            journal = {Technometrics},
+            year = {1977},
+            month = {February}
+        }</citation>
+        <citation type="bibtex">@ARTICLE{Bourgon10,
+            author = {R. Bourgon, R. Gentleman, and W. Huber},
+            title = {Independent filtering increases detection power for high-throughput experiments},
+            journal = {PNAS},
+            year = {2010},
+            volume = {107},
+            number = {21},
+            pages = {9546–9551},
+            note = {URL: http://www.pnas.org/content/107/21/9546.long}
+        }</citation>
+    </citations>
     
 </tool>
--- a/abims_sartools_deseq2_wrapper.py	Mon Oct 01 05:07:56 2018 -0400
+++ b/abims_sartools_deseq2_wrapper.py	Thu Jan 07 11:12:01 2021 +0000
@@ -67,7 +67,7 @@
     report_html=args.report_html
     log=args.log
     #Print the parameters selected
-    print("Wrapper arguments: %s") %(args)
+    print("Wrapper arguments: %s" %(args))
 
     #Get the working directory path
     working_directory = os.getcwd()
@@ -104,7 +104,7 @@
     if forceCairoGraph:
         cmd+="--forceCairoGraph %s " % (forceCairoGraph)
     cmd+="> %s 2>&1" % (log)
-    print("Rscript command: %s") % (cmd)
+    print("Rscript command: %s" % (cmd))
     os.system(cmd)
 
     #Get output files
--- a/abims_sartools_edger.xml	Mon Oct 01 05:07:56 2018 -0400
+++ b/abims_sartools_edger.xml	Thu Jan 07 11:12:01 2021 +0000
@@ -1,84 +1,68 @@
-<tool id="sartools_edger" name="SARTools edgeR" version="@WRAPPER_VERSION@.0">
+<tool id="sartools_edger" name="SARTools edgeR" version="@TOOL_VERSION@+galaxy0">
     
-    <!-- [REQUIRED] Tool description displayed after the tool name -->
     <description>Compare two or more biological conditions in a RNA-Seq framework with edgeR</description>
     
     <macros>
-    	<import>macros.xml</import>
+        <import>macros.xml</import>
     </macros>
     
     <expand macro="requirements"/>
     <expand macro="stdio"/>
 
     
-    <!-- [REQUIRED] The command to execute -->
-    <command interpreter="python"><![CDATA[
-	
-	abims_sartools_edger_wrapper.py
-	## parameters
-	@COMMAND_BASIC_PARAMETERS@
-    	#if str( $advanced_parameters.adv_param ) == "show":
-            @COMMAND_BATCH_PARAM@
-	    --alpha $advanced_parameters.alpha
-	    --pAdjustMethod $advanced_parameters.pAdjustMethod
-	    --cpmCutoff $advanced_parameters.cpmCutoff
-	    --geneSelection $advanced_parameters.geneSelection
-	    --normalizationMethod $advanced_parameters.normalizationMethod
-	    --colors $advanced_parameters.colors
-            --forceCairoGraph $advanced_parameters.forceCairoGraph
-    	#end if
-	## ouputs
-	@COMMAND_OUTPUTS@
+    <command><![CDATA[
+ 
+python '$__tool_directory__/abims_sartools_edger_wrapper.py'
+## parameters
+@COMMAND_BASIC_PARAMETERS@
+@COMMAND_BATCH_PARAM@
+--alpha '$advanced_parameters.alpha'
+--pAdjustMethod '$advanced_parameters.pAdjustMethod'
+--cpmCutoff '$advanced_parameters.cpmCutoff'
+--geneSelection '$advanced_parameters.geneSelection'
+--normalizationMethod '$advanced_parameters.normalizationMethod'
+--colors "'$advanced_parameters.colors'"
+--forceCairoGraph '$advanced_parameters.forceCairoGraph'
+## ouputs
+@COMMAND_OUTPUTS@
         
     ]]></command>
     
-    <!-- [REQUIRED] Input files and tool parameters -->
     <inputs>
         
         <expand macro="basic_parameters" />
  
-        <conditional name="advanced_parameters" >
-            <param name="adv_param" type="select" label="Advanced Parameters" help="" >
-                <option value="hide" selected="true">Hide</option>
-                <option value="show">Show</option>
+        <section name="advanced_parameters" title="Advanced Parameters" expanded="false" >
+            <expand macro="batch_param" />
+            <expand macro="alpha_param" />
+            <expand macro="padjustmethod_param" />
+            <param type="integer" value="1" min="0" label="Counts-per-million cut-off to filter low counts" argument="--cpmCutoff" help="Set to 0 to disable filtering. Default is 1." />
+            <param name="geneSelection" type="select" label="Selection of the features in MDSPlot" argument="--gene.selection" help="Default is 'pairwise'." >
+                <option value="pairwise" selected="true">pairwise</option>
+                <option value="common">common</option>
             </param>
-            <when value="hide" />
-            <when value="show">
-		<expand macro="batch_param" />
-		<expand macro="alpha_param" />
-		<expand macro="padjustmethod_param" />
-		<param type="integer" value="1" min="0" label="Counts-per-million cut-off to filter low counts" argument="--cpmCutoff" help="Set to 0 to disable filtering. Default is 1." />
-		<param name="geneSelection" type="select" label="Selection of the features in MDSPlot" argument="--gene.selection" help="Default is 'pairwise'." >
-                	<option value="pairwise" selected="true">pairwise</option>
-                	<option value="common">common</option>
-		</param>
-		<param type="select" label="Normalization method in calcNormFactors" argument="--normalizationMethod" help="'TMM' (default), 'RLE' (DESeq method) or 'upperquartile'." >
-                	<option value="TMM" selected="true">TMM</option>
-                	<option value="RLE">RLE</option>
-                	<option value="upperquartile">upperquartile</option>
-		</param>
-		<expand macro="colors_param" />
-		<expand macro="forceCairoGraph_param" />
-            </when>
-        </conditional>
+            <param type="select" label="Normalization method in calcNormFactors" argument="--normalizationMethod" help="'TMM' (default), 'RLE' (DESeq method) or 'upperquartile'." >
+                <option value="TMM" selected="true">TMM</option>
+                <option value="RLE">RLE</option>
+                <option value="upperquartile">upperquartile</option>
+            </param>
+            <expand macro="colors_param" />
+            <expand macro="forceCairoGraph_param" />
+        </section>
 
     </inputs>
     
-    <!-- [REQUIRED] Output files -->
     <outputs>
         
         <expand macro="outputs" /> 
               
     </outputs>
     
-    <!-- [OPTIONAL] Tests to be run manually by the Galaxy admin -->
     <tests>
-        <!-- [HELP] Test files have to be in the ~/test-data directory -->
         <test>
-	    <!-- Test with 2 conditions, 2 replicates, 10 features -->
+     <!-- Test with 2 conditions, 2 replicates, 10 features -->
             <param name="targetFile" dbkey="?" value="target_small.txt" />
             <param name="rawDir" value="raw_small.zip" dbkey="?" ftype="zip"/>
-	        <param name="adv_param" value="show"/>
             <output name="log">
                 <assert_contents>
                     <has_text text="KO vs WT    5      4    9" />
@@ -86,24 +70,22 @@
                 </assert_contents>
             </output>
         </test>
-<!--        <test>
+<!--    <test>
 -->        <!-- NOT WORKING YET: Test with 3 conditions, 3 replicates, 10 features, with batch effect -->
-<!--            <param name="targetFile" dbkey="?" value="targetT048_small.txt" />
+<!--        <param name="targetFile" dbkey="?" value="targetT048_small.txt" />
             <param name="rawDir"   value="rawT048_small.zip" dbkey="?" ftype="no_unzip.zip"/>
-	    <param name="condRef" value="T0"/>
-	    <param name="adv_param" value="show"/>
-	    <param name="condition" value="true"/>
+            <param name="condRef" value="T0"/>
+            <param name="condition" value="true"/>
             <output name="tables_html" file="SARTools_edgeR_targetT048_small_tables.html" lines_diff="12">
-            	<extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_edgeR_T4vsT0_small.complete.txt"/>
-            	<extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_edgeR_T8vsT0_small.complete.txt"/>
-            	<extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_edgeR_T8vsT4_small.complete.txt"/>
-	    </output>
+                <extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_edgeR_T4vsT0_small.complete.txt"/>
+                <extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_edgeR_T8vsT0_small.complete.txt"/>
+                <extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_edgeR_T8vsT4_small.complete.txt"/>
+            </output>
         </test>
--->        <test>
+-->     <test>
         <!-- Test with 2 conditions, 2 replicates, 8217 features -->
             <param name="targetFile" dbkey="?" value="target.txt" />
             <param name="rawDir"   value="raw.zip" dbkey="?" ftype="zip"/>
-	        <param name="adv_param" value="show"/>
             <output name="log">
                 <assert_contents>
                     <has_text text="KO vs WT    2691   2713 5404" />
@@ -111,22 +93,20 @@
                 </assert_contents>
             </output>
         </test>
-<!--        <test>
+<!--    <test>
 -->        <!-- NOT WORKING YET: Test with 3 conditions, 3 replicates, 10160 features, with batch effect -->
-<!--            <param name="targetFile" dbkey="?" value="targetT048.txt" />
+<!--        <param name="targetFile" dbkey="?" value="targetT048.txt" />
             <param name="rawDir"   value="rawT048.zip" dbkey="?" ftype="no_unzip.zip"/>
-	    <param name="condRef" value="T0"/>
-	    <param name="adv_param" value="show"/>
-	    <param name="condition" value="true"/>
+            <param name="condRef" value="T0"/>
+            <param name="condition" value="true"/>
             <output name="tables_html" file="SARTools_edgeR_targetT048_tables.html" lines_diff="14">
-            	<extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_edgeR_T4vsT0.complete.txt"/>
-            	<extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_edgeR_T8vsT0.complete.txt"/>
-            	<extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_edgeR_T8vsT4.complete.txt"/>
-	    </output>
+                <extra_files type="file" name="T4vsT0.complete.txt" value="SARTools_edgeR_T4vsT0.complete.txt"/>
+                <extra_files type="file" name="T8vsT0.complete.txt" value="SARTools_edgeR_T8vsT0.complete.txt"/>
+                <extra_files type="file" name="T8vsT4.complete.txt" value="SARTools_edgeR_T8vsT4.complete.txt"/>
+            </output>
         </test>
--->    </tests>
+--> </tests>
     
-    <!-- [OPTIONAL] Help displayed in Galaxy -->
     <help><![CDATA[
 
 @HELP_AUTHORS@
@@ -153,15 +133,15 @@
 Parameters
 ----------
 
-	@HELP_BASIC_PARAMETERS@
-	* **batch:** adjustment variable to use as a batch effect, must be a column of the target file (NULL if no batch effect needs to be taken into account);
-	* **alpha:** significance threshold applied to the adjusted p-values to select the differentially expressed features (default is 0.05);
-	* **pAdjustMethod:** p-value adjustment method for multiple testing [4, 5] ("BH" by default, "BY" or any value of p.adjust.methods);
-	* **cpmCutoff:** counts-per-million cut-off to filter low counts (default is 1, set to 0 to disable filtering);
-	* **gene.selection:** method of selection of the features for the MultiDimensional Scaling plot ("pairwise" by default or common);
-	* **normalizationMethod:** normalization method in calcNormFactors(): "TMM" (default), "RLE" (DESeq method) or "upperquartile";
-	* **colors:** colors used for the figures (one per biological condition), 8 are given by default.
-	* **forceCairoGraph:** TRUE or FALSE (default) to force the use of cairo with options(bitmapType="cairo").
+ @HELP_BASIC_PARAMETERS@
+ * **batch:** adjustment variable to use as a batch effect, must be a column of the target file (NULL if no batch effect needs to be taken into account);
+ * **alpha:** significance threshold applied to the adjusted p-values to select the differentially expressed features (default is 0.05);
+ * **pAdjustMethod:** p-value adjustment method for multiple testing [4, 5] ("BH" by default, "BY" or any value of p.adjust.methods);
+ * **cpmCutoff:** counts-per-million cut-off to filter low counts (default is 1, set to 0 to disable filtering);
+ * **gene.selection:** method of selection of the features for the MultiDimensional Scaling plot ("pairwise" by default or common);
+ * **normalizationMethod:** normalization method in calcNormFactors(): "TMM" (default), "RLE" (DESeq method) or "upperquartile";
+ * **colors:** colors used for the figures (one per biological condition), 8 are given by default.
+ * **forceCairoGraph:** TRUE or FALSE (default) to force the use of cairo with options(bitmapType="cairo").
 
 
 ------------
@@ -170,7 +150,7 @@
 
 @HELP_OUTPUT_FILES@
 
-		
+  
 ---------------------------------------------------
 
 [1] G.-K. Smyth. Limma: linear models for microarray data. In R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, and W. Huber, editors, Bioinformatics and Computational Biology Solutions Using R and Bioconductor, pages 397–420. Springer, New York, 2005.
@@ -184,7 +164,7 @@
 [5] Y. Benjamini and D. Yekutieli. The control of the false discovery rate in multiple testing under dependency. Ann. Statist., 29(4):1165–1188, 2001.
 
 
-   ]]></help>
+    ]]></help>
 
    <citations>
         <expand macro="common_citations" /> 
--- a/abims_sartools_edger_wrapper.py	Mon Oct 01 05:07:56 2018 -0400
+++ b/abims_sartools_edger_wrapper.py	Thu Jan 07 11:12:01 2021 +0000
@@ -63,7 +63,7 @@
     report_html=args.report_html
     log=args.log
     #Print the parameters selected
-    print("Wrapper arguments: %s") %(args)
+    print("Wrapper arguments: %s" %(args))
 
     #Get the working directory path
     working_directory = os.getcwd()
@@ -96,7 +96,7 @@
     if forceCairoGraph:
         cmd+="--forceCairoGraph %s " % (forceCairoGraph)
     cmd+="> %s 2>&1" % (log)
-    print("Rscript command: %s") % (cmd)
+    print("Rscript command: %s" % (cmd))
     os.system(cmd)
 
     #Get output files
--- a/macros.xml	Mon Oct 01 05:07:56 2018 -0400
+++ b/macros.xml	Thu Jan 07 11:12:01 2021 +0000
@@ -1,11 +1,10 @@
 <macros>
 
-    <token name="@WRAPPER_VERSION@">1.6.3</token>
+    <token name="@TOOL_VERSION@">1.7.3</token>
 
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.6.3">r-sartools</requirement>
-            <requirement type="package" version="1.6.0">r-optparse</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">r-sartools</requirement>
         </requirements>
     </xml>
     
@@ -23,101 +22,106 @@
         </stdio>
     </xml>
 
-  <token name="@COMMAND_BASIC_PARAMETERS@">
-	--projectName $projectName
-	--author $author
-	--targetFile $targetFile
-	--rawDir $rawDir
-	--featuresToRemove $featuresToRemove
-	--varInt $varInt
-	--condRef $condRef
-  </token>
+    <token name="@COMMAND_BASIC_PARAMETERS@">
+--projectName '$projectName'
+--author '$author'
+--targetFile '$targetFile'
+--rawDir '$rawDir'
+--featuresToRemove '$featuresToRemove'
+--varInt '$varInt'
+--condRef '$condRef'
+    </token>
 
-  <token name="@COMMAND_BATCH_PARAM@">
-            #if $advanced_parameters.batch_condition.condition:
-            --batch $advanced_parameters.batch_condition.batch
-            #else:
+    <token name="@COMMAND_BATCH_PARAM@">
+        #if $advanced_parameters.batch_condition.condition:
+            --batch '$advanced_parameters.batch_condition.batch'
+        #else:
             --batch NULL
-            #end if
-  </token>
+        #end if
+    </token>
 
-  <token name="@COMMAND_OUTPUTS@">
-	--figures_html $figures_html 
-	--figures_html_files_path $figures_html.files_path
-	--tables_html $tables_html 
-	--tables_html_files_path $tables_html.files_path
-	--rdata $rdata
-	--report_html $report_html
- 	--log $log
-  </token>
+    <token name="@COMMAND_OUTPUTS@">
+--figures_html '$figures_html' 
+--figures_html_files_path '$figures_html.files_path'
+--tables_html '$tables_html'
+--tables_html_files_path '$tables_html.files_path'
+--rdata '$rdata'
+--report_html '$report_html'
+--log '$log'
+    </token>
 
-  <macro name="basic_parameters">
+    <macro name="basic_parameters">
         <param type="text" value="Project" label="Name of the project used for the report" argument="--projectName" help="No space allowed." >
-		<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-	</param>
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+        </param>
         <param type="text" value="Galaxy" label="Name of the report author" argument="--author" help="No space allowed." >
-		<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-	</param>
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+        </param>
         <param type="data" format="txt" label="Design / target file" argument="--targetFile" help="See the help section below for details on the required format." />        
         <param type="data" format="no_unzip.zip,zip" label="Zip file containing raw counts files" argument="--rawDir" help="See the help section below for details on the required format." />        
         <param type="text" size="100" value="alignment_not_unique,ambiguous,no_feature,not_aligned,too_low_aQual" label="Names of the features to be removed" argument="--featuresToRemove" help="Separate the features with a comma, no space allowed. More than once can be specified. Specific HTSeq-count information and rRNA for example. Default are 'alignment_not_unique,ambiguous,no_feature,not_aligned,too_low_aQual'." >
-		<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-	</param>
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+        </param>
         <param type="text" value="group" label="Factor of interest" argument="--varInt" help="Biological condition in the target file. Default is 'group'." >
-		<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-	</param>
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+        </param>
         <param type="text" value="WT" label="Reference biological condition" argument="--condRef" help="Reference biological condition used to compute fold-changes, must be one of the levels of 'Factor of interest'." >
-		<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-	</param>
-  </macro>
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+        </param>
+    </macro>
 
-  <macro name="batch_param">
-		<conditional name="batch_condition">
-			<param name="condition" type="boolean" checked="false" truevalue="batch" falsevalue="NULL" label="Add a blocking factor" argument="--batch" help="Adjustment variable to use as a batch effect. Default: unchecked if no batch effect needs to be taken into account."/>
-            		<when value="NULL" />
-			<when value="batch">
-				<param name="batch" type="text" value="batch" label="Blocking factor value" help="Must be a column of the target file" >
-					<validator type="empty_field"/>
-				</param>
-			</when>
-         	</conditional>
-  </macro>
+    <macro name="batch_param">
+        <conditional name="batch_condition">
+            <param name="condition" type="boolean" checked="false" truevalue="batch" falsevalue="NULL" label="Add a blocking factor" argument="--batch" help="Adjustment variable to use as a batch effect. Default: unchecked if no batch effect needs to be taken into account."/>
+            <when value="NULL" />
+            <when value="batch">
+                <param name="batch" type="text" value="batch" label="Blocking factor value" help="Must be a column of the target file" >
+                    <validator type="empty_field"/>
+                </param>
+            </when>
+        </conditional>
+    </macro>
+
+    <macro name="alpha_param">
+        <param type="float" value="0.05" min="0" max="1" label="Threshold of statistical significance" argument="--alpha" help="Significance threshold applied to the adjusted p-values to select the differentially expressed features. Default is 0.05. The comma is not allowed as decimal separator, use a point instead." />
+    </macro>
 
-  <macro name="alpha_param">
-		<param type="float" value="0.05" min="0" max="1" label="Threshold of statistical significance" argument="--alpha" help="Significance threshold applied to the adjusted p-values to select the differentially expressed features. Default is 0.05. The comma is not allowed as decimal separator, use a point instead." />
-  </macro>
+    <macro name="padjustmethod_param">
+        <param type="select" label="p-value adjustment method" argument="--pAdjustMethod" help="p-value adjustment method for multiple testing. 'BH' by default, 'BY' or any value of p.adjust.methods." >
+            <option value="BH" selected="true">BH</option>
+            <option value="BY">BY</option>
+            <option value="bonferroni">bonferroni</option>
+            <option value="fdr">fdr</option>
+            <option value="hochberg">hochberg</option>
+            <option value="holm">holm</option>
+            <option value="hommel">hommel</option>
+        </param>
+    </macro>
 
-  <macro name="padjustmethod_param">
-		<param type="select" label="p-value adjustment method" argument="--pAdjustMethod" help="p-value adjustment method for multiple testing. 'BH' by default, 'BY' or any value of p.adjust.methods." >
-                	<option value="BH" selected="true">BH</option>
-                	<option value="BY">BY</option>
-                	<option value="bonferroni">bonferroni</option>
-                	<option value="fdr">fdr</option>
-                	<option value="hochberg">hochberg</option>
-                	<option value="holm">holm</option>
-                	<option value="hommel">hommel</option>
-		</param>
-  </macro>
+    <macro name="colors_param">
+        <param type="text" size="100" value="#f3c300,#875692,#f38400,#a1caf1,#be0032,#c2b280,#848482,#008856,#e68fac,#0067a5" label="Colors of each biological condition on the plots: 'col1,col2,col3,col4'" argument="--colors" help="Separate the colors with a comma, no space allowed. Default are '#f3c300,#875692,#f38400,#a1caf1,#be0032,#c2b280,#848482,#008856,#e68fac,#0067a5'." >
+            <validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
+            <sanitizer>
+                <valid>
+                    <add value="#" />
+                </valid>
+            </sanitizer>
+        </param>
+    </macro>
 
-  <macro name="colors_param">
-		<param type="text" size="100" value="dodgerblue,firebrick1,MediumVioletRed,SpringGreen,chartreuse,cyan,darkorchid,darkorange" label="Colors of each biological condition on the plots: 'col1,col2,col3,col4'" argument="--colors" help="Separate the colors with a comma, no space allowed. Default are 'dodgerblue,firebrick1,MediumVioletRed,SpringGreen,chartreuse,cyan,darkorchid,darkorange'." >
-			<validator type="regex" message="Field requires a value. No space allowed.">\S+</validator>
-		</param>
-  </macro>
+    <macro name="forceCairoGraph_param">
+        <param type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Activate cairo type" argument="--forceCairoGraph" help="Unchecked by default." />
+    </macro>
 
-  <macro name="forceCairoGraph_param">
-		<param type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Activate cairo type" argument="--forceCairoGraph" help="Unchecked by default." />
-  </macro>
-
-  <macro name="outputs">
+    <macro name="outputs">
         <data name="report_html" format="html"    label="${tool.name} report" /> 
         <data name="tables_html" format="html"    label="${tool.name} tables" /> 
         <data name="figures_html" format="html"    label="${tool.name} figures" /> 
         <data name="log" format="txt"    label="${tool.name} R log" /> 
         <data name="rdata" format="data"    label="${tool.name} R objects (.RData)" /> 
-  </macro>
+    </macro>
 
-  <token name="@HELP_AUTHORS@">
+    <token name="@HELP_AUTHORS@">
 .. class:: infomark
 
 **Authors** M.-A. Dillies and H. Varet
@@ -132,14 +136,14 @@
  | Contact support.abims@sb-roscoff.fr for any questions or concerns about the Galaxy implementation of this tool.
 
 ---------------------------------------------------
-  </token>
+    </token>
 
-  <token name="@HELP_DESCRIPTION@">
+    <token name="@HELP_DESCRIPTION@">
  | SARTools is a R package dedicated to the differential analysis of RNA-seq data. It provides tools to generate descriptive and diagnostic graphs, to run the differential analysis with one of the well known DESeq2 or edgeR packages and to export the results into easily readable tab-delimited files. It also facilitates the generation of a HTML report which displays all the figures produced, explains the statistical methods and gives the results of the differential analysis. 
  | Note that SARTools does not intend to replace DESeq2 or edgeR: it simply provides an environment to go with them. For more details about the methodology behind DESeq2 or edgeR, the user should read their documentations and papers.
-  </token>
+    </token>
 
-  <token name="@HELP_INPUT_FILES@">
+    <token name="@HELP_INPUT_FILES@">
 .. class:: warningmark
 
 If the counts and the target files are not supplied in the required formats, the workflow will probably crash and will not be able to run the analysis.
@@ -155,12 +159,12 @@
 
 
 Design/target file:
-	| The user has to supply a tab delimited file which describes the experiment, i.e. which contains the name of the biological condition associated with each sample. This file is called ”target” as a reference to the target file needed when using the limma package [1]. This file has one row per sample and is composed of at least three columns with headers:
+ | The user has to supply a tab delimited file which describes the experiment, i.e. which contains the name of the biological condition associated with each sample. This file is called ”target” as a reference to the target file needed when using the limma package [1]. This file has one row per sample and is composed of at least three columns with headers:
 
-	* column 1 : unique names of the samples (short but informative as they will be displayed on all the figures);
-	* column 2 : name of the count files;
-	* column 3 : biological conditions;
-	* optional columns : further information about the samples (day of library preparation for example).
+ * column 1 : unique names of the samples (short but informative as they will be displayed on all the figures);
+ * column 2 : name of the count files;
+ * column 3 : biological conditions;
+ * optional columns : further information about the samples (day of library preparation for example).
 
 
 - Example of a target file::
@@ -173,96 +177,96 @@
 
 
 Zip file containing raw counts files:
-	| The statistical analysis assumes that reads have already been mapped and that counts per feature (gene or transcript) are available. If counting has been done with HTSeq-count [2, 3], output files are ready to be loaded in R with the dedicated SARTools function. If not, the user must supply, in a zip file, one count file per sample with two tab delimited columns without header:
+ | The statistical analysis assumes that reads have already been mapped and that counts per feature (gene or transcript) are available. If counting has been done with HTSeq-count [2, 3], output files are ready to be loaded in R with the dedicated SARTools function. If not, the user must supply, in a zip file, one count file per sample with two tab delimited columns without header:
 
-	* column 1 : the unique IDs of the features;
-	* column 2 : the raw counts associated with these features (null or positive integers).
-  </token>
+ * column 1 : the unique IDs of the features;
+ * column 2 : the raw counts associated with these features (null or positive integers).
+    </token>
 
-  <token name="@HELP_BASIC_PARAMETERS@">
-	* **projectName:** name of the project;
-	* **author:** author of the analysis;
-	* **featuresToRemove:** character vector containing the IDs of the features to remove before running the analysis (default are "alignment not unique", "ambiguous", "no feature", "not aligned", "too low aQual" to remove HTSeq-count specific rows);
-	* **varInt:** variable of interest, i.e. biological condition, in the target file ("group" by default);
-	* **condRef:** reference biological condition used to compute fold-changes (no default, must be one of the levels of varInt);
-  </token>
+    <token name="@HELP_BASIC_PARAMETERS@">
+ * **projectName:** name of the project;
+ * **author:** author of the analysis;
+ * **featuresToRemove:** character vector containing the IDs of the features to remove before running the analysis (default are "alignment not unique", "ambiguous", "no feature", "not aligned", "too low aQual" to remove HTSeq-count specific rows);
+ * **varInt:** variable of interest, i.e. biological condition, in the target file ("group" by default);
+ * **condRef:** reference biological condition used to compute fold-changes (no default, must be one of the levels of varInt);
+    </token>
 
-  <token name="@HELP_OUTPUT_FILES@">
+    <token name="@HELP_OUTPUT_FILES@">
 **Report:**
 
 
-	| Give details about the methodology, the different steps and the results. It displays all the figures produced and the most important results of the differential analysis as the number of up- and down-regulated features. 
-	| The user should read the full HTML report and closely analyze each figure to check that the analysis ran smoothly.
+ | Give details about the methodology, the different steps and the results. It displays all the figures produced and the most important results of the differential analysis as the number of up- and down-regulated features. 
+ | The user should read the full HTML report and closely analyze each figure to check that the analysis ran smoothly.
 
 
 **Tables:**
 
 
-	* **TestVsRef.complete.txt:** contains all the features studied;
-	* **TestVsRef.down.txt:** contains only significant down-regulated features, i.e. less expressed in Test than in Ref;
-	* **TestVsRef.up.txt:** contains only significant up-regulated features i.e. more expressed in Test than in Ref.
+ * **TestVsRef.complete.txt:** contains all the features studied;
+ * **TestVsRef.down.txt:** contains only significant down-regulated features, i.e. less expressed in Test than in Ref;
+ * **TestVsRef.up.txt:** contains only significant up-regulated features i.e. more expressed in Test than in Ref.
 
 
 **Figures:**
 
 
-	* **MAplot.png:** MA-plot for each comparison (log ratio of the means vs intensity).
-	* **PCA.png:** first and second factorial planes of the PCA on the samples based on VST or rlog data;
-	* **barplotNull.png:** percentage of null counts per sample;
-	* **barplotTC.png:** total number of reads per sample;
-	* **cluster.png:** hierachical clustering of the samples (based on VST or rlog data);
-	* **countsBoxplot.png:** boxplots on raw and normalized counts;
-	* **densplot.png:** estimation of the density of the counts for each sample;
-	* **diagSizeFactorsHist.png:** diagnostic of the estimation of the size factors;
-	* **diagSizeFactorsTC.png:** plot of the size factors vs the total number of reads;
-	* **dispersionsPlot.png:** graph of the estimations of the dispersions and diagnostic of log-linearity of the dispersions;
-	* **majSeq.png:** percentage of reads caught by the feature having the highest count in each sample;
-	* **pairwiseScatter.png:** pairwise scatter plot between each pair of samples and SERE values;
-	* **rawpHist.png:** histogram of the raw p-values for each comparison;
-	* **volcanoPlot.png:** vulcano plot for each comparison (− log10 (adjusted P value) vs log ratio of the means).
+ * **MAplot.png:** MA-plot for each comparison (log ratio of the means vs intensity).
+ * **PCA.png:** first and second factorial planes of the PCA on the samples based on VST or rlog data;
+ * **barplotNull.png:** percentage of null counts per sample;
+ * **barplotTC.png:** total number of reads per sample;
+ * **cluster.png:** hierachical clustering of the samples (based on VST or rlog data);
+ * **countsBoxplot.png:** boxplots on raw and normalized counts;
+ * **densplot.png:** estimation of the density of the counts for each sample;
+ * **diagSizeFactorsHist.png:** diagnostic of the estimation of the size factors;
+ * **diagSizeFactorsTC.png:** plot of the size factors vs the total number of reads;
+ * **dispersionsPlot.png:** graph of the estimations of the dispersions and diagnostic of log-linearity of the dispersions;
+ * **majSeq.png:** percentage of reads caught by the feature having the highest count in each sample;
+ * **pairwiseScatter.png:** pairwise scatter plot between each pair of samples and SERE values;
+ * **rawpHist.png:** histogram of the raw p-values for each comparison;
+ * **volcanoPlot.png:** vulcano plot for each comparison (− log10 (adjusted P value) vs log ratio of the means).
 
 
 **R log file:**
 
 
-	| Give the R console outputs.
+ | Give the R console outputs.
 
 
 **R objects (.RData file):**
 
 
-	| Give all the R objects created during the analysis is saved: it may be used to perform downstream analyses.
-  </token>
+ | Give all the R objects created during the analysis is saved: it may be used to perform downstream analyses.
+    </token>
 
-  <macro name="common_citations">
-    <citation type="doi">10.1371/journal.pone.0157022</citation>
-    <citation type="bibtex">@INBOOK{Smyth05,
-    author = {G.-K. Smyth},
-    editor = {R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, and W. Huber},
-    chapter = {Limma: linear models for microarray data},
-    title = {Bioinformatics and Computational Biology Solutions Using R and Bioconductor},
-    publisher = {Springer},
-    year = {2005},
-    pages = {397–420}
-    }</citation>
-    <citation type="doi">10.1093/bioinformatics/btu638</citation>
-    <citation type="bibtex">@ARTICLE{Benjamini95,
-    author = {Y. Benjamini and Y. Hochberg},
-    title = {Controlling the false discovery rate: a practical and powerful approach to multiple testing},
-    journal = {Journal of the Royal Statistical Society B},
-    year = {1995},
-    volume = {57},
-    pages = {289–300}
-    }</citation>
-    <citation type="bibtex">@ARTICLE{Benjamini01,
-    author = {Y. Benjamini and D. Yekutieli},
-    title = {The control of the false discovery rate in multiple testing under dependency},
-    journal = {Ann. Statist.},
-    year = {2001},
-    volume = {29},
-    number = {4},
-    pages = {1165–1188}
-    }</citation>
-   </macro>
+    <macro name="common_citations">
+        <citation type="doi">10.1371/journal.pone.0157022</citation>
+        <citation type="bibtex">@INBOOK{Smyth05,
+            author = {G.-K. Smyth},
+            editor = {R. Gentleman, V. Carey, S. Dudoit, R. Irizarry, and W. Huber},
+            chapter = {Limma: linear models for microarray data},
+            title = {Bioinformatics and Computational Biology Solutions Using R and Bioconductor},
+            publisher = {Springer},
+            year = {2005},
+            pages = {397–420}
+        }</citation>
+        <citation type="doi">10.1093/bioinformatics/btu638</citation>
+        <citation type="bibtex">@ARTICLE{Benjamini95,
+            author = {Y. Benjamini and Y. Hochberg},
+            title = {Controlling the false discovery rate: a practical and powerful approach to multiple testing},
+            journal = {Journal of the Royal Statistical Society B},
+            year = {1995},
+            volume = {57},
+            pages = {289–300}
+        }</citation>
+        <citation type="bibtex">@ARTICLE{Benjamini01,
+            author = {Y. Benjamini and D. Yekutieli},
+            title = {The control of the false discovery rate in multiple testing under dependency},
+            journal = {Ann. Statist.},
+            year = {2001},
+            volume = {29},
+            number = {4},
+            pages = {1165–1188}
+        }</citation>
+    </macro>
 
 </macros>
--- a/make_html.py	Mon Oct 01 05:07:56 2018 -0400
+++ b/make_html.py	Thu Jan 07 11:12:01 2021 +0000
@@ -68,6 +68,6 @@
 
 html+=fin_html
 
-htmlf = file(output_html,'w')
+htmlf = open(output_html,'w')
 htmlf.write(html)
 htmlf.close()
--- a/pre_sartools.py	Mon Oct 01 05:07:56 2018 -0400
+++ b/pre_sartools.py	Thu Jan 07 11:12:01 2021 +0000
@@ -51,8 +51,8 @@
             filename_base = basename(filename)
             # For RSEM files we process files as HTSeq count output
             tmpdir = tempfile.mkdtemp()
-            with open(filename, 'rb') as csvfile:
-                with open(join(tmpdir, basename(filename)), 'wb') as out:
+            with open(filename, 'rt') as csvfile:
+                with open(join(tmpdir, basename(filename)), 'wt') as out:
                     spamwriter = csv.writer(out, delimiter='\t')
                     reader = csv.DictReader(csvfile, delimiter='\t', skipinitialspace=True)
                     if len(reader.fieldnames) > 2:
--- a/pre_sartools.xml	Mon Oct 01 05:07:56 2018 -0400
+++ b/pre_sartools.xml	Thu Jan 07 11:12:01 2021 +0000
@@ -1,10 +1,10 @@
-<tool id="presartools" name="Preprocess files for SARTools" version="0.1.0">
+<tool id="presartools" name="Preprocess files for SARTools" version="0.1.1">
     <description>generate design/target file and archive for SARTools inputs</description>
     <stdio>
         <regex match="WARNING:galaxy.model:Datatype class not found" level="warning"/>
     </stdio>
-    <command interpreter="python">
-        pre_sartools.py
+    <command><![CDATA[
+	python '$__tool_directory__/pre_sartools.py'
         --outfile=$outfile
         --outarch=$outarch
         #if $batch_condition.condition:
@@ -23,7 +23,7 @@
             #end for
         #end if
 
-    </command>
+    ]]></command>
     <inputs>
         <conditional name="batch_condition">
             <param name="condition" type="boolean" checked="false" truevalue="batch" falsevalue="NULL" label="Add a blocking factor" help="Adjustment variable to use as a batch effect (default no)."/>
@@ -101,7 +101,7 @@
             <param name="levels_1|rep_counts_0|label" value="group2_rep1"/>
             <param name="levels_1|rep_counts_1|count_data" value="group2_count2.txt"/>
             <param name="levels_1|rep_counts_1|label" value="group2_rep2"/>
-            <output name="outfile" file="test_output_target.html"/>
+            <output name="outfile" file="test_output_target.html" compare="re_match"/>
         </test>
     </tests>
     <help>
@@ -115,4 +115,7 @@
  * In input of SARTools, don't change the "factor of interest", by default is group but you need to change the "Reference biological condition" in order to correspond to one name of the groups.
  * If you add a blocking factor, you need to specify it in "Advanced Parameters" of SARTools
     </help>
+    <citations>
+        <citation type="doi">10.1371/journal.pone.0157022</citation>
+    </citations>
 </tool>
--- a/repository_dependencies.xml	Mon Oct 01 05:07:56 2018 -0400
+++ b/repository_dependencies.xml	Thu Jan 07 11:12:01 2021 +0000
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" ?>
 <repositories description="SARTools requires the Galaxy applicable data format no_unzip.zip">
-     <repository changeset_revision="7800ba9a4c1e" name="no_unzip_datatype" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" />
-</repositories>
+    <repository name="no_unzip_datatype" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" changeset_revision="7800ba9a4c1e"/>
+</repositories>
\ No newline at end of file
--- a/template_script_DESeq2_CL.r	Mon Oct 01 05:07:56 2018 -0400
+++ b/template_script_DESeq2_CL.r	Thu Jan 07 11:12:01 2021 +0000
@@ -184,6 +184,7 @@
 save.image(file=paste0(projectName, ".RData"))
 
 # generating HTML report
+Sys.setenv(HOME = getwd())
 writeReport.DESeq2(target=target, counts=counts, out.DESeq2=out.DESeq2, summaryResults=summaryResults,
                    majSequences=majSequences, workDir=workDir, projectName=projectName, author=author,
                    targetFile=targetFile, rawDir=rawDir, featuresToRemove=featuresToRemove, varInt=varInt,
--- a/test-data/test_output_target.html	Mon Oct 01 05:07:56 2018 -0400
+++ b/test-data/test_output_target.html	Thu Jan 07 11:12:01 2021 +0000
@@ -1,5 +1,5 @@
 label	files	group
-group1_rep1	dataset_1.dat	group1
-group1_rep2	dataset_2.dat	group1
-group2_rep1	dataset_3.dat	group2
-group2_rep2	dataset_4.dat	group2
+group1_rep1	dataset_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.dat	group1
+group1_rep2	dataset_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.dat	group1
+group2_rep1	dataset_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.dat	group2
+group2_rep2	dataset_[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.dat	group2