From 913759039548bc1641fcb95bc203000b7ea9d6d7 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Mon, 20 Nov 2017 17:17:30 +0800 Subject: [PATCH 1/7] initial CWL versions --- tools/phenomenal/ms/xcms/xcms-blankfilter.cwl | 54 +++++++++++++++ .../phenomenal/ms/xcms/xcms-collect-peaks.cwl | 54 +++++++++++++++ tools/phenomenal/ms/xcms/xcms-correct-rt.cwl | 67 +++++++++++++++++++ tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl | 37 ++++++++++ 4 files changed, 212 insertions(+) create mode 100644 tools/phenomenal/ms/xcms/xcms-blankfilter.cwl create mode 100644 tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl create mode 100644 tools/phenomenal/ms/xcms/xcms-correct-rt.cwl create mode 100644 tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl diff --git a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl new file mode 100644 index 0000000..93be2b4 --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl @@ -0,0 +1,54 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +hints: + SoftwareRequirement: + packages: + xcms-blankfilter: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + # DockerRequirement: + # dockerPull: + +label: Filters out the peaks that have higher intensities in blank samples compared to selected samples. + +inputs: + xcmsset: + type: File + format: iana:application/x-r-data + label: Input RData file + doc: | + rdata containing a grouped xcmsSet. This xcmsSet should contain dilution + samples as well as real samples. The phenotype (class) of the samples + should also be set using for example find-peaks. Althought there are many + ways of generating the rdata file, the most straightforward pipline + can for example be like xcms-findpeaks->collect->xcms-group->xcms-retcor->dilutionfilter. + blank: + type: string + label: Class name of the blank samples in the xcmsset + doc: "IMPORTANT: this class should be identical for all the blank samples." + +outputs: + filtered: + type: File + label: xcms-blank filtered out + doc: A rdata file containing a XCMS-Set with non-biological signals removed. + format: iana:application/x-r-data + outputBinding: + glob: output.Rdata + +baseCommand: blankfilter.r + +arguments: + - input=$(inputs.xcmsset.path) + - output=output.Rdata + - method=median + - blank=$(inputs.blank) + - rest=T + + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + +doc: | + Please cite: R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org diff --git a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl new file mode 100644 index 0000000..9943ee3 --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl @@ -0,0 +1,54 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +hints: + SoftwareRequirement: + packages: + xcms-blankfilter: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + +label: Combine XCMS-Set objects into one collection used for further processing. + +inputs: + peaks: + type: + type: array + items: File + inputBinding: + prefix: input= + separate: false + format: iana:application/x-r-data + label: XCMS-Set file(s) + doc: One or more XCMS-Set objects which were generated by e.g. xcms-find-peaks + +outputs: + collected_peaks: + type: File + label: A rdata file containing one XCMS-Set of multiple XCMS-Set objects + format: iana:application/x-r-data + outputBinding: + glob: output.Rdata + +baseCommand: xcmsCollect.r + +arguments: + - output=output.Rdata + +doc: | + This tool is useful to perform further pre-processing steps over multiple + XCMS-Sets e.g. **xcms-group-peaks** and **xcms-correct-rt** + + Please cite: R Core Team (2013). R: A language and Environment for + Statistical Computing. http://www.r-project.org + + References: + - Smith, C.A., Want, E.J., O'Maille, G., Abagyan,R., Siuzdak and G. (2006). + "XCMS: Processing mass spectrometry data for metabolite profiling using + nonlinear peak alignment, matching and identification." Analytical + Chemistry, 78, pp. 779-787. + - Tautenhahn R, Boettcher C and Neumann S (2008). "Highly sensitive feature + detection for high resolution LC/MS." BMC Bioinformatics, 9, pp. 504. + - Benton HP, Want EJ and Ebbels TMD (2010). "Correction of mass calibration + gaps in liquid chromatography-mass spectrometry metabolomics data." + BIOINFORMATICS, 26, pp. 2488. diff --git a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl new file mode 100644 index 0000000..95cf4a6 --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl @@ -0,0 +1,67 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +hints: + SoftwareRequirement: + packages: + xcms: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + +label: Correct differences between retention times between different samples using the `retcor` generic method. +baseCommand: retCor.r + +inputs: + peaks: + type: + type: array + items: File + inputBinding: + prefix: input= + separate: false + label: XCMS-Set file + doc: A rdata file with XCMS-Set objects that were grouped by xcms-collect-peaks + +arguments: + - method=obiwarp # or loess + - output=output.Rdata + +outputs: + corrected_peaks: + type: File + label: A rdata file containing one XCMS-Set of multiple XCMS-Set objects with retention time corrected values + format: iana:application/x-r-data + outputBinding: + glob: output.Rdata + +doc: | + To correct differences between retention times between different samples, a + number of of methods exist in XCMS. retcor is the generic method. The module + gets XCMS-Set objects which was grouped together by **xcms-collect-peaks** + + Please cite: R Core Team (2013). R: A language and Environment for + Statistical Computing. http://www.r-project.org + + References: + - Smith, C.A., Want, E.J., O'Maille, G., Abagyan,R., Siuzdak and G. (2006). + "XCMS: Processing mass spectrometry data for metabolite profiling using + nonlinear peak alignment, matching and identification." Analytical + Chemistry, 78, pp. 779-787. + - Tautenhahn R, Boettcher C and Neumann S (2008). "Highly sensitive feature + detection for high resolution LC/MS." BMC Bioinformatics, 9, pp. 504. + - Benton HP, Want EJ and Ebbels TMD (2010). "Correction of mass calibration + gaps in liquid chromatography-mass spectrometry metabolomics data." + BIOINFORMATICS, 26, pp. 2488. + +# Method +# | Method to use for retention time correction. There are 2 methods available: +# +# +---------+-------------------------------------------------------------------------------------------------------------------------+ +# | Method | Description | +# +=========+=========================================================================================================================+ +# | loess | Fit a polynomial surface determined by one or more numerical predictors, using local fitting. | +# +---------+-------------------------------------------------------------------------------------------------------------------------+ +# | obiwarp | Calculate retention time deviations for each sample. It is based on the code at http://obi-warp.sourceforge.net/. | +# | | However, this function is able to align multiple samples, by a center-star strategy. | +# +---------+-------------------------------------------------------------------------------------------------------------------------+ + diff --git a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl new file mode 100644 index 0000000..a58167c --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl @@ -0,0 +1,37 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +hints: + SoftwareRequirement: + packages: + xcms: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + +doc: | + For each sample, identify peak groups where that sample is not represented. + For each of those peak groups, integrate the signal in the region of that + peak group and create a new peak. + +baseCommand: fillPeaks.r + +arguments: + - input=$(inputs.xcms.path) + - output=output.Rdata + +inputs: + xcms: + type: File + label: XCMS-Set file + doc: A rdata file with XCMS-Set objects that were grouped and pre-processed by e.g. xcms-collect-peak and xcms-correct-rt + +outputs: + filled_peaks: + type: File + label: A rdata file containing one XCMS-Set of multiple XCMS-Set objects + format: iana:application/x-r-data + outputBinding: + glob: output.Rdata + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" From dc8bd6a37f63755cb86f95a925c62c92b85bdf60 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 21 Nov 2017 16:35:52 +0800 Subject: [PATCH 2/7] more --- tools/phenomenal/ms/xcms/xcms-blankfilter.cwl | 3 +- .../phenomenal/ms/xcms/xcms-collect-peaks.cwl | 11 +- tools/phenomenal/ms/xcms/xcms-correct-rt.cwl | 14 +- tools/phenomenal/ms/xcms/xcms-find-peaks.cwl | 213 ++++++++++++++++++ 4 files changed, 231 insertions(+), 10 deletions(-) create mode 100644 tools/phenomenal/ms/xcms/xcms-find-peaks.cwl diff --git a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl index 93be2b4..f3e09ff 100644 --- a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl @@ -5,7 +5,7 @@ class: CommandLineTool hints: SoftwareRequirement: packages: - xcms-blankfilter: + xcms: specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] # DockerRequirement: # dockerPull: @@ -46,7 +46,6 @@ arguments: - blank=$(inputs.blank) - rest=T - $namespaces: iana: "https://www.iana.org/assignments/media-types/" diff --git a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl index 9943ee3..c78a66e 100644 --- a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl @@ -5,20 +5,20 @@ class: CommandLineTool hints: SoftwareRequirement: packages: - xcms-blankfilter: + xcms: specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] -label: Combine XCMS-Set objects into one collection used for further processing. +label: Combine XCMS-Set objects inputs: peaks: type: type: array items: File + format: iana:application/x-r-data inputBinding: prefix: input= separate: false - format: iana:application/x-r-data label: XCMS-Set file(s) doc: One or more XCMS-Set objects which were generated by e.g. xcms-find-peaks @@ -35,7 +35,12 @@ baseCommand: xcmsCollect.r arguments: - output=output.Rdata +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + doc: | + Combine XCMS-Set objects into one collection used for further processing. + This tool is useful to perform further pre-processing steps over multiple XCMS-Sets e.g. **xcms-group-peaks** and **xcms-correct-rt** diff --git a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl index 95cf4a6..28a855a 100644 --- a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl +++ b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl @@ -9,23 +9,19 @@ hints: specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] label: Correct differences between retention times between different samples using the `retcor` generic method. -baseCommand: retCor.r inputs: peaks: type: type: array items: File + format: iana:application/x-r-data inputBinding: prefix: input= separate: false label: XCMS-Set file doc: A rdata file with XCMS-Set objects that were grouped by xcms-collect-peaks -arguments: - - method=obiwarp # or loess - - output=output.Rdata - outputs: corrected_peaks: type: File @@ -34,6 +30,12 @@ outputs: outputBinding: glob: output.Rdata +baseCommand: retCor.r + +arguments: + - method=obiwarp # or loess + - output=output.Rdata + doc: | To correct differences between retention times between different samples, a number of of methods exist in XCMS. retcor is the generic method. The module @@ -65,3 +67,5 @@ doc: | # | | However, this function is able to align multiple samples, by a center-star strategy. | # +---------+-------------------------------------------------------------------------------------------------------------------------+ +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" diff --git a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl new file mode 100644 index 0000000..21ba5bd --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl @@ -0,0 +1,213 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +baseCommand: findPeaks.r + +hints: + SoftwareRequirement: + packages: + xcms: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + DockerRequirement: + dockerPull: biocontainers/xcms + +inputs: + spectra: + type: File[] + format: edam:format_3244 # mzML + inputBinding: + prefix: input= + separate: false + + ppm: float + peakwidthLow: float + peakwidthHigh: float + noise: float + polarity: string + realFileName: string + +outputs: + deconvoluted_peaks: + type: File + outputBinding: + glob: output.Rdata + +arguments: + - output=output.Rdata + - ppm=$(inputs.ppm) + - peakwidthLow=$(inputs.peakwidthLow) + - peakwidthHigh=$(inputs.peakwidthHigh) + - noise=$(inputs.noise) + - polarity=$(inputs.polarity) + - realFileName=$(inputs.realFileName) + + +label: Find peaks in mzML file and generate a xcmsSet using XCMS centWave algorithm. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + edam: "http://edamontology.org" + +#$schemas: +# - http://edamontology.org/EDAM_1.19.owl + +# +# label="mzML file" help="A mzML file that includes data from a MS measurement" /> +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# .. class:: infomark +# +# | **Tool update: See the 'NEWS' section at the bottom of the page** +# +# --------------------------------------------------- +# +# .. class:: infomark +# +# **Authors** +# +# | **Payam Emami (payam.emami@medsci.uu.se)** and **Christoph Ruttkies (christoph.ruttkies@ipb-halle.de)** wrote and maintain this wrapper for XCMS-Set generation and peak detection. +# +# --------------------------------------------------- +# +# .. class:: infomark +# +# **Please cite** +# +# R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org +# +# --------------------------------------------------- +# +# .. class:: infomark +# +# **References** +# +# | Smith, C.A., Want, E.J., O'Maille, G., Abagyan,R., Siuzdak and G. (2006). "XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification." Analytical Chemistry, 78, pp. 779-787. +# | Tautenhahn R, Boettcher C and Neumann S (2008). "Highly sensitive feature detection for high resolution LC/MS." BMC Bioinformatics, 9, pp. 504. +# | Benton HP, Want EJ and Ebbels TMD (2010). "Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data." BIOINFORMATICS, 26, pp. 2488. +# +# --------------------------------------------------- +# +# ===================== +# XMCS Find Peaks +# ===================== +# +# ----------- +# Description +# ----------- +# +# | This module handles the construction of XCMS-Set objects from mzML input files and finds peaks in batch mode. +# +# ----------- +# Input files +# ----------- +# +# +------------------------------+------------+ +# | File | Format | +# +==============================+============+ +# | 1) mzML file | mzML | +# +------------------------------+------------+ +# | 2) CSV file | CSV | +# +------------------------------+------------+ +# +# +# ---------- +# Parameters +# ---------- +# +# mzML file +# | A mzML file that includes data from a MS measurement +# | +# +# PPM +# | Maxmial tolerated m/z deviation in consecutive scans, in ppm (parts per million) +# | +# +# PeakWidthLow +# | Minimum value of chromatographic peak width in seconds +# | +# +# PeakWidthHigh +# | Maximum value of chromatographic peak width in seconds +# | +# +# Noise +# | Argument which is useful for data that was centroided without any intensity threshold, centroids with intensity smaller noise are omitted from ROI detection +# | +# +# Polarity +# | Filter raw data for positive/negative scans +# | +# +# CSV file +# | This file is used to set class of the samples being analyzed. The file should have at least two column: the first column is showing the raw file name and extension (for example sample1.mzML) and the second column should show it's phenotype type. This file is a comma separated file and should container header (see the example). +# | +# +# +----------------+----------+ +# | RawFile | Class | +# +----------------+----------+ +# | Sample1.mzML | Sample | +# +----------------+----------+ +# | Sample2.mzML | Sample | +# +----------------+----------+ +# | Sample3.mzML | Sample | +# +----------------+----------+ +# | Sample4.mzML | Sample | +# +----------------+----------+ +# | Blank1.mzML | Blank | +# +----------------+----------+ +# | Blank2.mzML | Blank | +# +----------------+----------+ +# | Blank3.mzML | Blank | +# +----------------+----------+ +# | D1.mzML | D1 | +# +----------------+----------+ +# | D2.mzML | D2 | +# +----------------+----------+ +# | D3.mzML | D3 | +# +----------------+----------+ +# +# Phenotype column +# | This should show the column name in the CSV file representing the class of the metabolite. In the case of the above table it should be set to "Class" (without quotation). +# | +# +# ------------ +# Output files +# ------------ +# +# xcms_find_peaks_output_1.rdata +# | A rdata file containing a XCMS-Set generated from the input mzML file +# | +# +# --------------------------------------------------- +# +# ---- +# NEWS +# ---- +# +# CHANGES IN VERSION 0.2 +# ======================== +# +# Adding class information using a CSV file +# +# CHANGES IN VERSION 0.1 +# ======================== +# +# First version +# +# +# From 81688c7c9f29c3fd75de728ca745a2cfe82e02f9 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 22 Nov 2017 09:27:43 +0800 Subject: [PATCH 3/7] put spectra prefix per file --- tools/phenomenal/ms/xcms/xcms-find-peaks.cwl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl index 21ba5bd..af93c18 100644 --- a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl @@ -14,11 +14,13 @@ hints: inputs: spectra: - type: File[] + type: + type: array + items: File + inputBinding: + prefix: input= + separate: false format: edam:format_3244 # mzML - inputBinding: - prefix: input= - separate: false ppm: float peakwidthLow: float From 51606f88345da7e3d965e2f72c9a923004ff45f1 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 22 Nov 2017 14:59:02 +0800 Subject: [PATCH 4/7] more --- tools/phenomenal/ms/xcms/xcms-blankfilter.cwl | 2 +- .../ms/xcms/xcms-dilutionfilter.cwl | 79 +++++++ tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl | 5 +- tools/phenomenal/ms/xcms/xcms-find-peaks.cwl | 198 +++--------------- 4 files changed, 116 insertions(+), 168 deletions(-) create mode 100644 tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl diff --git a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl index f3e09ff..341870a 100644 --- a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl @@ -15,7 +15,7 @@ label: Filters out the peaks that have higher intensities in blank samples compa inputs: xcmsset: type: File - format: iana:application/x-r-data + format: iana:application/x-r-data # FIXME should be a data type specific to xcms? label: Input RData file doc: | rdata containing a grouped xcmsSet. This xcmsSet should contain dilution diff --git a/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl new file mode 100644 index 0000000..564f73a --- /dev/null +++ b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl @@ -0,0 +1,79 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +hints: + SoftwareRequirement: + packages: + xcms: + specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + +label: Dilution Filter +doc: | + Filters out the peaks that do not correlate with a dilution trend. + Please cite: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + +inputs: + xcmsset: + type: File + format: iana:application/x-r-data + label: Input RData file + doc: | + rdata containing a grouped xcmsSet. This xcmsSet should contain dilution + samples as well as real samples. The phenotype (class) of the samples + should also be set using for example find-peaks. Althought there are many + ways of generating the rdata file, the the most straightforward pipline + can for example be like + xcms-findpeaks->collect->xcms-group->xcms-retcor->dilutionfilter. + dilution: + type: string + label: Class of dilution trends + doc: | + IMPORTANT: the samples are correlated to the provided sequence as set + here. + corto: + type: string + label: Correlate dilution to this series + doc: | + This series will used for calculation of correlation. For example if this + parameter is set like "1,2,3" and the class of dilution trends is set as + "D1,D2,D3" the following the pairs will be used for calculating the + correlation: (D1,1),(D2,2),(D3,3). + pvaluein: + type: float + label: p-value cutoff for dilution trends + doc: Signals with correlation p-value higher than this will be removed. + cor: + type: string + label: Correlation cutoff for dilution trends + doc: Signals with lower correlation than this will be removed. + abs: + type: string + label: Absolute correlation (T or F) + doc: | + Should the algorithm use the correlation as it is (negative and positive) + or absolute correlation ? + +outputs: + peaks: + label: xcms-stable peaks + doc: A rdata file containing a XCMS-Set with unstable signals removed. + type: File + format: iana:application/x-r-data # FIXME should be a data type specific to xcms? + outputBinding: + glob: output.Rdata + +baseCommand: dilutionfilter.r + +arguments: + - input=$(inputs.xcmsset.path) + - output=output.Rdata + - Corto=$(inputs.corto) + - dilution=$(inputs.dilution) + - pvalue=$(inputs.pvalue) + - corcut=$(inputs.cor) + - abs=$(inputs.abs) + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" diff --git a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl index a58167c..c0a0007 100644 --- a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl @@ -8,6 +8,7 @@ hints: xcms: specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] +label: XCMS Fill Peaks doc: | For each sample, identify peak groups where that sample is not represented. For each of those peak groups, integrate the signal in the region of that @@ -23,7 +24,9 @@ inputs: xcms: type: File label: XCMS-Set file - doc: A rdata file with XCMS-Set objects that were grouped and pre-processed by e.g. xcms-collect-peak and xcms-correct-rt + doc: | + A rdata file with XCMS-Set objects that were grouped and pre-processed by + e.g. xcms-collect-peak and xcms-correct-rt outputs: filled_peaks: diff --git a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl index af93c18..fd2bb3d 100644 --- a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl @@ -21,12 +21,30 @@ inputs: prefix: input= separate: false format: edam:format_3244 # mzML + label: A mzML file that includes data from a MS measurement - ppm: float - peakwidthLow: float - peakwidthHigh: float - noise: float - polarity: string + ppm: + type: float + doc: | + Maxmial tolerated m/z deviation in consecutive scans, in ppm (parts per + million) + peakwidthLow: + type: float + doc: Minimum value of chromatographic peak width in seconds + peakwidthHigh: + type: float + doc: Maximum value of chromatographic peak width in seconds + noise: + type: float + doc: | + Centroids with intensity smaller than this value are omitted from ROI + detection. Useful for data that was centroided without any intensity + threshold. + polarity: + type: string + doc: | + Filter raw data for positive/negative scans. Valid values are "positive", + and "negative". realFileName: string outputs: @@ -34,6 +52,7 @@ outputs: type: File outputBinding: glob: output.Rdata + doc: A rdata file containing a XCMS-Set generated from the input mzML file arguments: - output=output.Rdata @@ -44,8 +63,8 @@ arguments: - polarity=$(inputs.polarity) - realFileName=$(inputs.realFileName) +label: XMCS Find Peaks -label: Find peaks in mzML file and generate a xcmsSet using XCMS centWave algorithm. $namespaces: iana: "https://www.iana.org/assignments/media-types/" @@ -53,163 +72,10 @@ $namespaces: #$schemas: # - http://edamontology.org/EDAM_1.19.owl - -# -# label="mzML file" help="A mzML file that includes data from a MS measurement" /> -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# .. class:: infomark -# -# | **Tool update: See the 'NEWS' section at the bottom of the page** -# -# --------------------------------------------------- -# -# .. class:: infomark -# -# **Authors** -# -# | **Payam Emami (payam.emami@medsci.uu.se)** and **Christoph Ruttkies (christoph.ruttkies@ipb-halle.de)** wrote and maintain this wrapper for XCMS-Set generation and peak detection. -# -# --------------------------------------------------- -# -# .. class:: infomark -# -# **Please cite** -# -# R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org -# -# --------------------------------------------------- -# -# .. class:: infomark -# -# **References** -# -# | Smith, C.A., Want, E.J., O'Maille, G., Abagyan,R., Siuzdak and G. (2006). "XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification." Analytical Chemistry, 78, pp. 779-787. -# | Tautenhahn R, Boettcher C and Neumann S (2008). "Highly sensitive feature detection for high resolution LC/MS." BMC Bioinformatics, 9, pp. 504. -# | Benton HP, Want EJ and Ebbels TMD (2010). "Correction of mass calibration gaps in liquid chromatography-mass spectrometry metabolomics data." BIOINFORMATICS, 26, pp. 2488. -# -# --------------------------------------------------- -# -# ===================== -# XMCS Find Peaks -# ===================== -# -# ----------- -# Description -# ----------- -# -# | This module handles the construction of XCMS-Set objects from mzML input files and finds peaks in batch mode. -# -# ----------- -# Input files -# ----------- -# -# +------------------------------+------------+ -# | File | Format | -# +==============================+============+ -# | 1) mzML file | mzML | -# +------------------------------+------------+ -# | 2) CSV file | CSV | -# +------------------------------+------------+ -# -# -# ---------- -# Parameters -# ---------- -# -# mzML file -# | A mzML file that includes data from a MS measurement -# | -# -# PPM -# | Maxmial tolerated m/z deviation in consecutive scans, in ppm (parts per million) -# | -# -# PeakWidthLow -# | Minimum value of chromatographic peak width in seconds -# | -# -# PeakWidthHigh -# | Maximum value of chromatographic peak width in seconds -# | -# -# Noise -# | Argument which is useful for data that was centroided without any intensity threshold, centroids with intensity smaller noise are omitted from ROI detection -# | -# -# Polarity -# | Filter raw data for positive/negative scans -# | -# -# CSV file -# | This file is used to set class of the samples being analyzed. The file should have at least two column: the first column is showing the raw file name and extension (for example sample1.mzML) and the second column should show it's phenotype type. This file is a comma separated file and should container header (see the example). -# | -# -# +----------------+----------+ -# | RawFile | Class | -# +----------------+----------+ -# | Sample1.mzML | Sample | -# +----------------+----------+ -# | Sample2.mzML | Sample | -# +----------------+----------+ -# | Sample3.mzML | Sample | -# +----------------+----------+ -# | Sample4.mzML | Sample | -# +----------------+----------+ -# | Blank1.mzML | Blank | -# +----------------+----------+ -# | Blank2.mzML | Blank | -# +----------------+----------+ -# | Blank3.mzML | Blank | -# +----------------+----------+ -# | D1.mzML | D1 | -# +----------------+----------+ -# | D2.mzML | D2 | -# +----------------+----------+ -# | D3.mzML | D3 | -# +----------------+----------+ -# -# Phenotype column -# | This should show the column name in the CSV file representing the class of the metabolite. In the case of the above table it should be set to "Class" (without quotation). -# | -# -# ------------ -# Output files -# ------------ -# -# xcms_find_peaks_output_1.rdata -# | A rdata file containing a XCMS-Set generated from the input mzML file -# | -# -# --------------------------------------------------- -# -# ---- -# NEWS -# ---- -# -# CHANGES IN VERSION 0.2 -# ======================== -# -# Adding class information using a CSV file -# -# CHANGES IN VERSION 0.1 -# ======================== -# -# First version -# -# -# +doc: | + Find peaks in mzML file and generate a xcmsSet using XCMS centWave algorithm. + This module handles the construction of XCMS-Set objects from mzML input + files and finds peaks in batch mode. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org From 0a62fdcef3985ba7af375c26a6c6f5a1a4740acd Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 22 Nov 2017 15:04:42 +0800 Subject: [PATCH 5/7] pull up format --- tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl | 2 +- tools/phenomenal/ms/xcms/xcms-correct-rt.cwl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl index c78a66e..d82e1a1 100644 --- a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl @@ -15,10 +15,10 @@ inputs: type: type: array items: File - format: iana:application/x-r-data inputBinding: prefix: input= separate: false + format: iana:application/x-r-data label: XCMS-Set file(s) doc: One or more XCMS-Set objects which were generated by e.g. xcms-find-peaks diff --git a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl index 28a855a..7e7f7b9 100644 --- a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl +++ b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl @@ -15,17 +15,19 @@ inputs: type: type: array items: File - format: iana:application/x-r-data inputBinding: prefix: input= separate: false + format: iana:application/x-r-data label: XCMS-Set file doc: A rdata file with XCMS-Set objects that were grouped by xcms-collect-peaks outputs: corrected_peaks: type: File - label: A rdata file containing one XCMS-Set of multiple XCMS-Set objects with retention time corrected values + doc: | + A rdata file containing one XCMS-Set of multiple XCMS-Set objects with + retention time corrected values format: iana:application/x-r-data outputBinding: glob: output.Rdata From 48312acacdafcfb2806fc7a9476a08c1c65b8603 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Thu, 23 Nov 2017 14:55:43 +0800 Subject: [PATCH 6/7] CWLify camera tools --- .../ms/camera/camera-annotate-peaks.cwl | 56 +++++++++++++ .../ms/camera/camera-find-adducts.cwl | 81 +++++++++++++++++++ .../ms/camera/camera-find-isotopes.cwl | 57 +++++++++++++ tools/phenomenal/ms/xcms/xcms-blankfilter.cwl | 8 +- .../phenomenal/ms/xcms/xcms-collect-peaks.cwl | 6 +- tools/phenomenal/ms/xcms/xcms-correct-rt.cwl | 6 +- .../ms/xcms/xcms-dilutionfilter.cwl | 6 +- tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl | 7 +- tools/phenomenal/ms/xcms/xcms-find-peaks.cwl | 4 +- 9 files changed, 223 insertions(+), 8 deletions(-) create mode 100755 tools/phenomenal/ms/camera/camera-annotate-peaks.cwl create mode 100755 tools/phenomenal/ms/camera/camera-find-adducts.cwl create mode 100755 tools/phenomenal/ms/camera/camera-find-isotopes.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-blankfilter.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-correct-rt.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl mode change 100644 => 100755 tools/phenomenal/ms/xcms/xcms-find-peaks.cwl diff --git a/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl b/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl new file mode 100755 index 0000000..e58b64a --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl @@ -0,0 +1,56 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: CAMERA Annotate Peaks + +hints: + DockerRequirement: + dockerPull: quay.io/biocontainers/bioconductor-camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + camera_annotate_peaks: + type: File + format: iana:application/x-r-data + label: XCMS-Set file + doc: A rdata file with a XCMS-Set object from one sample + +outputs: + peaktable: + type: File + format: + doc: A rdata file containing one xsAnnotate object + outputBinding: + glob: ouput.Rdata + +baseCommand: xsAnnotate.r + +arguments: + - input=$(inputs.camera_annotate_peaks.path + - output=output.Rdata + +doc: | + Generate xsAnnotate object used for further CAMERA processing + + This module deals with the construction of an xsAnnotate object. It extracts + the peaktable from a provided XCMS-Set, which is used for all further + analysis. Multiple XCMS-Set objects which were grouped by + **xcms-collect-peaks** need to be split by **xcmssplit** beforehand. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" diff --git a/tools/phenomenal/ms/camera/camera-find-adducts.cwl b/tools/phenomenal/ms/camera/camera-find-adducts.cwl new file mode 100755 index 0000000..61df45f --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-find-adducts.cwl @@ -0,0 +1,81 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: CAMERA Find Adducts + +hints: + DockerRequirement: + dockerPull: quay.io/biocontainers/bioconductor-camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + xs_annotate: + type: File + format: iana:application/x-r-data + label: xsAnnotate file + doc: A rdata file with a xsAnnotate object from one sample + ppm: + type: float + label: The ppm error for the search + polarity: + type: string + label: Polarity mode used for measuring of the MS sample + doc: "Allowed values: positive, negative" + rules: + type: string + label: Adduct ruleset to be used + doc: | + Allowed values: + - primary - contains most common adduct types + ([M-H]-, [M-2H+Na]-, [M-2H+K]-, [M+Cl]-, [M+H]+, [M+Na]+, [M+K]+, [M+NH4]+) + - extended - next to primary also additional adduct types + +outputs: + peak_table: + type: File + format: iana:application/x-r-data + doc: A rdata file containing one xsAnnotate object + outputBinding: + glob: ouput.Rdata + peak_plot: + type: File + format: iana:application/pdf + doc: The plotted pseudo spectra with their adduct annotations + outputBinding: + glob: ouput.pdf + +baseCommand: findAdducts.r + +arguments: + - input=$(inputs.xs_annotate.path) + - output=output.Rdata + - ppm=$(inputs.ppm) + - polarity=$(inputs.polarity) + - output.pdf=output.pdf + - plotpdf=true + - rules=$(inputs.rules) + +doc: | + Perform precursor adduct annotation using CAMERA. + + Annotate adducts (and fragments) for a xsAnnotate object. Returns a + xsAnnotate object with annotated pseudospectra. It is recommended to use + **camera-find-isotopes** beforehand. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" diff --git a/tools/phenomenal/ms/camera/camera-find-isotopes.cwl b/tools/phenomenal/ms/camera/camera-find-isotopes.cwl new file mode 100755 index 0000000..2e35d58 --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-find-isotopes.cwl @@ -0,0 +1,57 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: CAMERA Find Isotopes + +hints: + DockerRequirement: + dockerPull: quay.io/biocontainers/bioconductor-camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + xs_annotate: + type: File + format: iana:application/x-r-data + label: xsAnnotate file + doc: A rdata file with a xsAnnotate object from one sample + max_charge: + type: int + label: Max. number of the isotope charge + +outputs: + annotated_isotopes: + type: File + format: iana:application/x-r-data + doc: A rdata file containing one xsAnnotate object + outputBinding: + glob: ouput.Rdata + +baseCommand: findIsotopes.r + +arguments: + - input=$(inputs.xs_annotate.path) + - output=output.Rdata + - maxcharge=$(inputs.max_charge) + +doc: | + Annotate isotope peaks for a xsAnnotate object. Returns a xsAnnotate object + with annotated isotopes. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + diff --git a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl old mode 100644 new mode 100755 index 341870a..f038468 --- a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl @@ -6,9 +6,11 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] - # DockerRequirement: - # dockerPull: + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms + DockerRequirement: + dockerPull: biocontainers/xcms label: Filters out the peaks that have higher intensities in blank samples compared to selected samples. diff --git a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl old mode 100644 new mode 100755 index d82e1a1..0099924 --- a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl @@ -6,7 +6,11 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms + DockerRequirement: + dockerPull: biocontainers/xcms label: Combine XCMS-Set objects diff --git a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl old mode 100644 new mode 100755 index 7e7f7b9..9fd98e9 --- a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl +++ b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl @@ -6,7 +6,11 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms + DockerRequirement: + dockerPull: biocontainers/xcms label: Correct differences between retention times between different samples using the `retcor` generic method. diff --git a/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl old mode 100644 new mode 100755 index 564f73a..42dc1e9 --- a/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl @@ -6,7 +6,11 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms + DockerRequirement: + dockerPull: biocontainers/xcms label: Dilution Filter doc: | diff --git a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl old mode 100644 new mode 100755 index c0a0007..5e11f36 --- a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl @@ -6,7 +6,11 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms + DockerRequirement: + dockerPull: biocontainers/xcms label: XCMS Fill Peaks doc: | @@ -24,6 +28,7 @@ inputs: xcms: type: File label: XCMS-Set file + format: iana:application/x-r-data doc: | A rdata file with XCMS-Set objects that were grouped and pre-processed by e.g. xcms-collect-peak and xcms-correct-rt diff --git a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl old mode 100644 new mode 100755 index fd2bb3d..e20bb83 --- a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl @@ -8,7 +8,9 @@ hints: SoftwareRequirement: packages: xcms: - specs: [ https://identifiers.org/rrid/RRID:SCR_015538 ] + specs: + - https://identifiers.org/rrid/RRID:SCR_015538 + - https://bio.tools/xcms DockerRequirement: dockerPull: biocontainers/xcms From a7697e7c839b9fb6ccbf4e1a0c3bef0e588da56c Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Thu, 23 Nov 2017 15:37:44 +0800 Subject: [PATCH 7/7] use working container --- .../ms/camera/camera-annotate-peaks.cwl | 4 +- .../ms/camera/camera-find-adducts.cwl | 2 +- .../ms/camera/camera-find-isotopes.cwl | 2 +- .../ms/camera/camera-group-corr.cwl | 63 +++++ .../ms/camera/camera-group-fwhm.cwl | 68 ++++++ .../ms/camera/camera-prepareoutput.cwl | 224 ++++++++++++++++++ tools/phenomenal/ms/xcms/xcms-blankfilter.cwl | 2 +- .../phenomenal/ms/xcms/xcms-collect-peaks.cwl | 2 +- tools/phenomenal/ms/xcms/xcms-correct-rt.cwl | 2 +- .../ms/xcms/xcms-dilutionfilter.cwl | 2 +- tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl | 2 +- tools/phenomenal/ms/xcms/xcms-find-peaks.cwl | 7 +- 12 files changed, 367 insertions(+), 13 deletions(-) create mode 100755 tools/phenomenal/ms/camera/camera-group-corr.cwl create mode 100755 tools/phenomenal/ms/camera/camera-group-fwhm.cwl create mode 100755 tools/phenomenal/ms/camera/camera-prepareoutput.cwl diff --git a/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl b/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl index e58b64a..115619e 100755 --- a/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl +++ b/tools/phenomenal/ms/camera/camera-annotate-peaks.cwl @@ -6,7 +6,7 @@ label: CAMERA Annotate Peaks hints: DockerRequirement: - dockerPull: quay.io/biocontainers/bioconductor-camera + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera SoftwareRequirement: packages: camera: @@ -32,7 +32,7 @@ outputs: baseCommand: xsAnnotate.r arguments: - - input=$(inputs.camera_annotate_peaks.path + - input=$(inputs.camera_annotate_peaks.path) - output=output.Rdata doc: | diff --git a/tools/phenomenal/ms/camera/camera-find-adducts.cwl b/tools/phenomenal/ms/camera/camera-find-adducts.cwl index 61df45f..5492fd0 100755 --- a/tools/phenomenal/ms/camera/camera-find-adducts.cwl +++ b/tools/phenomenal/ms/camera/camera-find-adducts.cwl @@ -6,7 +6,7 @@ label: CAMERA Find Adducts hints: DockerRequirement: - dockerPull: quay.io/biocontainers/bioconductor-camera + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera SoftwareRequirement: packages: camera: diff --git a/tools/phenomenal/ms/camera/camera-find-isotopes.cwl b/tools/phenomenal/ms/camera/camera-find-isotopes.cwl index 2e35d58..02463fe 100755 --- a/tools/phenomenal/ms/camera/camera-find-isotopes.cwl +++ b/tools/phenomenal/ms/camera/camera-find-isotopes.cwl @@ -6,7 +6,7 @@ label: CAMERA Find Isotopes hints: DockerRequirement: - dockerPull: quay.io/biocontainers/bioconductor-camera + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera SoftwareRequirement: packages: camera: diff --git a/tools/phenomenal/ms/camera/camera-group-corr.cwl b/tools/phenomenal/ms/camera/camera-group-corr.cwl new file mode 100755 index 0000000..b56a140 --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-group-corr.cwl @@ -0,0 +1,63 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: CAMERA Group Corr + +hints: + DockerRequirement: + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + xs_annotate: + type: File + format: iana:application/x-r-data + label: xsAnnotate file + doc: A rdata file with a xsAnnotate object from one sample + correlation: + type: float + label: The correlation threshold for EIC correlation + p_value: + type: float + label: The p-value threshold for testing correlation of significance + +outputs: + grouped_peaks: + type: File + format: iana:application/x-r-data + doc: | + a rData file containing one xsAnnotate object containing grouped peaks in + so called pseudospectra + outputBinding: + glob: ouput.Rdata + +baseCommand: groupCorr.r + +arguments: + - input=$(inputs.xs_annotate.path) + - output=output.Rdata + - correlations=$(inputs.correlation) + - pvalue=$(inputs.pvalue) + +doc: | + Peak grouping after correlation information into pseudospectrum + groups for an xsAnnotate object. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + diff --git a/tools/phenomenal/ms/camera/camera-group-fwhm.cwl b/tools/phenomenal/ms/camera/camera-group-fwhm.cwl new file mode 100755 index 0000000..8751e28 --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-group-fwhm.cwl @@ -0,0 +1,68 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: CAMERA Group FWHM + +hints: + DockerRequirement: + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + xs_annotate: + type: File + format: iana:application/x-r-data + label: xsAnnotate file + doc: A rdata file with a xsAnnotate object from one sample + sigma: + type: float + label: The multiplier of the standard deviation + per_fwhm: + type: float + label: Percentage of the width of the FWHM + intensity_values: + type: string + label: Intensity values for ordering. + doc: Allowed values are into, maxo, intb + +outputs: + grouped_peaks: + type: File + format: iana:application/x-r-data + doc: | + a rData file containing one xsAnnotate object containing grouped peaks in + so called pseudospectra + outputBinding: + glob: ouput.Rdata + +baseCommand: groupFWHM.r + +arguments: + - input=$(inputs.xs_annotate.path) + - output=output.Rdata + - sigma=$(inputs.sigma) + - perfwhm=$(inputs.per_fwhm) + - intval=$(inputs.intensity_values) + +doc: | + Group peaks of a xsAnnotate object according to their retention time into + pseudospectra-groups. Uses the peak FWHMs as grouping borders. + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + diff --git a/tools/phenomenal/ms/camera/camera-prepareoutput.cwl b/tools/phenomenal/ms/camera/camera-prepareoutput.cwl new file mode 100755 index 0000000..5b0ab0e --- /dev/null +++ b/tools/phenomenal/ms/camera/camera-prepareoutput.cwl @@ -0,0 +1,224 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool + +label: Prepare output for doing multi/uni variate + +hints: + DockerRequirement: + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera + SoftwareRequirement: + packages: + camera: + specs: + - https://bio.tools/camera + - https://identifiers.org/rrid/RRID:SCR_002466 + +inputs: + camera: + type: File + format: iana:application/x-r-data + label: XCMS-Set file + doc: This is the quantification results from CAMERA. + scores: + type: File + format: iana:application/text + label: Identification results + phenotypes: + type: File + format: iana:text/csv + label: phenotype and metadata information + doc: | + Example of phenotype information: + The first column of this table must show the raw data file name (for + example sample1.mzML). The file must have a header. Other information + can also be added to this table such as age, gender, time etc. This will + be output as they are. + + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | RawFile | Class | Groups | Type | rename | Technical repl | Age | Gender | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Sample1.mzML | Sample | Disease | keep | Disease1 | 1 | 35 | M | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Sample2.mzML | Sample | Disease | keep | Disease2 | 1 | 35 | M | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Sample3.mzML | Sample | Control | keep | Control1 | 2 | 37 | F | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Sample4.mzML | Sample | Control | keep | Control2 | 2 | 37 | F | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Blank1.mzML | Blank | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Blank2.mzML | Blank | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | Blank3.mzML | Blank | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | D1.mzML | D1 | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | D2.mzML | D2 | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + | D3.mzML | D3 | NA | remove | NA | NA | NA | NA | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ + + + ppm: + type: float + label: PPM tolerance for matching + doc: | + m/z tolerance for matching identification results to quantification + (parts per million) + rt: + type: float + label: RT tolerance for matching + doc: | + Retention time tolerance for matching identification results to + quantification (seconds). + higher_the_better: + type: string + label: Higher the score the better? + doc: | + If the higher score represents a better hit. For example, + FragmenterScore will be higher for reliable hits but q-value will be + lower. ("true" or "false") + score_type: + type: string + label: which score to use? + doc: | + "q.value", "Score" for the Normalized score, or "FragmenterScore" + Depending on the previous tool used to perform the identification, + FragmenterScore, Score and q.value can be used. q.value should only be + selected if the MetFrag scores have been converted to posterior error + probability score. + impute: + type: string + label: Impute IDs within pc groups? + doc: | + "true" or "false" + Metabolites quantification profile often result in a number signals. One + some of this signal can be identified. If this parameter is set, the + unidentified signals will be imputed by the identification based on + CAMERA grouping. + rename: + type: string + default: "false" + label: Rename the sample file names to specific names + doc: | + "true" or "false". If "true" then the samples will be renamed based on + information provide in column "rename_column" + rename_column: + type: string + default: renameto + label: column with the names you want to rename the samples to + column_type: + type: string + default: type + label: the name of the column showing the samples you want to keep + doc: | + The phenotype file must have a column showing which samples to keep and + which to remve. Enter name of that column. + selected_type: + type: string + default: sample + label: Which type of samples to keep + doc: | + Based on information in "column_type" enter which sample type should be kept. + only_report_with_id: + type: string + default: "false" + label: Do you want to use the features without ID? + doc: | + "true" or "false". If "true" then only identified metabolites will be + reported. + combine_replicate: + type: string + default: "false" + label: Do you want to median technial replicates? + doc: | + "true" or "false". If "true" then the technical replicates (duplicate + injections) will be medianed. This information should be provided in an + additional column in the phenotype information. + log: + type: string + label: Do you want to perform log2 transformation? + doc: '"true" or "false"' + combine_replicate_column: + type: string + default: rep + label: Column that represents the technical replicates. + doc: The column name indicating technical replicate in the phenotype file. + sample_coverage: + type: float + default: 0.0 + label: Percentage of non-missing values + doc: How much of non-missing value should be present for each feature. + sample_coverage_method: + type: string + default: global + doc: | + Do you want to apply coverage globally across all the runs or per group? + For applying globally use "global" otherwise write name of the column + showing the grouping. + +outputs: + peaktable: + type: File + format: iana:text/tab-separated-values + label: A tabular peak table containing abundances + outputBinding: + glob: peak_table.tsv + variables: + type: File + format: iana:text/tab-separated-values + label: Variable data containing identification. + doc: | + Aggregated identification results either from metfragaggregator or pep + score generator + outputBinding: + glob: variables.tsv + metadata: + type: File + format: iana:text/tab-separated-values + label: Sample metadata + outputBinding: + glob: metadata.tsv + +baseCommand: prepareOutput.r + +arguments: + - inputcamera=$(inputs.camera.path) + - inputscores=$(input.scores.path) + - inputpheno=$(input.phenotypes.path) + - ppm=$(inputs.ppm) + - rt=$(inputs.rt) + - higherTheBetter=$(inputs.higher_the_better) + - scoreColumn=$(inputs.score_type) + - impute=$(inputs.impute) + - typeColumn=$(inputs.column_type) + - selectedType=$(inputs.selected_type) + - rename=$(inputs.rename) + - renameCol=$(inputs.rename_column) + - onlyReportWithID=$(inputs.only_report_with_ID) + - combineReplicate=$(inputs.combine_replicate) + - combineReplicateColumn=$(inputs.combine_replicate_column) + - outputPeakTable=peak_table.tsv + - outputVariables=variables.tsv + - outputMetaData=metadata.tsv + - log=$(inputs.log) + - sampleCoverage=$(inputs.sample_coverage) + - sampleCoverageMethod=$(inputs.sample_coverage_method) + +doc: | + Converts the quantification and identification results to tabular files for + multivariate and univariate data analysis + + **Please cite**: + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org + + **References** + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: + an integrated strategy for compound spectra extraction and annotation of + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. + +$namespaces: + iana: "https://www.iana.org/assignments/media-types/" + diff --git a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl index f038468..6c25066 100755 --- a/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-blankfilter.cwl @@ -10,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container label: Filters out the peaks that have higher intensities in blank samples compared to selected samples. diff --git a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl index 0099924..526ccb0 100755 --- a/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-collect-peaks.cwl @@ -10,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container label: Combine XCMS-Set objects diff --git a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl index 9fd98e9..9065f49 100755 --- a/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl +++ b/tools/phenomenal/ms/xcms/xcms-correct-rt.cwl @@ -10,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container label: Correct differences between retention times between different samples using the `retcor` generic method. diff --git a/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl index 42dc1e9..e9eabf8 100755 --- a/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl +++ b/tools/phenomenal/ms/xcms/xcms-dilutionfilter.cwl @@ -10,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container label: Dilution Filter doc: | diff --git a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl index 5e11f36..55934b8 100755 --- a/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-fill-peaks.cwl @@ -10,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container label: XCMS Fill Peaks doc: | diff --git a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl index e20bb83..a41d670 100755 --- a/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl +++ b/tools/phenomenal/ms/xcms/xcms-find-peaks.cwl @@ -2,8 +2,6 @@ cwlVersion: v1.0 class: CommandLineTool -baseCommand: findPeaks.r - hints: SoftwareRequirement: packages: @@ -12,7 +10,7 @@ hints: - https://identifiers.org/rrid/RRID:SCR_015538 - https://bio.tools/xcms DockerRequirement: - dockerPull: biocontainers/xcms + dockerPull: payamemami/xcms-container inputs: spectra: @@ -56,6 +54,8 @@ outputs: glob: output.Rdata doc: A rdata file containing a XCMS-Set generated from the input mzML file +baseCommand: findPeaks.r + arguments: - output=output.Rdata - ppm=$(inputs.ppm) @@ -67,7 +67,6 @@ arguments: label: XMCS Find Peaks - $namespaces: iana: "https://www.iana.org/assignments/media-types/" edam: "http://edamontology.org"