Previous changeset 3:36d38d2cf88c (2019-02-15) Next changeset 5:e66f552a3c47 (2020-03-19) |
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/MALDIquant commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d |
modified:
maldi_quant_peakdetection.xml |
b |
diff -r 36d38d2cf88c -r e9300ef37403 maldi_quant_peakdetection.xml --- a/maldi_quant_peakdetection.xml Fri Feb 15 10:26:45 2019 -0500 +++ b/maldi_quant_peakdetection.xml Fri Mar 22 08:26:23 2019 -0400 |
[ |
b'@@ -1,4 +1,4 @@\n-<tool id="maldi_quant_peak_detection" name="MALDIquant peak detection" version="@VERSION@.3">\n+<tool id="maldi_quant_peak_detection" name="MALDIquant peak detection" version="@VERSION@.4">\n <description>\n Peak detection, binning and filtering for mass-spectrometry imaging data\n </description>\n@@ -128,10 +128,12 @@\n ## plot input file spectrum: \n #if $centroids:\n ## Choose random spectra for QC plots\n+ print(length(peaks))\n random_spectra = sample(1:length(peaks), 4, replace=FALSE)\n+ random_spectra_name = pixelnames[random_spectra]\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(peaks[[random_sample]],sub="", main=paste0("spectrum ", random_sample))}\n+ plot(peaks[[random_sample]],sub="", main=paste0("spectrum ", pixelnames[random_sample]))}\n title("Input spectra", outer=TRUE, line=0)\n \n #else\n@@ -139,7 +141,8 @@\n random_spectra = sample(1:length(maldi_data), 4, replace=FALSE)\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(maldi_data[[random_sample]],sub="", main=paste0("spectrum ", random_sample))}\n+ plot(maldi_data[[random_sample]],sub="", main=paste0("spectrum ", pixelnames[random_sample]))\n+ }\n title("Input spectra", outer=TRUE, line=0)\n #end if\n \n@@ -223,7 +226,7 @@\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n noise = estimateNoise(maldi_data[[random_sample]], method= "$method.methods_conditional.peak_method")\n- plot(maldi_data[[random_sample]], sub="", main=paste0("spectrum ", random_sample))\n+ plot(maldi_data[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))\n lines(noise[,1], noise[,2]*$method.methods_conditional.snr, col="blue")\n points(peaks[[random_sample]], col="green", pch=20)}\n title("S/N in blue and picked peaks in green", outer=TRUE, line=0)\n@@ -231,7 +234,7 @@\n ## plot new spectrum\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))}\n+ plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))}\n title("Picked peaks", outer=TRUE, line=0)\n \n pixel_number = length(peaks)\n@@ -268,20 +271,20 @@\n \n peaks = monoisotopicPeaks(peaks, minCor=$method.methods_conditional.minCor, \n tolerance=$method.methods_conditional.tolerance,\n- distance=$method.methods_conditional.distance, \n+ distance=c($method.methods_conditional.distance),\n size=$method.methods_conditional.size)\n \n ## plot old spectrum with picked isotopes as green dots\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(picked_peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))\n+ plot(picked_peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))\n points(peaks[[random_sample]], col="green", pch=20)}\n title(paste0("Monoisotopic peaks in green"), outer=TRUE, line=0)\n \n \n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))}\n+ plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))}\n title("Monoisotopic peaks", outer=TRUE, line=0)\n \n minmz = round(min(unlist(lapply(peaks,mass))), digits=4)\n@@ -365,7 +368,7 @@\n ## QC plot and numbers\n par(mfrow = c(2, 2), oma=c(0,0,2,0))\n for (random_sample in random_spectra){\n- plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))}\n+ plot'..b'rn."/>\n+ <param name="tolerance" type="float" label="Tolerance" value="0.0001"\n+ help="Maximal relative deviation of a peak position (m/z) to be considered as identical: abs(((mass[i]+distance)-mass[i+1])/mass[i]) smaller than \'tolerance\'. For 100ppm use 0.0001" />\n+ <param name="distance" type="text" label="Distance" value="1.00235" help="Distance between two consecutive peaks in an isotopic pattern. 1.00235 is average distance for polypeptides. Multiple values can be used to find multiple charged pattern e.g. 1, 0.5 ,0.33">\n+ <sanitizer invalid_char="">\n+ <valid initial="string.digits">\n+ <add value="," />\n+ <add value=":" />\n+ <add value="." />\n+ </valid>\n+ </sanitizer>\n+ </param>\n+ <param name="size" type="text" label="Size" value="3:10" help="Size (length) of isotopic pattern, longer patterns are prefered over shorter ones, min size is 2, a range can be used.">\n+ <sanitizer invalid_char="">\n+ <valid initial="string.digits">\n+ <add value=":" />\n+ </valid>\n+ </sanitizer>\n+ </param>\n </when>\n \n <when value="Align">\n@@ -614,7 +631,7 @@\n <when value="Binning">\n <param name="bin_tolerance" type="float" value="0.002" label="Tolerance"\n help="After the alignment the peak positions (mass) are very similar but not identical. The binning is needed to make similar peak mass values identical."/>\n- <param name="bin_method" display="radio" type="select" label="Bin creation rule" help="strict - creates bins never containing two or more peaks of the sampe sample. relaxed - allows multiple peaks of the same sample in one bin.">\n+ <param name="bin_method" display="radio" type="select" label="Bin creation rule" help="strict - creates bins never containing two or more peaks of the same sample. relaxed - allows multiple peaks of the same sample in one bin.">\n <option value="strict" selected="True" >strict</option>\n <option value="relaxed" >relaxed</option>\n </param>\n@@ -673,6 +690,7 @@\n <conditional name="methods_conditional">\n <param name="method" value="monoisotopic_peaks"/>\n <param name="tolerance" value="0.0004"/>\n+ <param name="size" value="3"/>\n </conditional>\n </repeat>\n <output name="plots" file="peakdetection2_QC.pdf" compare="sim_size"/>\n@@ -802,6 +820,13 @@\n \n - Monoisotopic peaks: Keeps only the monoisotopic peaks\n \n+ - Based on poisson model for isotopic patterns as decribed in (`Breen et al. <https://doi.org/10.1002/1522-2683(20000601)21:11%3C2243::AID-ELPS2243%3E3.0.CO;2-K>`_)\n+ - Isotopic pattern can be characterized and recognized by\n+\n+ - the similarity of the experimental pattern with the modelled pattern\n+ - the distance between consecutive isotopic peaks. For polypeptides the average distance is 1.00235 (`Park et al. <https://pubs.acs.org/doi/abs/10.1021/ac800913b>`_). Multiply charged analytes have smaller distances between the peaks (e.g. z = 1 distance = ~1; z = 2: distance = ~0.5; z = 3: distance = ~0.3333) To search for differently charged isotopic pattern multiple distances can be applied - the order matters because the first distance that matches is reported (1, 0.5, 0.3333). \n+ - the size (length) of the pattern, multiple values can be applied, longer patterns are prefered over shorter ones.\n+\n \n - Spectra alignment (warping): alignment for (re)calibration of m/z values. \n \n' |