Mercurial > repos > pieterlukasse > prims_metabolomics
changeset 8:ddef5534c294
new tool diffreport
author | pieter.lukasse@wur.nl |
---|---|
date | Thu, 06 Nov 2014 13:06:25 +0100 |
parents | 504be42b4927 |
children | 31ec089d20a4 |
files | metams_lcms_annotate.xml static/images/diffreport.png static/images/test/out2/fig_eic/001.png static/images/test/out2/fig_eic/002.png static/images/test/out2/fig_eic/003.png static/images/test/out2/fig_eic/004.png static/images/test/out2/fig_eic/005.png static/images/test/out2/fig_eic/006.png static/images/test/out2/fig_eic/007.png static/images/test/out2/fig_eic/008.png static/images/test/out2/fig_eic/009.png static/images/test/out2/fig_eic/010.png xcms_differential_analysis.r xcms_differential_analysis.xml |
diffstat | 14 files changed, 59 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/metams_lcms_annotate.xml Thu Nov 06 11:32:16 2014 +0100 +++ b/metams_lcms_annotate.xml Thu Nov 06 13:06:25 2014 +0100 @@ -1,4 +1,4 @@ -<tool id="metams_lcms_annotate" name="METAMS-LC/MS Annotate" version="0.0.1"> +<tool id="metams_lcms_annotate" name="METAMS-LC/MS Annotate" version="0.0.3"> <description> Runs metaMS process for LC/MS feature grouping and annotation</description> <requirements> <requirement type="package" version="3.1.1">R_bioc_metams</requirement>
--- a/xcms_differential_analysis.r Thu Nov 06 11:32:16 2014 +0100 +++ b/xcms_differential_analysis.r Thu Nov 06 13:06:25 2014 +0100 @@ -38,22 +38,17 @@ xcmsSet <- readRDS(args.xsetData) # info: levels(xcmsSet@phenoData$class) also gives access to the class names - - reporttab <- diffreport(xcmsSet, args.class1, args.class2, args.htmlReportFile.files_path, args.topcount, metlin = 0.15, h=480, w=640) + dir.create(file.path(args.htmlReportFile.files_path), showWarnings = FALSE) + reporttab <- diffreport(xcmsSet, args.class1, args.class2, paste(args.htmlReportFile.files_path,"/fig", sep=""), args.topcount, metlin = 0.15, h=480, w=640) # write out tsv table: write.table(reporttab, args.outTable, sep="\t", row.names=FALSE) message("\nGenerating report.........") - # report - dir.create(file.path(args.htmlReportFile.files_path), showWarnings = FALSE) - # setwd(file.path(args.htmlReportFile.files_path)) - file.rename("fig_eic", paste(args.htmlReportFile.files_path, "/fig_eic")) - cat("<html><body><h1>Differential analysis report</h1>", file= args.htmlReportFile) #HTML(reporttab[1:args.topcount,], file= args.htmlReportFile) - figuresPath <- paste(args.htmlReportFile.files_path, "_eic", sep="") + figuresPath <- paste(args.htmlReportFile.files_path, "/fig_eic", sep="") message(figuresPath) listOfFiles <- list.files(path = figuresPath) for (i in 1:length(listOfFiles))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xcms_differential_analysis.xml Thu Nov 06 13:06:25 2014 +0100 @@ -0,0 +1,55 @@ +<tool id="xcms_differential_analysis" name="XCMS Differential Analsysis" version="0.0.1"> + <description> Runs xcms diffreport function for differential Analsysis</description> + <requirements> + <requirement type="package" version="3.1.1">R_bioc_metams</requirement> + </requirements> + <command interpreter="Rscript"> + xcms_differential_analysis.r + $xsetData + $class1 + $class2 + $topcount + $outTable + $outLogFile + $htmlReportFile + $htmlReportFile.files_path + </command> +<inputs> + + <param name="xsetData" type="data" format="rdata" label="xset xcms data file" help="E.g. output data file resulting from METAMS run"/> + + + <param name="class1" type="text" size="30" label="Class1 name" value="" help="Name of first class for the comparison"/> + <param name="class2" type="text" size="30" label="Class2 name" value="" help="Name of second class for the comparison"/> + + <param name="topcount" type="integer" size="10" value="10" label="Number of items to return" help="Top X differential items. E.g. if 10, it will return top 10 differential items." /> + +</inputs> +<outputs> + <data name="outTable" format="tabular" label="${tool.name} on ${on_string} - Top differential items (TSV)"/> + <data name="outLogFile" format="txt" label="${tool.name} on ${on_string} - differential log (LOG)"/> + <data name="htmlReportFile" format="html" label="${tool.name} on ${on_string} - differential report (HTML)"/> +</outputs> +<tests> + <test> + </test> +</tests> +<help> + +.. class:: infomark + +Runs xcms diffreport for showing the most significant differences between two sets/classes of samples. This tool also creates extracted ion chromatograms (EICs) for +the most significant differences. The figure below shows an example of such an EIC. + +.. image:: $PATH_TO_IMAGES/diffreport.png + + + + + </help> + <citations> + <citation type="doi">10.1021/ac051437y</citation> <!-- example + see also https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Ccitations.3E_tag_set + --> + </citations> +</tool> \ No newline at end of file