# HG changeset patch # User lecorguille # Date 1450859918 18000 # Node ID f9b3dae104eb64c644f40e53707ff1fc5826a23d planemo upload commit 73f46f4e08141f78927056fa3e4709d0ab323972 diff -r 000000000000 -r f9b3dae104eb abims_xcms_report.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/abims_xcms_report.xml Wed Dec 23 03:38:38 2015 -0500 @@ -0,0 +1,69 @@ + + + Create a report of XCMS analysis + + + R + Rscript + xcms + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.1093/bioinformatics/btu813 + + + diff -r 000000000000 -r f9b3dae104eb planemo.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/planemo.sh Wed Dec 23 03:38:38 2015 -0500 @@ -0,0 +1,1 @@ +planemo shed_init -f --name=xcms_report --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - HTML Report 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 report of XCMS analysis" --category="Metabolomics" diff -r 000000000000 -r f9b3dae104eb test-data/fillpeaks.RData Binary file test-data/fillpeaks.RData has changed diff -r 000000000000 -r f9b3dae104eb test-data/report.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/report.html Wed Dec 23 03:38:38 2015 -0500 @@ -0,0 +1,76 @@ + + + + +[W4M] XCMS analysis report + + + +

___ XCMS analysis report using Workflow4Metabolomics ___

+By: lecorguille@sb-roscoff.fr - +Date: 151223-09:22:45 +

Samples used:

+ + +
samplefilename
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)
functionargumentvalue
151221-16:20:54xcmsSetnSlaves1
methodmatchedFilter
step0.01
fwhm30
151221-16:37:00groupmethoddensity
sleep0.001
minfrac0.5
bw30
mzwid0.25
151221-16:37:20fillPeaksmethodchrom
+

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:

+ + + diff -r 000000000000 -r f9b3dae104eb xcms_report.r --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xcms_report.r Wed Dec 23 03:38:38 2015 -0500 @@ -0,0 +1,129 @@ +#!/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", "xcms","snow","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 = "report.html" +if (!is.null(listArguments[["htmlOutput"]])){ + htmlOutput = listArguments[["htmlOutput"]]; +} + +user_email = NULL +if (!is.null(listArguments[["user_email"]])){ + user_email = listArguments[["user_email"]]; +} + + +# ----- MAIN PROCESSING INFO ----- +writehtml("") +writehtml("") + +writehtml("") + writehtml("") + + writehtml("[W4M] XCMS analysis report") + + writehtml("") +writehtml("") + +writehtml("") + writehtml("

___ XCMS analysis report using Workflow4Metabolomics ___

") + if (!is.null(user_email)) writehtml("By: ",user_email," - ") + writehtml("Date: ",format(Sys.time(), "%y%m%d-%H:%M:%S")) + + + writehtml("

Samples used:

") + writehtml("samplefilename") + writehtml(paste("",sampnames(xset),"",xset@filepaths,"")) + writehtml("") + + writehtml("

Function launched:

") + writehtml("") + writehtml("") + for(tool in names(listOFlistArguments)) { + listOFlistArgumentsDisplay=listOFlistArguments[[tool]][!(names(listOFlistArguments[[tool]]) %in% argBlacklist)] + + timestamp = strsplit(tool,"_")[[1]][1] + xcmsFunction = strsplit(tool,"_")[[1]][2] + writehtml("") + line_begin="" + for (arg in names(listOFlistArgumentsDisplay)) { + writehtml(line_begin,"") + line_begin="" + } + } + writehtml("
timestamp
(ymd-h:m:s)
functionargumentvalue
",timestamp,"",xcmsFunction,"",arg,"",unlist(listOFlistArgumentsDisplay[arg][1]),"
") + + writehtml("

Information about the xcmsSet object:

") + + log_file=file(htmlOutput, open = "at") + writehtml("
")
+        sink(log_file)
+        sink(log_file, type = "output")
+            xset
+        sink()
+    writehtml("
") + + writehtml("

Citations:

") + writehtml("") + +writehtml("") + +writehtml("") +