# HG changeset patch
# User lecorguille
# Date 1456177444 18000
# Node ID 930478b22633bee637109027320317d15e6136f8
planemo upload
diff -r 000000000000 -r 930478b22633 Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,23 @@
+# USAGE: make [install|clean]
+
+# -------- VARIABLE --------
+
+OBJ=xcms_summary.tgz
+DEP=abims_xcms_summary.xml xcms_summary.r tool_dependencies.xml repository_dependencies.xml test-data
+
+
+# ------------------------
+
+all: $(OBJ)
+
+$(OBJ): $(DEP)
+ tar --exclude=".svn" -zchf $@ $^
+
+# ------------------------
+
+install: $(OBJ)
+ mv *.tgz ~
+
+clean:
+ rm *.tgz
+
diff -r 000000000000 -r 930478b22633 README.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,8 @@
+
+Changelog/News
+--------------
+
+**Version 1.0.0 - 10/02/2016**
+
+- NEW: Create a summary of XCMS analysis
+
diff -r 000000000000 -r 930478b22633 abims_xcms_summary.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/abims_xcms_summary.xml Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,80 @@
+
+
+ Create a summary of XCMS analysis
+
+
+ R
+ Rscript
+ xcms
+ camera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10.1093/bioinformatics/btu813
+
+
+
diff -r 000000000000 -r 930478b22633 planemo.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo.sh Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,1 @@
+planemo shed_init -f --name=xcms_summary --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - HTML Summary for XCMS analysis" --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\nThis tool create a HTML summary of XCMS analysis" --category="Metabolomics"
diff -r 000000000000 -r 930478b22633 repository_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/repository_dependencies.xml Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,5 @@
+
+
+
+
+
diff -r 000000000000 -r 930478b22633 test-data/fillpeaks.RData
Binary file test-data/fillpeaks.RData has changed
diff -r 000000000000 -r 930478b22633 test-data/report.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/report.html Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,74 @@
+
+
+
+
+[W4M] XCMS analysis summary
+
+
+
+___ XCMS analysis summary using Workflow4Metabolomics ___
+Samples used:
+sample | filename |
+ HU_neg_051 | sacuri//bio2/HU_neg_051.mzXML |
HU_neg_060 | sacuri//bio2/HU_neg_060.mzXML |
HU_neg_017 | sacuri//bio/HU_neg_017.mzXML |
HU_neg_028 | sacuri//bio/HU_neg_028.mzXML |
Blanc04 | sacuri//blank/Blanc04.mzXML |
Blanc06 | sacuri//blank/Blanc06.mzXML |
+
+Function launched:
+
+timestamp (ymd-h:m:s) | function | argument | value |
+151221-16:20:54 | xcmsSet |
+nSlaves | 1 |
+method | matchedFilter |
+step | 0.01 |
+fwhm | 30 |
+151221-16:37:00 | group |
+method | density |
+sleep | 0.001 |
+minfrac | 0.5 |
+bw | 30 |
+mzwid | 0.25 |
+151221-16:37:20 | fillPeaks |
+method | chrom |
+
+Information about the xcmsSet object:
+
+An "xcmsSet" object with 6 samples
+
+Time range: 16.3-1138.9 seconds (0.3-19 minutes)
+Mass range: 61.9883-481.2446 m/z
+Peaks: 1799 (about 300 per sample)
+Peak Groups: 289
+Sample classes: bio, bio2, blank
+
+Profile settings: method = bin
+ step = 0.01
+
+Memory usage: 0.421 MB
+
+Citations:
+
+- To cite the XCMS package in publications use:
+
+- Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification, Analytical Chemistry, 78:779-787 (2006)
+- Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann: Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008)
+- H. Paul Benton, Elizabeth J. Want and Timothy M. D. Ebbels Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data Bioinformatics, 26:2488 (2010)
+
+
+- To cite the CAMERA package in publications use:
+
+- Kuhl, C., Tautenhahn, R., Boettcher, C., Larson, T. R. and Neumann,S. CAMERA: an integrated strategy for compound spectra extraction and annotation of liquid chromatography/mass spectrometry data sets. Analytical Chemistry, 84:283-289 (2012)
+
+
+- To cite the Workflow4Metabolimics (W4M) project in publications use:
+
+- Franck Giacomoni, Gildas Le Corguillé, Misharl Monsoor, Marion Landi, Pierre Pericard, Mélanie Pétéra, Christophe Duperier, Marie Tremblay-Franco, Jean-François Martin, Daniel Jacob, Sophie Goulitquer, Etienne A. Thévenot and Christophe Caron (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics doi:10.1093/bioinformatics/btu813
+
+
+
+
+
diff -r 000000000000 -r 930478b22633 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r 930478b22633 xcms_summary.r
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xcms_summary.r Mon Feb 22 16:44:04 2016 -0500
@@ -0,0 +1,172 @@
+#!/usr/local/public/bin/Rscript --vanilla --slave --no-site-file
+# version="0.1.0"
+#@author Gildas Le Corguille lecorguille@sb-roscoff.fr ABIMS TEAM
+
+
+
+# ----- ARGUMENTS BLACKLIST -----
+#xcms.r
+argBlacklist=c("zipfile","xfunction","xsetRdataOutput","sampleMetadataOutput","ticspdf","bicspdf","rplotspdf")
+#CAMERA.r
+argBlacklist=c(argBlacklist,"dataMatrixOutput","variableMetadataOutput","new_file_path")
+
+# ----- PACKAGE -----
+
+pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "tcltk","igraph", "xcms","snow","CAMERA","multtest","batch")
+for(pkg in pkgs) {
+ suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))
+}
+
+
+# ----- FUNCTION -----
+writehtml = function(...) { cat(...,"\n", file=htmlOutput,append = TRUE,sep="") }
+
+
+# ----- ARGUMENTS -----
+
+listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
+
+
+# ----- ARGUMENTS PROCESSING -----
+
+#image is an .RData file necessary to use xset variable given by previous tools
+load(listArguments[["image"]]);
+
+htmlOutput = "summary.html"
+if (!is.null(listArguments[["htmlOutput"]])) htmlOutput = listArguments[["htmlOutput"]];
+
+user_email = NULL
+if (!is.null(listArguments[["user_email"]])) user_email = listArguments[["user_email"]];
+
+# if the RData come from CAMERA
+if (!exists("xset") & exists("xa")) xset=xa@xcmsSet
+
+# retrocompatability
+if (!exists("sampleNamesList")) sampleNamesList=List("sampleNamesMakeNames"=make.names(sampnames(xset)))
+
+if (!exists("xset")) stop("You need at least a xset or a xa object.")
+
+
+
+# ----- MAIN PROCESSING INFO -----
+writehtml("")
+writehtml("")
+
+writehtml("")
+ writehtml("")
+
+ writehtml("[W4M] XCMS analysis summary")
+
+ writehtml("")
+writehtml("")
+
+writehtml("")
+ writehtml("___ XCMS analysis summary using Workflow4Metabolomics ___
")
+ # to pass the planemo shed_test
+ if (user_email != "test@bx.psu.edu") {
+ if (!is.null(user_email)) writehtml("By: ",user_email," - ")
+ writehtml("Date: ",format(Sys.time(), "%y%m%d-%H:%M:%S"))
+ }
+ writehtml("")
+
+ writehtml("Samples used:
")
+ writehtml("")
+ if (all(sampnames(xset) != sampleNamesList$sampleNamesMakeNames)) {
+ sampleNameHeaderHtml = paste("sample | ")
+ sampleNameHtml = paste("",sampnames(xset)," | ")
+ } else {
+ sampleNameHeaderHtml = paste("sample | sample renamed | ")
+ sampleNameHtml = paste("",sampnames(xset)," | ",sampleNamesList$sampleNamesMakeNames," | ")
+ }
+
+ if (!exists("md5sumList")) {
+ md5sumHeaderHtml = ""
+ md5sumHtml = ""
+ md5sumLegend=""
+ } else if (!is.null(md5sumList$removalBadCharacters)) {
+ md5sumHeaderHtml = paste("md5sum* | ")
+ md5sumHtml = paste("",md5sumList$origin," | ")
+ md5sumLegend = "
*The program md5sum is designed to verify data integrity. So you can check if the data were uploaded correctly or if the data were chancged during the process."
+ } else {
+ md5sumHeaderHtml = paste("md5sum* | md5sum** after bad characters removal | ")
+ md5sumHtml = paste("",md5sumList$origin," | ",md5sumList$origin," | ")
+ md5sumLegend = "
*The program md5sum is designed to verify data integrity. So you can check if the data were uploaded correctly or if the data were chancged during the process.
**Because some bad characters (eg: accent) were removed from your original file, the checksum have changed too.
"
+ }
+
+ writehtml("",sampleNameHeaderHtml,"filename | ",md5sumHeaderHtml,"
")
+ writehtml(paste("",sampleNameHtml,"",xset@filepaths," | ",md5sumHtml,"
"))
+
+ writehtml("
")
+ writehtml(md5sumLegend)
+ writehtml("
")
+
+ writehtml("Function launched:
")
+ writehtml("")
+ writehtml("timestamp*** | function | argument | value |
")
+ for(tool in names(listOFlistArguments)) {
+ listOFlistArgumentsDisplay=listOFlistArguments[[tool]][!(names(listOFlistArguments[[tool]]) %in% argBlacklist)]
+
+ timestamp = strsplit(tool,"_")[[1]][1]
+ xcmsFunction = strsplit(tool,"_")[[1]][2]
+ writehtml("",timestamp," | ",xcmsFunction," | ")
+ line_begin=""
+ for (arg in names(listOFlistArgumentsDisplay)) {
+ writehtml(line_begin,"",arg," | ",unlist(listOFlistArgumentsDisplay[arg][1])," |
")
+ line_begin=""
+ }
+ }
+ writehtml("
")
+ writehtml("
***timestamp format: yymmdd-hh:mm:ss")
+ writehtml("
")
+
+ writehtml("Informations about the xcmsSet object:
")
+
+ writehtml("")
+ log_file=file(htmlOutput, open = "at")
+ sink(log_file)
+ sink(log_file, type = "output")
+ xset
+ sink()
+ writehtml("
")
+
+ if (exists("xa")) {
+ writehtml("Informations about the CAMERA object:
")
+
+ writehtml("")
+ writehtml("Number of pcgroup:",length(xa@pspectra))
+ writehtml("
")
+ }
+
+ writehtml("Citations:
")
+ writehtml("")
+ writehtml("- To cite the XCMS package in publications use:")
+ writehtml("
")
+ writehtml("- ","Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification, Analytical Chemistry, 78:779-787 (2006)","
")
+ writehtml("- ","Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann: Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008)","
")
+ writehtml("- ","H. Paul Benton, Elizabeth J. Want and Timothy M. D. Ebbels Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data Bioinformatics, 26:2488 (2010)","
")
+ writehtml("
")
+ writehtml(" ")
+
+ writehtml("- To cite the CAMERA package in publications use:")
+ writehtml("
")
+ writehtml("- ","Kuhl, C., Tautenhahn, R., Boettcher, C., Larson, T. R. and Neumann,S. CAMERA: an integrated strategy for compound spectra extraction and annotation of liquid chromatography/mass spectrometry data sets. Analytical Chemistry, 84:283-289 (2012)","
")
+ writehtml("
")
+ writehtml(" ")
+
+ writehtml("- To cite the Workflow4Metabolimics (W4M) project in publications use:")
+ writehtml("
")
+ writehtml("- ","Franck Giacomoni, Gildas Le Corguillé, Misharl Monsoor, Marion Landi, Pierre Pericard, Mélanie Pétéra, Christophe Duperier, Marie Tremblay-Franco, Jean-François Martin, Daniel Jacob, Sophie Goulitquer, Etienne A. Thévenot and Christophe Caron (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics doi:10.1093/bioinformatics/btu813","
")
+ writehtml("
")
+ writehtml(" ")
+ writehtml("
")
+
+writehtml("")
+
+writehtml("")
+