Mercurial > repos > galaxyp > cardinal_preprocessing
comparison preprocessing.xml @ 10:aa479a0cfb43 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit c8d3adac445b4e08e2724e22d7201bfc38bbf40f"
| author | galaxyp |
|---|---|
| date | Sun, 29 Aug 2021 07:20:07 +0000 |
| parents | e0bbaf9f7da0 |
| children | 274e81434593 |
comparison
equal
deleted
inserted
replaced
| 9:e0bbaf9f7da0 | 10:aa479a0cfb43 |
|---|---|
| 1 <tool id="cardinal_preprocessing" name="MSI preprocessing" version="@VERSION@.1"> | 1 <tool id="cardinal_preprocessing" name="MSI preprocessing" version="@VERSION@.0"> |
| 2 <description> | 2 <description> |
| 3 mass spectrometry imaging preprocessing | 3 mass spectrometry imaging preprocessing |
| 4 </description> | 4 </description> |
| 5 <macros> | 5 <macros> |
| 6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
| 7 </macros> | 7 </macros> |
| 8 <expand macro="requirements"> | 8 <expand macro="requirements"> |
| 9 <requirement type="package" version="2.3">r-gridextra</requirement> | 9 <requirement type="package" version="2.3">r-gridextra</requirement> |
| 10 <requirement type="package" version="3.3.2">r-ggplot2</requirement> | 10 <requirement type="package" version="3.3.5">r-ggplot2</requirement> |
| 11 </expand> | 11 </expand> |
| 12 <command detect_errors="exit_code"> | 12 <command detect_errors="exit_code"> |
| 13 <![CDATA[ | 13 <![CDATA[ |
| 14 | 14 |
| 15 @INPUT_LINKING@ | 15 @INPUT_LINKING@ |
| 45 | 45 |
| 46 @READING_MSIDATA_FULLY_COMPATIBLE@ | 46 @READING_MSIDATA_FULLY_COMPATIBLE@ |
| 47 | 47 |
| 48 | 48 |
| 49 ## remove duplicated coordinates, otherwise peak picking and log2 transformation will fail | 49 ## remove duplicated coordinates, otherwise peak picking and log2 transformation will fail |
| 50 msidata <- msidata[,!duplicated(coord(msidata)[,1:2])] | |
| 51 | 50 |
| 52 ## set variable to False | 51 ## set variable to False |
| 53 #set $used_peak_picking = False | 52 #set $used_peak_picking = False |
| 54 #set $used_peak_alignment = False | 53 #set $used_peak_alignment = False |
| 55 #set $continuous_format = False | 54 #set $continuous_format = False |
| 133 | 132 |
| 134 #if str( $method.methods_conditional.methods_for_smoothing.smoothing_method) == 'gaussian': | 133 #if str( $method.methods_conditional.methods_for_smoothing.smoothing_method) == 'gaussian': |
| 135 print('gaussian smoothing') | 134 print('gaussian smoothing') |
| 136 | 135 |
| 137 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, sd = $method.methods_conditional.methods_for_smoothing.sd_gaussian) | 136 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, sd = $method.methods_conditional.methods_for_smoothing.sd_gaussian) |
| 137 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | |
| 138 | 138 |
| 139 #elif str( $method.methods_conditional.methods_for_smoothing.smoothing_method) == 'sgolay': | 139 #elif str( $method.methods_conditional.methods_for_smoothing.smoothing_method) == 'sgolay': |
| 140 print('sgolay smoothing') | 140 print('sgolay smoothing') |
| 141 | 141 |
| 142 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, order = $method.methods_conditional.methods_for_smoothing.order_of_filters) | 142 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, order = $method.methods_conditional.methods_for_smoothing.order_of_filters) |
| 143 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | |
| 143 | 144 |
| 144 ## if selected replace negative intensities with zero | 145 ## if selected replace negative intensities with zero |
| 145 #if $method.methods_conditional.methods_for_smoothing.replace_negatives: | 146 #if $method.methods_conditional.methods_for_smoothing.replace_negatives: |
| 146 spectra(msidata)[spectra(msidata)<0] = 0 | 147 ## bring spectra matrix to disk |
| 148 spectra_df = as.matrix(spectra(msidata)) | |
| 149 spectra_df[spectra_df<0] = 0 | |
| 150 spectra(msidata) = spectra_df | |
| 147 #end if | 151 #end if |
| 148 | 152 |
| 149 #elif str($method.methods_conditional.methods_for_smoothing.smoothing_method) == 'ma': | 153 #elif str($method.methods_conditional.methods_for_smoothing.smoothing_method) == 'ma': |
| 150 print('moving average smoothing') | 154 print('moving average smoothing') |
| 151 | 155 |
| 152 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, coef = $method.methods_conditional.methods_for_smoothing.coefficients_ma_filter) | 156 msidata = smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, coef = $method.methods_conditional.methods_for_smoothing.coefficients_ma_filter) |
| 157 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | |
| 153 | 158 |
| 154 #end if | 159 #end if |
| 155 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | |
| 156 | 160 |
| 157 ############################### QC ########################### | 161 ############################### QC ########################### |
| 158 | 162 |
| 159 maxfeatures =nrow(msidata) | 163 maxfeatures =nrow(msidata) |
| 160 pixelcount = ncol(msidata) | 164 pixelcount = ncol(msidata) |
| 168 | 172 |
| 169 | 173 |
| 170 ############################### Mz alignment ########################### | 174 ############################### Mz alignment ########################### |
| 171 | 175 |
| 172 #elif str( $method.methods_conditional.preprocessing_method ) == 'mz_alignment': | 176 #elif str( $method.methods_conditional.preprocessing_method ) == 'mz_alignment': |
| 173 print('M/z alignment') | 177 print('m/z alignment') |
| 174 ## M/z alignment | 178 ## M/z alignment |
| 175 | 179 |
| 176 #if str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_table': | 180 #if str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_table': |
| 177 | 181 |
| 178 reference_mz = read.delim("$method.methods_conditional.mzalign_ref_type.mz_tabular", header = $method.methods_conditional.mzalign_ref_type.feature_header, stringsAsFactors = FALSE) | 182 reference_mz = read.delim("$method.methods_conditional.mzalign_ref_type.mz_tabular", header = $method.methods_conditional.mzalign_ref_type.feature_header, stringsAsFactors = FALSE) |
| 181 msidata = mzAlign(msidata, ref=reference_mz, tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) | 185 msidata = mzAlign(msidata, ref=reference_mz, tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) |
| 182 | 186 |
| 183 | 187 |
| 184 #elif str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_noref': | 188 #elif str( $method.methods_conditional.mzalign_ref_type.align_reference_datatype) == 'align_noref': |
| 185 | 189 |
| 186 msidata = mzAlign(msidata,tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", , quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) | 190 msidata = mzAlign(msidata,tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) |
| 187 | 191 |
| 188 #end if | 192 #end if |
| 189 | 193 |
| 190 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | 194 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) |
| 191 | 195 |
| 198 mz_aligned = c(minmz, maxmz,maxfeatures, pixelcount) | 202 mz_aligned = c(minmz, maxmz,maxfeatures, pixelcount) |
| 199 QC_numbers= cbind(QC_numbers, mz_aligned) | 203 QC_numbers= cbind(QC_numbers, mz_aligned) |
| 200 vectorofactions = append(vectorofactions, "mz aligned") | 204 vectorofactions = append(vectorofactions, "mz aligned") |
| 201 print(plot(msidata, pixel=random_spectra, col="black")) | 205 print(plot(msidata, pixel=random_spectra, col="black")) |
| 202 title("Spectra after m/z alignment", outer=TRUE, line=0) | 206 title("Spectra after m/z alignment", outer=TRUE, line=0) |
| 207 | |
| 208 | |
| 209 ############################### Mz recalibration ########################### | |
| 210 | |
| 211 #elif str( $method.methods_conditional.preprocessing_method ) == 'mz_recalibration': | |
| 212 print('m/z recalibration') | |
| 213 ## M/z recalibration | |
| 214 | |
| 215 reference_mz = read.delim("$method.methods_conditional.mz_tabular", header = $method.methods_conditional.feature_header, stringsAsFactors = FALSE) | |
| 216 reference_mz = reference_mz[,$method.methods_conditional.feature_column] | |
| 217 | |
| 218 msidata = mzAlign(msidata, ref=reference_mz, tolerance = $method.methods_conditional.alignment_tol, units = "$method.methods_conditional.alignment_units", quantile = $method.methods_conditional.quantile, span = $method.methods_conditional.span) | |
| 219 | |
| 220 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | |
| 221 | |
| 222 ## remove the reference peaks data to allow proper peak alignment afterwards | |
| 223 metadata(featureData(msidata))['reference peaks'] <- NULL | |
| 224 | |
| 225 ############################### QC ########################### | |
| 226 | |
| 227 maxfeatures =nrow(msidata) | |
| 228 pixelcount = ncol(msidata) | |
| 229 minmz = round(min(mz(msidata)), digits=2) | |
| 230 maxmz = round(max(mz(msidata)), digits=2) | |
| 231 mz_recal = c(minmz, maxmz,maxfeatures, pixelcount) | |
| 232 QC_numbers= cbind(QC_numbers, mz_recal) | |
| 233 vectorofactions = append(vectorofactions, "mz recalibrated") | |
| 234 print(plot(msidata, pixel=random_spectra, col="black")) | |
| 235 title("Spectra after m/z recalibration", outer=TRUE, line=0) | |
| 203 | 236 |
| 204 | 237 |
| 205 ############################### Peak picking ########################### | 238 ############################### Peak picking ########################### |
| 206 | 239 |
| 207 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking': | 240 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking': |
| 330 ############################### Mass binning ########################### | 363 ############################### Mass binning ########################### |
| 331 | 364 |
| 332 #elif str( $method.methods_conditional.preprocessing_method) == 'Mass_binning': | 365 #elif str( $method.methods_conditional.preprocessing_method) == 'Mass_binning': |
| 333 print('mass binning') | 366 print('mass binning') |
| 334 | 367 |
| 335 #if str( $method.methods_conditional.mz_range.features_filtering) == 'change_mz_range': | 368 #if str($method.methods_conditional.mz_range.features_filtering) == 'change_mz_range': |
| 336 | |
| 337 #if str($processed_cond.processed_file) == "processed": | |
| 338 | 369 |
| 339 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, from=$method.methods_conditional.mz_range.min_mz, to=$method.methods_conditional.mz_range.max_mz, units="$method.methods_conditional.bin_units", fun="$method.methods_conditional.bin_fun") | 370 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, from=$method.methods_conditional.mz_range.min_mz, to=$method.methods_conditional.mz_range.max_mz, units="$method.methods_conditional.bin_units", fun="$method.methods_conditional.bin_fun") |
| 340 | |
| 341 #else | |
| 342 ## continuous file cannot be binned from m/z to m/z, therefore first cut m/z range and then do mzbin: | |
| 343 msidata = msidata[mz(msidata) >= $method.methods_conditional.mz_range.min_mz & mz(msidata) <= $method.methods_conditional.mz_range.max_mz,] | |
| 344 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun="$method.methods_conditional.bin_fun") | |
| 345 #end if | |
| 346 | 371 |
| 347 | 372 |
| 348 #elif str( $method.methods_conditional.mz_range.features_filtering) == 'none': | 373 #elif str($method.methods_conditional.mz_range.features_filtering) == 'none': |
| 349 | 374 |
| 350 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun=$method.methods_conditional.bin_fun) | 375 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun=$method.methods_conditional.bin_fun) |
| 376 | |
| 377 #elif str($method.methods_conditional.mz_range.features_filtering) == 'bin_to_reference': | |
| 378 | |
| 379 bin_reference_mz = read.delim("$method.methods_conditional.mz_range.mz_tabular", header = $method.methods_conditional.mz_range.feature_header, stringsAsFactors = FALSE) | |
| 380 bin_reference_mz = bin_reference_mz[,$method.methods_conditional.mz_range.feature_column] | |
| 381 | |
| 382 msidata = mse_bin = mzBin(msidata,resolution=$method.methods_conditional.bin_width, units="$method.methods_conditional.bin_units", fun=$method.methods_conditional.bin_fun, | |
| 383 ref=bin_reference_mz) | |
| 351 | 384 |
| 352 #end if | 385 #end if |
| 353 | 386 |
| 354 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) | 387 msidata <- process(msidata, BPPARAM=MulticoreParam(workers=number_cpu)) |
| 355 | 388 |
| 383 | 416 |
| 384 #if str( $method.methods_conditional.transf_conditional.trans_type) == 'log2': | 417 #if str( $method.methods_conditional.transf_conditional.trans_type) == 'log2': |
| 385 print('log2 transformation') | 418 print('log2 transformation') |
| 386 | 419 |
| 387 ## replace 0 with NA to prevent Inf | 420 ## replace 0 with NA to prevent Inf |
| 388 spectra_df = spectra(msidata) ## convert into R matrix | 421 spectra_df = as.matrix(spectra(msidata)) ## convert into R matrix |
| 389 spectra_df[spectra_df ==0] = NA | 422 spectra_df[spectra_df ==0] = NA |
| 390 print(paste0("Number of 0 which were converted into NA:",sum(is.na(spectra_df)))) | 423 print(paste0("Number of 0 which were converted into NA:",sum(is.na(spectra_df)))) |
| 391 spectra(msidata) = spectra_df | 424 spectra(msidata) = spectra_df |
| 392 ## log transformation | 425 ## log transformation |
| 393 spectra(msidata) = log2(spectra(msidata)) | 426 spectra(msidata) = log2(spectra(msidata)) |
| 420 | 453 |
| 421 ############# Outputs: RData, imzml and QC report ############# | 454 ############# Outputs: RData, imzml and QC report ############# |
| 422 ################################################################################ | 455 ################################################################################ |
| 423 | 456 |
| 424 ## save msidata as imzML file, will only work if there is at least 1 m/z left | 457 ## save msidata as imzML file, will only work if there is at least 1 m/z left |
| 425 | |
| 426 #if str($imzml_output) == "cont_format": | |
| 427 #set $continuous_format = True | |
| 428 #end if | |
| 429 | 458 |
| 430 if (nrow(msidata) > 0){ | 459 if (nrow(msidata) > 0){ |
| 431 ## make sure that coordinates are integers | 460 ## make sure that coordinates are integers |
| 432 coord(msidata)\$y = as.integer(coord(msidata)\$y) | 461 coord(msidata)\$y = as.integer(coord(msidata)\$y) |
| 433 coord(msidata)\$x = as.integer(coord(msidata)\$x) | 462 coord(msidata)\$x = as.integer(coord(msidata)\$x) |
| 434 #if $used_peak_picking: | 463 ## only continuous files can currently be exported |
| 435 #if $continuous_format: | 464 msidata = as(msidata, "MSContinuousImagingExperiment") |
| 436 msidata = as(msidata, "MSContinuousImagingExperiment") | 465 writeImzML(msidata, "out") |
| 437 #end if | |
| 438 #elif $used_peak_alignment | |
| 439 #if $continuous_format: | |
| 440 msidata = as(msidata, "MSContinuousImagingExperiment") | |
| 441 #end if | |
| 442 #end if | |
| 443 writeImzML(msidata, "out") | |
| 444 } | 466 } |
| 445 | 467 |
| 446 plot(0,type='n',axes=FALSE,ann=FALSE) | 468 plot(0,type='n',axes=FALSE,ann=FALSE) |
| 447 rownames(QC_numbers) = c("min m/z", "max mz", "# features", "# spectra") | 469 rownames(QC_numbers) = c("min m/z", "max mz", "# features", "# spectra") |
| 448 grid.table(t(QC_numbers)) | 470 grid.table(t(QC_numbers)) |
| 461 <param name="preprocessing_method" type="select" label="Preprocessing methods"> | 483 <param name="preprocessing_method" type="select" label="Preprocessing methods"> |
| 462 <option value="Normalization" selected="True">Intensity Normalization</option> | 484 <option value="Normalization" selected="True">Intensity Normalization</option> |
| 463 <option value="Baseline_reduction">Baseline Reduction</option> | 485 <option value="Baseline_reduction">Baseline Reduction</option> |
| 464 <option value="Smoothing">Peak smoothing</option> | 486 <option value="Smoothing">Peak smoothing</option> |
| 465 <option value="mz_alignment">m/z alignment</option> | 487 <option value="mz_alignment">m/z alignment</option> |
| 488 <option value="mz_recalibration">m/z recalibration</option> | |
| 466 <option value="Peak_picking">Peak picking</option> | 489 <option value="Peak_picking">Peak picking</option> |
| 467 <option value="Peak_alignment">Peak alignment</option> | 490 <option value="Peak_alignment">Peak alignment</option> |
| 468 <option value="Peak_filtering">Peak filtering</option> | 491 <option value="Peak_filtering">Peak filtering</option> |
| 469 <option value="Peak_binning">Peak binning to reference peaks</option> | 492 <option value="Peak_binning">Peak binning to reference peaks</option> |
| 470 <option value="Mass_binning">m/z binning</option> | 493 <option value="Mass_binning">m/z binning</option> |
| 539 <param name="quantile" type="float" value="0.2" | 562 <param name="quantile" type="float" value="0.2" |
| 540 label="quantile" help="The top quantile of reference points (peaks detected via local maxima) to use from the reference spectrum."/> | 563 label="quantile" help="The top quantile of reference points (peaks detected via local maxima) to use from the reference spectrum."/> |
| 541 <param name="span" type="float" value="0.75" | 564 <param name="span" type="float" value="0.75" |
| 542 label="span" help="The smoothing parameter for the local polynomial regression used to determine the warping function."/> | 565 label="span" help="The smoothing parameter for the local polynomial regression used to determine the warping function."/> |
| 543 </when> | 566 </when> |
| 567 <when value="mz_recalibration"> | |
| 568 <param name="alignment_tol" type="text" value="NA" | |
| 569 label="tolerance" help="The tolerance to be used when matching the peaks in the unaligned spectra to the reference spectrum. If this is NA, then automatically guess a tolerance from the data."> | |
| 570 <sanitizer> | |
| 571 <valid initial="string.digits"> | |
| 572 <add value="N" /> | |
| 573 <add value="A" /> | |
| 574 </valid> | |
| 575 </sanitizer> | |
| 576 </param> | |
| 577 <param name="alignment_units" type="select" display="radio" optional="False" label="The units to use for the tolerance."> | |
| 578 <option value="ppm" selected="True">ppm</option> | |
| 579 <option value="mz">m/z</option> | |
| 580 </param> | |
| 581 <expand macro="reading_1_column_mz_tabular" label="Tabular file with m/z features to use for alignment. Only the m/z values from the tabular file will be kept."/> | |
| 582 <param name="quantile" type="float" value="0.2" | |
| 583 label="quantile" help="The top quantile of reference points (peaks detected via local maxima) to use from the reference spectrum."/> | |
| 584 <param name="span" type="float" value="0.75" | |
| 585 label="span" help="The smoothing parameter for the local polynomial regression used to determine the warping function."/> | |
| 586 </when> | |
| 544 <when value="Peak_picking"> | 587 <when value="Peak_picking"> |
| 545 <param name="SNR_picking_method" type="float" value="6" | 588 <param name="SNR_picking_method" type="float" value="6" |
| 546 label="Signal to noise ratio" | 589 label="Signal to noise ratio" |
| 547 help="The minimal signal to noise ratio for peaks to be considered as a valid peak."/> | 590 help="The minimal signal to noise ratio for peaks to be considered as a valid peak."/> |
| 548 <param name="blocks_picking" type="integer" value="100" label = "Number of blocks" | 591 <param name="blocks_picking" type="integer" value="100" label = "Number of blocks" |
| 618 <option value="mean" selected="True">mean</option> | 661 <option value="mean" selected="True">mean</option> |
| 619 <option value="sum">sum</option> | 662 <option value="sum">sum</option> |
| 620 </param> | 663 </param> |
| 621 <param name="replace_NA_bin" type="boolean" label="Replace NA with 0" truevalue="TRUE" falsevalue="FALSE" checked="True" help="Binning can introduce NAs, should they be replaced with 0"/> | 664 <param name="replace_NA_bin" type="boolean" label="Replace NA with 0" truevalue="TRUE" falsevalue="FALSE" checked="True" help="Binning can introduce NAs, should they be replaced with 0"/> |
| 622 <conditional name="mz_range"> | 665 <conditional name="mz_range"> |
| 623 <param name="features_filtering" type="select" label="Select m/z feature filtering option"> | 666 <param name="features_filtering" type="select" label="Select m/z options"> |
| 624 <option value="none" selected="True">none</option> | 667 <option value="none" selected="True">none</option> |
| 625 <option value="change_mz_range">change m/z range</option> | 668 <option value="change_mz_range">change m/z range</option> |
| 669 <option value="bin_to_reference">bin m/z to reference</option> | |
| 626 </param> | 670 </param> |
| 627 <when value="none"/> | 671 <when value="none"/> |
| 628 <when value="change_mz_range"> | 672 <when value="change_mz_range"> |
| 629 <param name="min_mz" type="float" value="1" label="Minimum value for m/z"/> | 673 <param name="min_mz" type="float" value="1" label="Minimum value for m/z"/> |
| 630 <param name="max_mz" type="float" value="10000" label="Maximum value for m/z"/> | 674 <param name="max_mz" type="float" value="10000" label="Maximum value for m/z"/> |
| 631 </when> | 675 </when> |
| 676 <when value="bin_to_reference"> | |
| 677 <expand macro="reading_1_column_mz_tabular" label="Tabular file with m/z features as reference for binning. Only the m/z values from the tabular file will be kept."/> | |
| 678 </when> | |
| 632 </conditional> | 679 </conditional> |
| 633 </when> | 680 </when> |
| 634 <when value="Transformation"> | 681 <when value="Transformation"> |
| 635 <conditional name="transf_conditional"> | 682 <conditional name="transf_conditional"> |
| 636 <param name="trans_type" type="select" label="Intensity transformations" help="logarithm base 2 (log2) or squareroot (sqrt)"> | 683 <param name="trans_type" type="select" label="Intensity transformations" help="logarithm base 2 (log2) or squareroot (sqrt)"> |
| 643 <when value="sqrt"/> | 690 <when value="sqrt"/> |
| 644 </conditional> | 691 </conditional> |
| 645 </when> | 692 </when> |
| 646 </conditional> | 693 </conditional> |
| 647 </repeat> | 694 </repeat> |
| 648 <param name="imzml_output" type="boolean" label="imzML output in processed format" checked="True" truevalue="proc_format" falsevalue="cont_format"/> | |
| 649 </inputs> | 695 </inputs> |
| 650 <outputs> | 696 <outputs> |
| 651 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"/> | 697 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"/> |
| 652 <data format="pdf" name="QC_overview" from_work_dir="Preprocessing.pdf" label = "${tool.name} on ${on_string}: QC"/> | 698 <data format="pdf" name="QC_overview" from_work_dir="Preprocessing.pdf" label = "${tool.name} on ${on_string}: QC"/> |
| 653 </outputs> | 699 </outputs> |
| 664 </repeat> | 710 </repeat> |
| 665 <repeat name="methods"> | 711 <repeat name="methods"> |
| 666 <conditional name="methods_conditional"> | 712 <conditional name="methods_conditional"> |
| 667 <param name="preprocessing_method" value="Smoothing"/> | 713 <param name="preprocessing_method" value="Smoothing"/> |
| 668 <conditional name="methods_for_smoothing"> | 714 <conditional name="methods_for_smoothing"> |
| 669 <param name="smoothing_method" value="gaussian"/> | 715 <param name="smoothing_method" value="sgolay"/> |
| 670 <param name="sd_gaussian" value="4"/> | 716 </conditional> |
| 671 </conditional> | |
| 672 <param name="window_smoothing" value="9"/> | |
| 673 </conditional> | 717 </conditional> |
| 674 </repeat> | 718 </repeat> |
| 675 <repeat name="methods"> | 719 <repeat name="methods"> |
| 676 <conditional name="methods_conditional"> | 720 <conditional name="methods_conditional"> |
| 677 <param name="preprocessing_method" value="Peak_picking"/> | 721 <param name="preprocessing_method" value="Peak_picking"/> |
| 700 <conditional name="transf_conditional"> | 744 <conditional name="transf_conditional"> |
| 701 <param name="trans_type" value="sqrt"/> | 745 <param name="trans_type" value="sqrt"/> |
| 702 </conditional> | 746 </conditional> |
| 703 </conditional> | 747 </conditional> |
| 704 </repeat> | 748 </repeat> |
| 705 <param name="imzml_output" value="cont_format"/> | |
| 706 <output name="QC_overview" file="preprocessing_results1.pdf" compare="sim_size"/> | 749 <output name="QC_overview" file="preprocessing_results1.pdf" compare="sim_size"/> |
| 707 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results1.imzml.txt" compare="sim_size"> | 750 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results1.imzml.txt" compare="sim_size"> |
| 708 <extra_files type="file" file="preprocessing_results1.imzml" name="imzml" lines_diff="6"/> | 751 <extra_files type="file" file="preprocessing_results1.imzml" name="imzml" lines_diff="6"/> |
| 709 <extra_files type="file" file="preprocessing_results1.ibd" name="ibd" compare="sim_size"/> | 752 <extra_files type="file" file="preprocessing_results1.ibd" name="ibd" compare="sim_size"/> |
| 710 </output> | 753 </output> |
| 725 <repeat name="methods"> | 768 <repeat name="methods"> |
| 726 <conditional name="methods_conditional"> | 769 <conditional name="methods_conditional"> |
| 727 <param name="preprocessing_method" value="Peak_alignment"/> | 770 <param name="preprocessing_method" value="Peak_alignment"/> |
| 728 </conditional> | 771 </conditional> |
| 729 </repeat> | 772 </repeat> |
| 730 <param name="imzml_output" value="cont_format"/> | |
| 731 <output name="QC_overview" file="preprocessing_results2.pdf" compare="sim_size"/> | 773 <output name="QC_overview" file="preprocessing_results2.pdf" compare="sim_size"/> |
| 732 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results2.imzml.txt" compare="sim_size"> | 774 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results2.imzml.txt" compare="sim_size"> |
| 733 <extra_files type="file" file="preprocessing_results2.imzml" name="imzml" lines_diff="6"/> | 775 <extra_files type="file" file="preprocessing_results2.imzml" name="imzml" lines_diff="6"/> |
| 734 <extra_files type="file" file="preprocessing_results2.ibd" name="ibd" compare="sim_size"/> | 776 <extra_files type="file" file="preprocessing_results2.ibd" name="ibd" compare="sim_size"/> |
| 735 </output> | 777 </output> |
| 751 <param name="window_picking" value="5"/> | 793 <param name="window_picking" value="5"/> |
| 752 <param name="SNR_picking_method" value="2"/> | 794 <param name="SNR_picking_method" value="2"/> |
| 753 <conditional name="methods_for_picking"> | 795 <conditional name="methods_for_picking"> |
| 754 <param name="picking_method" value="mad"/> | 796 <param name="picking_method" value="mad"/> |
| 755 </conditional> | 797 </conditional> |
| 756 <param name="imzml_output" value="proc_format"/> | |
| 757 </conditional> | 798 </conditional> |
| 758 </repeat> | 799 </repeat> |
| 759 <repeat name="methods"> | 800 <repeat name="methods"> |
| 760 <conditional name="methods_conditional"> | 801 <conditional name="methods_conditional"> |
| 761 <param name="preprocessing_method" value="Peak_alignment"/> | 802 <param name="preprocessing_method" value="Peak_alignment"/> |
| 762 <param name="imzml_output" value="proc_format"/> | |
| 763 </conditional> | 803 </conditional> |
| 764 </repeat> | 804 </repeat> |
| 765 <output name="QC_overview" file="preprocessing_results3.pdf" compare="sim_size"/> | 805 <output name="QC_overview" file="preprocessing_results3.pdf" compare="sim_size"/> |
| 766 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results3.imzml.txt" compare="sim_size"> | 806 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results3.imzml.txt" compare="sim_size"> |
| 767 <extra_files type="file" file="preprocessing_results3.imzml" name="imzml" lines_diff="6"/> | 807 <extra_files type="file" file="preprocessing_results3.imzml" name="imzml" lines_diff="6"/> |
| 777 </conditional> | 817 </conditional> |
| 778 </repeat> | 818 </repeat> |
| 779 <repeat name="methods"> | 819 <repeat name="methods"> |
| 780 <conditional name="methods_conditional"> | 820 <conditional name="methods_conditional"> |
| 781 <param name="preprocessing_method" value="mz_alignment"/> | 821 <param name="preprocessing_method" value="mz_alignment"/> |
| 822 </conditional> | |
| 823 </repeat> | |
| 824 <repeat name="methods"> | |
| 825 <conditional name="methods_conditional"> | |
| 826 <param name="preprocessing_method" value="mz_recalibration"/> | |
| 827 <param name="alignment_tol" value="2"/> | |
| 828 <param name="alignment_units" value="ppm"/> | |
| 829 <param name="mz_tabular" value="inputcalibrantfile2.txt" ftype="tabular"/> | |
| 830 <param name="feature_column" value="1"/> | |
| 831 <param name="feature_header" value="TRUE"/> | |
| 782 </conditional> | 832 </conditional> |
| 783 </repeat> | 833 </repeat> |
| 784 <repeat name="methods"> | 834 <repeat name="methods"> |
| 785 <conditional name="methods_conditional"> | 835 <conditional name="methods_conditional"> |
| 786 <param name="preprocessing_method" value="Mass_binning"/> | 836 <param name="preprocessing_method" value="Mass_binning"/> |
| 848 - Transformation: log2 or squareroot transformation of all intensities; when using log2 transformation zero intensities will become NA, this can lead to compatibility problems. | 898 - Transformation: log2 or squareroot transformation of all intensities; when using log2 transformation zero intensities will become NA, this can lead to compatibility problems. |
| 849 | 899 |
| 850 | 900 |
| 851 **Output** | 901 **Output** |
| 852 | 902 |
| 853 - MSI data as continuous or processed imzML file | 903 - MSI data as continuous imzML file |
| 854 - pdf with key values and four random mass spectra after each processing step | 904 - pdf with key values and four random mass spectra after each processing step |
| 855 | 905 |
| 856 ]]> | 906 ]]> |
| 857 </help> | 907 </help> |
| 858 <expand macro="citations"/> | 908 <expand macro="citations"/> |
