Next changeset 1:457a68338c2f (2016-02-24) |
Commit message:
planemo upload |
added:
Makefile README.rst abims_xcms_summary.xml planemo.sh repository_dependencies.xml test-data/fillpeaks.RData test-data/report.html tool_dependencies.xml xcms_summary.r |
b |
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 + |
b |
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 |
b |
@@ -0,0 +1,8 @@ + +Changelog/News +-------------- + +**Version 1.0.0 - 10/02/2016** + +- NEW: Create a summary of XCMS analysis + |
b |
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 @@ +<tool id="abims_xcms_summary" name="xcms.summary" version="1.0.0"> + + <description>Create a summary of XCMS analysis</description> + + <requirements> + <requirement type="package" version="3.1.2">R</requirement> + <requirement type="binary">Rscript</requirement> + <requirement type="package" version="1.44.0">xcms</requirement> + <requirement type="package" version="1.22.0">camera</requirement> + </requirements> + + <stdio> + <exit_code range="1:" level="fatal" /> + </stdio> + + <command interpreter="Rscript"><![CDATA[ + xcms_summary.r + + image $image + htmlOutput $htmlOutput + user_email $__user_email__ + + ]]></command> + + <inputs> + + <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata.xcms.fillpeaks,rdata.camera.quick,rdata.camera.positive,rdata.camera.negative,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, group, retcor, fillpeaks etc.)" /> + + </inputs> + + <outputs> + <data name="htmlOutput" format="html" label="xcms summary html" /> + </outputs> + + <tests> + <test> + <param name="image" value="fillpeaks.RData" /> + <output name="htmlOutput" file="summary.html" /> + </test> + </tests> + + <help><![CDATA[ + +.. class:: infomark + +**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff part of Workflow4Metabolomics.org [W4M] + + | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool. + +--------------------------------------------------- + +============ +Xcms.summary +============ + +----------- +Description +----------- + +This tool provide a HTML summary which summarizes your analysis using the [W4M] XCMS and CAMERA tools + + +--------------------------------------------------- + +Changelog/News +-------------- + +**Version 1.0.0 - 10/02/2016** + +- NEW: Create a summary of XCMS analysis + + + ]]></help> + + + <citations> + <citation type="doi">10.1093/bioinformatics/btu813</citation> + </citations> + +</tool> |
b |
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" |
b |
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 |
b |
@@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<repositories> + <repository changeset_revision="d64562a4ebb3" name="rdata_xcms_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" /> + <repository changeset_revision="4a51ab3d8ecf" name="rdata_camera_datatypes" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" /> +</repositories> |
b |
diff -r 000000000000 -r 930478b22633 test-data/fillpeaks.RData |
b |
Binary file test-data/fillpeaks.RData has changed |
b |
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 @@ +<!DOCTYPE html> +<HTML lang='en'> +<HEAD> +<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> +<title>[W4M] XCMS analysis summary</title> +<style> +table { min-width: 500px; border:1px solid #D6B161; border-collapse:collapse;} +th { background: #898989; text-align:left;} +tr { border: 1px solid #000000 } +h2 { color: #FFA212; } +ul li { margin-bottom:10px; } +</style> +</HEAD> +<BODY> +<h1>___ XCMS analysis summary using Workflow4Metabolomics ___</h1> +<h2>Samples used:</h2> +<table +<tr><th>sample</th><th>filename</th></tr> +<tr><td> HU_neg_051 </td><td> sacuri//bio2/HU_neg_051.mzXML </td></tr><tr><td> HU_neg_060 </td><td> sacuri//bio2/HU_neg_060.mzXML </td></tr><tr><td> HU_neg_017 </td><td> sacuri//bio/HU_neg_017.mzXML </td></tr><tr><td> HU_neg_028 </td><td> sacuri//bio/HU_neg_028.mzXML </td></tr><tr><td> Blanc04 </td><td> sacuri//blank/Blanc04.mzXML </td></tr><tr><td> Blanc06 </td><td> sacuri//blank/Blanc06.mzXML </td></tr> +</table> +<h2>Function launched:</h2> +<table> +<tr><th>timestamp<br />(ymd-h:m:s)</th><th>function</th><th>argument</th><th>value</th></tr> +<tr><td rowspan='4'>151221-16:20:54</td><td rowspan='4'>xcmsSet</td> +<td>nSlaves</td><td>1</td></tr> +<tr><td>method</td><td>matchedFilter</td></tr> +<tr><td>step</td><td>0.01</td></tr> +<tr><td>fwhm</td><td>30</td></tr> +<tr><td rowspan='5'>151221-16:37:00</td><td rowspan='5'>group</td> +<td>method</td><td>density</td></tr> +<tr><td>sleep</td><td>0.001</td></tr> +<tr><td>minfrac</td><td>0.5</td></tr> +<tr><td>bw</td><td>30</td></tr> +<tr><td>mzwid</td><td>0.25</td></tr> +<tr><td rowspan='1'>151221-16:37:20</td><td rowspan='1'>fillPeaks</td> +<td>method</td><td>chrom</td></tr> +</table> +<h2>Information about the xcmsSet object:</h2> +<pre> +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 +</pre> +<h2>Citations:</h2> +<ul> +<li>To cite the <b>XCMS</b> package in publications use: +<ul> +<li>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)</li> +<li>Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann: Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008)</li> +<li>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)</li> +</ul> +</li> +<li>To cite the <b>CAMERA</b> package in publications use: +<ul> +<li>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)</li> +</ul> +</li> +<li>To cite the <b>Workflow4Metabolimics (W4M)</b> project in publications use: +<ul> +<li>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</li> +</ul> +</li> +</ul> +</BODY> +</HTML> |
b |
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 |
b |
@@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="R" version="3.1.2"> + <repository changeset_revision="c987143177d4" name="package_r_3_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="camera" version="1.22.0"> + <repository changeset_revision="845eb883bd1b" name="package_r_camera_1_22_0" owner="lecorguille" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency> |
b |
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 |
[ |
b'@@ -0,0 +1,172 @@\n+#!/usr/local/public/bin/Rscript --vanilla --slave --no-site-file\n+# version="0.1.0"\n+#@author Gildas Le Corguille lecorguille@sb-roscoff.fr ABIMS TEAM\n+\n+\n+\n+# ----- ARGUMENTS BLACKLIST -----\n+#xcms.r\n+argBlacklist=c("zipfile","xfunction","xsetRdataOutput","sampleMetadataOutput","ticspdf","bicspdf","rplotspdf")\n+#CAMERA.r\n+argBlacklist=c(argBlacklist,"dataMatrixOutput","variableMetadataOutput","new_file_path")\n+\n+# ----- PACKAGE -----\n+\n+pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "tcltk","igraph", "xcms","snow","CAMERA","multtest","batch")\n+for(pkg in pkgs) {\n+ suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))\n+}\n+\n+\n+# ----- FUNCTION -----\n+writehtml = function(...) { cat(...,"\\n", file=htmlOutput,append = TRUE,sep="") }\n+\n+\n+# ----- ARGUMENTS -----\n+\n+listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects\n+\n+\n+# ----- ARGUMENTS PROCESSING -----\n+\n+#image is an .RData file necessary to use xset variable given by previous tools\n+load(listArguments[["image"]]);\n+\n+htmlOutput = "summary.html"\n+if (!is.null(listArguments[["htmlOutput"]])) htmlOutput = listArguments[["htmlOutput"]];\n+\n+user_email = NULL\n+if (!is.null(listArguments[["user_email"]])) user_email = listArguments[["user_email"]];\n+\n+# if the RData come from CAMERA\n+if (!exists("xset") & exists("xa")) xset=xa@xcmsSet\n+\n+# retrocompatability\n+if (!exists("sampleNamesList")) sampleNamesList=List("sampleNamesMakeNames"=make.names(sampnames(xset)))\n+\n+if (!exists("xset")) stop("You need at least a xset or a xa object.")\n+\n+\n+\n+# ----- MAIN PROCESSING INFO -----\n+writehtml("<!DOCTYPE html>")\n+writehtml("<HTML lang=\'en\'>")\n+\n+writehtml("<HEAD>")\n+ writehtml("<meta http-equiv=\'Content-Type\' content=\'text/html; charset=UTF-8\' />")\n+\n+ writehtml("<title>[W4M] XCMS analysis summary</title>")\n+ \n+ writehtml("<style>")\n+ writehtml("table, tr, td, th { border: 1px solid #000000; border-collapse:collapse; }")\n+ writehtml("td,th { padding: 5px; padding-right: 12px; }")\n+ writehtml("th { background: #898989; text-align:left;color: white;}")\n+ writehtml("h2 { color: #FFA212; }")\n+ writehtml("ul li { margin-bottom:10px; }")\n+ writehtml("</style>")\n+writehtml("</HEAD>")\n+\n+writehtml("<BODY>")\n+ writehtml("<div><h1>___ XCMS analysis summary using Workflow4Metabolomics ___</h1>")\n+ # to pass the planemo shed_test\n+ if (user_email != "test@bx.psu.edu") {\n+ if (!is.null(user_email)) writehtml("By: ",user_email," - ")\n+ writehtml("Date: ",format(Sys.time(), "%y%m%d-%H:%M:%S"))\n+ }\n+ writehtml("</div>")\n+\n+ writehtml("<h2>Samples used:</h2>")\n+ writehtml("<div><table>")\n+ if (all(sampnames(xset) != sampleNamesList$sampleNamesMakeNames)) {\n+ sampleNameHeaderHtml = paste("<th>sample</th>")\n+ sampleNameHtml = paste("<td>",sampnames(xset),"</td>")\n+ } else {\n+ sampleNameHeaderHtml = paste("<th>sample</th><th>sample renamed</th>")\n+ sampleNameHtml = paste("<td>",sampnames(xset),"</td><td>",sampleNamesList$sampleNamesMakeNames,"</td>")\n+ } \n+ \n+ if (!exists("md5sumList")) {\n+ md5sumHeaderHtml = ""\n+ md5sumHtml = ""\n+ md5sumLegend=""\n+ } else if (!is.null(md5sumList$removalBadCharacters)) {\n+ md5sumHeaderHtml = paste("<th>md5sum<sup>*</sup></th>")\n+ md5sumHtml = paste("<td>",md5sumList$origin,"</td>")\n+ md5sumLegend = "<br/><sup>*</sup>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."\n+ } else {\n+ md5sumHeaderHtml = paste("<th>md5sum<sup>*</sup></th><th>md5sum<sup>**</sup> after bad characters removal</th>")\n+ md5sumHtml = paste("<td>",md5sumList$origin,"</td><td'..b'he checksum have changed too.<br/>"\n+ } \n+ \n+ writehtml("<tr>",sampleNameHeaderHtml,"<th>filename</th>",md5sumHeaderHtml,"</tr>")\n+ writehtml(paste("<tr>",sampleNameHtml,"<td>",xset@filepaths,"</td>",md5sumHtml,"</tr>"))\n+ \n+ writehtml("</table>")\n+ writehtml(md5sumLegend)\n+ writehtml("</div>")\n+\n+ writehtml("<h2>Function launched:</h2>")\n+ writehtml("<div><table>")\n+ writehtml("<tr><th>timestamp<sup>***</sup></th><th>function</th><th>argument</th><th>value</th></tr>")\n+ for(tool in names(listOFlistArguments)) {\n+ listOFlistArgumentsDisplay=listOFlistArguments[[tool]][!(names(listOFlistArguments[[tool]]) %in% argBlacklist)]\n+\n+ timestamp = strsplit(tool,"_")[[1]][1]\n+ xcmsFunction = strsplit(tool,"_")[[1]][2]\n+ writehtml("<tr><td rowspan=\'",length(listOFlistArgumentsDisplay),"\'>",timestamp,"</td><td rowspan=\'",length(listOFlistArgumentsDisplay),"\'>",xcmsFunction,"</td>")\n+ line_begin=""\n+ for (arg in names(listOFlistArgumentsDisplay)) {\n+ writehtml(line_begin,"<td>",arg,"</td><td>",unlist(listOFlistArgumentsDisplay[arg][1]),"</td></tr>")\n+ line_begin="<tr>"\n+ }\n+ }\n+ writehtml("</table>")\n+ writehtml("<br/><sup>***</sup>timestamp format: yymmdd-hh:mm:ss")\n+ writehtml("</div>")\n+\n+ writehtml("<h2>Informations about the xcmsSet object:</h2>")\n+\n+ writehtml("<div><pre>")\n+ log_file=file(htmlOutput, open = "at")\n+ sink(log_file)\n+ sink(log_file, type = "output")\n+ xset\n+ sink()\n+ writehtml("</pre></div>")\n+\n+ if (exists("xa")) {\n+ writehtml("<h2>Informations about the CAMERA object:</h2>")\n+\n+ writehtml("<div>")\n+ writehtml("Number of pcgroup:",length(xa@pspectra))\n+ writehtml("</div>")\n+ }\n+\n+ writehtml("<h2>Citations:</h2>")\n+ writehtml("<div><ul>")\n+ writehtml("<li>To cite the <b>XCMS</b> package in publications use:")\n+ writehtml("<ul>")\n+ writehtml("<li>","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)","</li>")\n+ writehtml("<li>","Ralf Tautenhahn, Christoph Boettcher, Steffen Neumann: Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008)","</li>")\n+ writehtml("<li>","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)","</li>")\n+ writehtml("</ul>")\n+ writehtml("</li>")\n+\n+ writehtml("<li>To cite the <b>CAMERA</b> package in publications use:")\n+ writehtml("<ul>")\n+ writehtml("<li>","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)","</li>")\n+ writehtml("</ul>")\n+ writehtml("</li>")\n+\n+ writehtml("<li>To cite the <b>Workflow4Metabolimics (W4M)</b> project in publications use:")\n+ writehtml("<ul>")\n+ writehtml("<li>","Franck Giacomoni, Gildas Le Corguill\xc3\xa9, Misharl Monsoor, Marion Landi, Pierre Pericard, M\xc3\xa9lanie P\xc3\xa9t\xc3\xa9ra, Christophe Duperier, Marie Tremblay-Franco, Jean-Fran\xc3\xa7ois Martin, Daniel Jacob, Sophie Goulitquer, Etienne A. Th\xc3\xa9venot and Christophe Caron (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics doi:10.1093/bioinformatics/btu813","</li>")\n+ writehtml("</ul>")\n+ writehtml("</li>")\n+ writehtml("</ul></div>")\n+\n+writehtml("</BODY>")\n+\n+writehtml("</HTML>")\n+\n' |