# HG changeset patch
# User lecorguille
# Date 1438958975 14400
# Node ID 054e4681667c04a5ff6d137acedf81b089b4a9a7
planemo upload
diff -r 000000000000 -r 054e4681667c Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,23 @@
+# 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 000000000000 -r 054e4681667c abims_xcms_xcmsSet.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/abims_xcms_xcmsSet.xml	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,403 @@
+
+    
+    Filtration and Peak Identification using xcmsSet function from xcms R package to preprocess LC/MS data for relative quantification and statistical analysis 
+    
+    
+        R
+        Rscript
+        xcms
+        xcms_w4m_script
+    
+    
+    
+        
+    
+    
+    
+        xcms.r
+        #if $inputs.input == "lib":
+            library $__app__.config.user_library_import_dir/$__user_email__/$inputs.library
+        #elif $inputs.input == "zip_file":
+            zipfile $inputs.zip_file
+        #end if
+
+        xfunction xcmsSet
+        ## profmethod $profmethod 
+        nSlaves \${GALAXY_SLOTS:-1} method $methods.method 
+        #if $methods.method == "centWave":
+            ppm $methods.ppm
+            peakwidth "c($methods.peakwidth)"
+        #if $methods.options_scanrange.option == "show":
+                scanrange "c($methods.options_scanrange.scanrange)"
+            #end if 
+            #if $methods.options_c.option == "show":
+                mzdiff $methods.options_c.mzdiff
+                snthresh $methods.options_c.snthresh
+                integrate $methods.options_c.integrate
+                noise $methods.options_c.noise
+                prefilter "c($methods.options_c.prefilter)"
+            #end if
+        #elif $methods.method == "matchedFilter":
+            step $methods.step
+            fwhm $methods.fwhm
+            #if $methods.options_m.option == "show":
+                ## 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
+            #end if
+        #elif $methods.method == "MSW":
+            snthr $methods.snthr
+            nearbyPeak $methods.nearbyPeak
+            winSize.noise $methods.winSize_noise
+            amp.Th $methods.amp_Th
+            scales "c($methods.scales)"
+            SNR.method "$methods.SNR_method"
+        #end if
+        && (mv xcmsSet.RData $xsetRData;
+        mv sampleMetadata.tsv $sampleMetadata;
+        mv TICs_raw.pdf $ticsRawPdf;
+        mv BPCs_raw.pdf $bpcsRawPdf;
+        mv xset.log $log);
+        cat $log
+    
+    
+    
+
+        
+            
+                
+                
+            
+            
+                
+             
+            
+                
+                 
+            
+                
+
+        
+
+       
+
+        
+            
+                
+                
+                
+            
+
+            
+            
+                
+                
+                
+                    
+                        
+                        
+                    
+                    
+                        
+                             
+                        
+                    
+                
+                        
+                
+                    
+                        
+                        
+                    
+                    
+                        
+                        
+                        
+                            
+                            
+                        
+                        
+                        
+                    
+                
+            
+
+        
+            
+                
+                
+                
+                    
+                        
+                        
+                    
+                    
+
+                        
+                        
+                        
+
+                    
+                
+            
+
+        
+            
+                
+                    
+                    
+                
+                
+                
+                
+                
+                
+            
+        
+    
+    
+    
+        
+        
+        
+        
+        
+    
+    
+    
+        
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+        
+    
+    
+    
+
+.. class:: infomark
+
+**Authors**  Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu 
+
+.. class:: infomark
+
+**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@univ-nantes.fr - part of Workflow4Metabolomics.org [W4M]
+
+ | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
+
+---------------------------------------------------
+
+============
+Xcms.xcmsSet
+============
+
+-----------
+Description
+-----------
+
+This tool is used for preprocessing analyte data from multiple LC/MS files (formats NetCDF, mzXML and mzData). It extracts ion from each sample independently and using a statistic model, peaks are filtered and integrated.
+You can read a tutorial on how to perform xcms preprocessing which is available here_.
+
+.. _here: http://web11.sb-roscoff.fr/download/w4m/howto/w4m_HowToPerformXcmsPreprocessing_v02.pdf
+
+
+-----------------
+Workflow position
+-----------------
+
+**Upstream tools**
+
+========================= ================= ======= =========
+Name                      output file       format  parameter
+========================= ================= ======= =========
+NA                        NA                zip     NA       
+========================= ================= ======= =========
+
+
+**Downstream tools**
+
++---------------------------+--------------------+-----------------+
+| Name                      | Output file        | Format          |
++===========================+====================+=================+
+|xcms.group                 | xset.RData         | rdata.xcms.raw  |
++---------------------------+--------------------+-----------------+
+|PCA ellipsoid by factors   | sampleMetadata.tsv | Tabular         |
++---------------------------+--------------------+-----------------+
+|Anova                      | sampleMetadata.tsv | Tabular         |
++---------------------------+--------------------+-----------------+
+
+
+**Example of a metabolomic workflow**
+
+.. image:: XCMS_Galaxy_workflow.png
+
+
+------
+
+.. class:: infomark 
+
+The output file is an xset.RData file. You can continue your analysis using it in **xcms.group** tool.
+
+---------------------------------------------------
+
+
+
+-----------
+Input files
+-----------
+
++---------------------------+------------+
+| Parameter : num + label   |   Format   |
++===========================+============+
+| 1 : Choose your inputs    |   zip      |
++---------------------------+------------+
+
+**Choose your inputs**
+
+You have two methods for your inputs:
+
+    | Zip file (recommended): You can put a zip file containing your inputs: myinputs.zip (containing all your conditions as sub-directories).
+    | library folder: You must specify the name of your "library" (folder) created within your space project (for example: /projet/externe/institut/login/galaxylibrary/yourlibrary). Your library must contain all your conditions as sub-directories.
+
+----------
+Parameters
+----------
+
+Extraction method for peaks detection
+-------------------------------------
+
+**Matched Filter**
+
+    | One parameter to consider is the Gaussian model peak width used for matched filtration,an integral part of the peak detection algorithm. 
+    | For a discussion of how model peak width affects the signal to noise ratio, see Danielsson et al. (2002).
+
+
+**cent Wave**
+
+    | This algorithm is most suitable for high resolution LC/{TOF,OrbiTrap,FTICR}-MS data in centroid mode.
+    | Due to the fact that peak centroids are used, a binning step is not necessary.
+    | The method is capable of detecting close-by-peaks and also overlapping peaks. Some efforts are made to detect the exact peak boundaries to get precise peak integrals.
+
+**MSW**
+
+    | Wavelet based, used for direct infusion data. Continuous wavelet transform (CWT) can be used to locate chromatographic peaks on different scales.
+    | If you wish to have more details about the other parameters, you can read the following documents:
+    | -Example of preprocessing data with XCMS : http://www.bioconductor.org/packages/2.12/bioc/vignettes/xcms/inst/doc/xcmsPreprocess.pdf
+    | -Details and explanations for all the parameters of XCMS package: http://www.bioconductor.org/packages/release/bioc/manuals/xcms/man/xcms.pdf
+
+
+------------
+Output files
+------------
+
+xset.TICs_raw.pdf
+
+    | "Total Ion Chromatograms" graph in pdf format.
+
+xset.BPCs_raw.pdf
+
+    | "Base Peak Chromatograms" graph in pdf format with each class samples opposed.
+
+sampleMetadata.tsv
+
+    | Tabular file that contains for each sample, it's associated class and polarity (positive,negative and mixed).
+    | This file is necessary in the Anova and PCA step of the workflow.
+
+xset.RData: rdata.xcms.raw format
+
+    | Rdata file that is necessary in the second step of the workflow "xcms.group".
+    
+------
+
+.. class:: infomark 
+
+The output file is an xset.RData file. You can continue your analysis using it in **xcms.group** tool.
+
+---------------------------------------------------
+
+---------------
+Working example
+---------------
+
+Input files
+-----------
+
+    | zip_file -> **sacuri.zip**
+
+Parameters
+----------
+
+    | Method -> **matchedFilter**
+    | step   -> **0.01**
+    | fwhm   -> **4** 
+    | Advanced option -> **show**
+    | max: -> **50**
+    | snthresh -> **1**
+    | steps -> **2**
+
+
+Output files
+------------
+
+    | **1) xset.RData: RData file**
+
+    | **2) Example of a sampleMetadata.tsv  :**
+
+
++---------------------------+------------+---------+
+| sampleMetadata            |   class    | polarity|
++===========================+============+=========+
+|HU_neg_017                 |   bio      |negative |
++---------------------------+------------+---------+
+|HU_neg_028                 |   bio      |negative |
++---------------------------+------------+---------+
+|HU_neg_034                 |   bio      |negative |
++---------------------------+------------+---------+
+|Blanc04                    |   blank    |negative |
++---------------------------+------------+---------+
+|Blanc06                    |   blank    |negative |
++---------------------------+------------+---------+
+|Blanc09                    |   blank    |negative |
++---------------------------+------------+---------+
+
+
+
+    | **3) Example of xset.TICs_raw.pdf (Total Ion Chromatograms) :**
+
+.. image:: xcms_tics.png
+
+
+    
+
+
+    
+        10.1021/ac051437y
+        10.1093/bioinformatics/btu813
+    
+
+
diff -r 000000000000 -r 054e4681667c planemo.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo.sh	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,1 @@
+planemo shed_init -f --name=xcms_xcms_set --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - peaks calling in NetCDF/mzXML files" --homepage_url="http://workflow4metabolomics.org" --long_description="Part of the W4M project: http://workflow4metabolomics.org\n\nXCMS: http://www.bioconductor.org/packages/release/bioc/html/xcms.html\n\nFiltration and Peak Identification using xcmsSet function from xcms R package to preprocess LC/MS data for relative quantification and statistical analysis\n\nBEWARE: this tool don't come with its script. You will need to install the dedicated package_xcms_w4m_script too" --category="Metabolomics"
diff -r 000000000000 -r 054e4681667c repository_dependencies.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/repository_dependencies.xml	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,5 @@
+
+
+    
+	
+
diff -r 000000000000 -r 054e4681667c static/images/XCMS_Galaxy_workflow.png
Binary file static/images/XCMS_Galaxy_workflow.png has changed
diff -r 000000000000 -r 054e4681667c static/images/xcms_tics.png
Binary file static/images/xcms_tics.png has changed
diff -r 000000000000 -r 054e4681667c test-data/sacuri.zip
Binary file test-data/sacuri.zip has changed
diff -r 000000000000 -r 054e4681667c test-data/sampleMetadata.tsv
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sampleMetadata.tsv	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,10 @@
+sampleMetadata	class	polarity
+HU_neg_028	bio	negative
+HU_neg_060	bio	negative
+HU_neg_051	bio	negative
+HU_neg_017	bio	negative
+HU_neg_034	bio	negative
+Blanc09	blank	negative
+Blanc06	blank	negative
+Blanc12	blank	negative
+Blanc04	blank	negative
diff -r 000000000000 -r 054e4681667c test-data/xset.BPCs_raw.pdf
Binary file test-data/xset.BPCs_raw.pdf has changed
diff -r 000000000000 -r 054e4681667c test-data/xset.RData
Binary file test-data/xset.RData has changed
diff -r 000000000000 -r 054e4681667c test-data/xset.TICs_raw.pdf
Binary file test-data/xset.TICs_raw.pdf has changed
diff -r 000000000000 -r 054e4681667c test-data/xset.log.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/xset.log.txt	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,56 @@
+	PACKAGE INFO
+parallel	3.1.1
+BiocGenerics	0.12.1
+Biobase	2.26.0
+Rcpp	0.11.5
+mzR	2.0.0
+igraph	0.7.1
+xcms	1.42.0
+snow	0.3.13
+batch	1.1.4
+
+
+	ARGUMENTS INFO
+zipfile	/w/galaxy/galaxy4metabolomics/galaxy-dist/database/files/041/dataset_41794.dat
+xfunction	xcmsSet
+nSlaves	8
+method	matchedFilter
+step	0.01
+fwhm	4
+max	50
+snthresh	1
+steps	2
+
+
+	INFILE PROCESSING INFO
+
+
+	MAIN PROCESSING INFO
+Starting snow cluster with 8 local sockets.
+Detecting features in file # 1 : HU_neg_028.mzXML 
+Detecting features in file # 2 : HU_neg_060.mzXML 
+Detecting features in file # 3 : HU_neg_051.mzXML 
+Detecting features in file # 4 : HU_neg_017.mzXML 
+Detecting features in file # 5 : HU_neg_034.mzXML 
+Detecting features in file # 6 : Blanc09.mzXML 
+Detecting features in file # 7 : Blanc06.mzXML 
+Detecting features in file # 8 : Blanc12.mzXML 
+Detecting features in file # 9 : Blanc04.mzXML 
+
+
+	XSET OBJECT INFO
+An "xcmsSet" object with 9 samples
+
+Time range: 0.7-1140 seconds (0-19 minutes)
+Mass range: 50.0019-999.9863 m/z
+Peaks: 135846 (about 15094 per sample)
+Peak Groups: 0 
+Sample classes: bio, blank 
+
+Profile settings: method = bin
+                  step = 0.01
+
+Memory usage: 13.8 MB
+
+
+	DONE
diff -r 000000000000 -r 054e4681667c tool_dependencies.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Aug 07 10:49:35 2015 -0400
@@ -0,0 +1,12 @@
+
+
+    
+        
+    
+    
+        
+    
+    
+        
+    
+
diff -r 000000000000 -r 054e4681667c xcms_set.tgz
Binary file xcms_set.tgz has changed