|
| 1 | +#!/usr/bin/env cwl-runner |
| 2 | +cwlVersion: v1.0 |
| 3 | +class: CommandLineTool |
| 4 | + |
| 5 | +label: Prepare output for doing multi/uni variate |
| 6 | + |
| 7 | +hints: |
| 8 | + DockerRequirement: |
| 9 | + dockerPull: container-registry.phenomenal-h2020.eu/phnmnl/camera |
| 10 | + SoftwareRequirement: |
| 11 | + packages: |
| 12 | + camera: |
| 13 | + specs: |
| 14 | + - https://bio.tools/camera |
| 15 | + - https://identifiers.org/rrid/RRID:SCR_002466 |
| 16 | + |
| 17 | +inputs: |
| 18 | + camera: |
| 19 | + type: File |
| 20 | + format: iana:application/x-r-data |
| 21 | + label: XCMS-Set file |
| 22 | + doc: This is the quantification results from CAMERA. |
| 23 | + scores: |
| 24 | + type: File |
| 25 | + format: iana:application/text |
| 26 | + label: Identification results |
| 27 | + phenotypes: |
| 28 | + type: File |
| 29 | + format: iana:text/csv |
| 30 | + label: phenotype and metadata information |
| 31 | + doc: | |
| 32 | + Example of phenotype information: |
| 33 | + The first column of this table must show the raw data file name (for |
| 34 | + example sample1.mzML). The file must have a header. Other information |
| 35 | + can also be added to this table such as age, gender, time etc. This will |
| 36 | + be output as they are. |
| 37 | + |
| 38 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 39 | + | RawFile | Class | Groups | Type | rename | Technical repl | Age | Gender | |
| 40 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 41 | + | Sample1.mzML | Sample | Disease | keep | Disease1 | 1 | 35 | M | |
| 42 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 43 | + | Sample2.mzML | Sample | Disease | keep | Disease2 | 1 | 35 | M | |
| 44 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 45 | + | Sample3.mzML | Sample | Control | keep | Control1 | 2 | 37 | F | |
| 46 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 47 | + | Sample4.mzML | Sample | Control | keep | Control2 | 2 | 37 | F | |
| 48 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 49 | + | Blank1.mzML | Blank | NA | remove | NA | NA | NA | NA | |
| 50 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 51 | + | Blank2.mzML | Blank | NA | remove | NA | NA | NA | NA | |
| 52 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 53 | + | Blank3.mzML | Blank | NA | remove | NA | NA | NA | NA | |
| 54 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 55 | + | D1.mzML | D1 | NA | remove | NA | NA | NA | NA | |
| 56 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 57 | + | D2.mzML | D2 | NA | remove | NA | NA | NA | NA | |
| 58 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 59 | + | D3.mzML | D3 | NA | remove | NA | NA | NA | NA | |
| 60 | + +----------------+----------+-----------+----------+------------+------------------+-------+----------+ |
| 61 | + |
| 62 | + |
| 63 | + ppm: |
| 64 | + type: float |
| 65 | + label: PPM tolerance for matching |
| 66 | + doc: | |
| 67 | + m/z tolerance for matching identification results to quantification |
| 68 | + (parts per million) |
| 69 | + rt: |
| 70 | + type: float |
| 71 | + label: RT tolerance for matching |
| 72 | + doc: | |
| 73 | + Retention time tolerance for matching identification results to |
| 74 | + quantification (seconds). |
| 75 | + higher_the_better: |
| 76 | + type: string |
| 77 | + label: Higher the score the better? |
| 78 | + doc: | |
| 79 | + If the higher score represents a better hit. For example, |
| 80 | + FragmenterScore will be higher for reliable hits but q-value will be |
| 81 | + lower. ("true" or "false") |
| 82 | + score_type: |
| 83 | + type: string |
| 84 | + label: which score to use? |
| 85 | + doc: | |
| 86 | + "q.value", "Score" for the Normalized score, or "FragmenterScore" |
| 87 | + Depending on the previous tool used to perform the identification, |
| 88 | + FragmenterScore, Score and q.value can be used. q.value should only be |
| 89 | + selected if the MetFrag scores have been converted to posterior error |
| 90 | + probability score. |
| 91 | + impute: |
| 92 | + type: string |
| 93 | + label: Impute IDs within pc groups? |
| 94 | + doc: | |
| 95 | + "true" or "false" |
| 96 | + Metabolites quantification profile often result in a number signals. One |
| 97 | + some of this signal can be identified. If this parameter is set, the |
| 98 | + unidentified signals will be imputed by the identification based on |
| 99 | + CAMERA grouping. |
| 100 | + rename: |
| 101 | + type: string |
| 102 | + default: "false" |
| 103 | + label: Rename the sample file names to specific names |
| 104 | + doc: | |
| 105 | + "true" or "false". If "true" then the samples will be renamed based on |
| 106 | + information provide in column "rename_column" |
| 107 | + rename_column: |
| 108 | + type: string |
| 109 | + default: renameto |
| 110 | + label: column with the names you want to rename the samples to |
| 111 | + column_type: |
| 112 | + type: string |
| 113 | + default: type |
| 114 | + label: the name of the column showing the samples you want to keep |
| 115 | + doc: | |
| 116 | + The phenotype file must have a column showing which samples to keep and |
| 117 | + which to remve. Enter name of that column. |
| 118 | + selected_type: |
| 119 | + type: string |
| 120 | + default: sample |
| 121 | + label: Which type of samples to keep |
| 122 | + doc: | |
| 123 | + Based on information in "column_type" enter which sample type should be kept. |
| 124 | + only_report_with_id: |
| 125 | + type: string |
| 126 | + default: "false" |
| 127 | + label: Do you want to use the features without ID? |
| 128 | + doc: | |
| 129 | + "true" or "false". If "true" then only identified metabolites will be |
| 130 | + reported. |
| 131 | + combine_replicate: |
| 132 | + type: string |
| 133 | + default: "false" |
| 134 | + label: Do you want to median technial replicates? |
| 135 | + doc: | |
| 136 | + "true" or "false". If "true" then the technical replicates (duplicate |
| 137 | + injections) will be medianed. This information should be provided in an |
| 138 | + additional column in the phenotype information. |
| 139 | + log: |
| 140 | + type: string |
| 141 | + label: Do you want to perform log2 transformation? |
| 142 | + doc: '"true" or "false"' |
| 143 | + combine_replicate_column: |
| 144 | + type: string |
| 145 | + default: rep |
| 146 | + label: Column that represents the technical replicates. |
| 147 | + doc: The column name indicating technical replicate in the phenotype file. |
| 148 | + sample_coverage: |
| 149 | + type: float |
| 150 | + default: 0.0 |
| 151 | + label: Percentage of non-missing values |
| 152 | + doc: How much of non-missing value should be present for each feature. |
| 153 | + sample_coverage_method: |
| 154 | + type: string |
| 155 | + default: global |
| 156 | + doc: | |
| 157 | + Do you want to apply coverage globally across all the runs or per group? |
| 158 | + For applying globally use "global" otherwise write name of the column |
| 159 | + showing the grouping. |
| 160 | + |
| 161 | +outputs: |
| 162 | + peaktable: |
| 163 | + type: File |
| 164 | + format: iana:text/tab-separated-values |
| 165 | + label: A tabular peak table containing abundances |
| 166 | + outputBinding: |
| 167 | + glob: peak_table.tsv |
| 168 | + variables: |
| 169 | + type: File |
| 170 | + format: iana:text/tab-separated-values |
| 171 | + label: Variable data containing identification. |
| 172 | + doc: | |
| 173 | + Aggregated identification results either from metfragaggregator or pep |
| 174 | + score generator |
| 175 | + outputBinding: |
| 176 | + glob: variables.tsv |
| 177 | + metadata: |
| 178 | + type: File |
| 179 | + format: iana:text/tab-separated-values |
| 180 | + label: Sample metadata |
| 181 | + outputBinding: |
| 182 | + glob: metadata.tsv |
| 183 | + |
| 184 | +baseCommand: prepareOutput.r |
| 185 | + |
| 186 | +arguments: |
| 187 | + - inputcamera=$(inputs.camera.path) |
| 188 | + - inputscores=$(input.scores.path) |
| 189 | + - inputpheno=$(input.phenotypes.path) |
| 190 | + - ppm=$(inputs.ppm) |
| 191 | + - rt=$(inputs.rt) |
| 192 | + - higherTheBetter=$(inputs.higher_the_better) |
| 193 | + - scoreColumn=$(inputs.score_type) |
| 194 | + - impute=$(inputs.impute) |
| 195 | + - typeColumn=$(inputs.column_type) |
| 196 | + - selectedType=$(inputs.selected_type) |
| 197 | + - rename=$(inputs.rename) |
| 198 | + - renameCol=$(inputs.rename_column) |
| 199 | + - onlyReportWithID=$(inputs.only_report_with_ID) |
| 200 | + - combineReplicate=$(inputs.combine_replicate) |
| 201 | + - combineReplicateColumn=$(inputs.combine_replicate_column) |
| 202 | + - outputPeakTable=peak_table.tsv |
| 203 | + - outputVariables=variables.tsv |
| 204 | + - outputMetaData=metadata.tsv |
| 205 | + - log=$(inputs.log) |
| 206 | + - sampleCoverage=$(inputs.sample_coverage) |
| 207 | + - sampleCoverageMethod=$(inputs.sample_coverage_method) |
| 208 | + |
| 209 | +doc: | |
| 210 | + Converts the quantification and identification results to tabular files for |
| 211 | + multivariate and univariate data analysis |
| 212 | + |
| 213 | + **Please cite**: |
| 214 | + R Core Team (2013). R: A language and Environment for Statistical Computing. http://www.r-project.org |
| 215 | + |
| 216 | + **References** |
| 217 | + Kuhl C, Tautenhahn R, Boettcher C, Larson TR and Neumann S (2012). "CAMERA: |
| 218 | + an integrated strategy for compound spectra extraction and annotation of |
| 219 | + liquid chromatography/mass spectrometry data sets." Analytical Chemistry, 84, |
| 220 | + pp. 283-289. http://pubs.acs.org/doi/abs/10.1021/ac202450g. |
| 221 | + |
| 222 | +$namespaces: |
| 223 | + iana: "https://www.iana.org/assignments/media-types/" |
| 224 | + |
0 commit comments