# HG changeset patch # User galaxyp # Date 1553257583 14400 # Node ID e9300ef37403991ff4dd6bda8ba1c8b63b8076f3 # Parent 36d38d2cf88ca55cb0473984e1317d79f5495f60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/MALDIquant commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d 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 @@ -1,4 +1,4 @@ - + Peak detection, binning and filtering for mass-spectrometry imaging data @@ -128,10 +128,12 @@ ## plot input file spectrum: #if $centroids: ## Choose random spectra for QC plots + print(length(peaks)) random_spectra = sample(1:length(peaks), 4, replace=FALSE) + random_spectra_name = pixelnames[random_spectra] par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]],sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]],sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Input spectra", outer=TRUE, line=0) #else @@ -139,7 +141,8 @@ random_spectra = sample(1:length(maldi_data), 4, replace=FALSE) par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(maldi_data[[random_sample]],sub="", main=paste0("spectrum ", random_sample))} + plot(maldi_data[[random_sample]],sub="", main=paste0("spectrum ", pixelnames[random_sample])) + } title("Input spectra", outer=TRUE, line=0) #end if @@ -223,7 +226,7 @@ par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ noise = estimateNoise(maldi_data[[random_sample]], method= "$method.methods_conditional.peak_method") - plot(maldi_data[[random_sample]], sub="", main=paste0("spectrum ", random_sample)) + plot(maldi_data[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample])) lines(noise[,1], noise[,2]*$method.methods_conditional.snr, col="blue") points(peaks[[random_sample]], col="green", pch=20)} title("S/N in blue and picked peaks in green", outer=TRUE, line=0) @@ -231,7 +234,7 @@ ## plot new spectrum par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Picked peaks", outer=TRUE, line=0) pixel_number = length(peaks) @@ -268,20 +271,20 @@ peaks = monoisotopicPeaks(peaks, minCor=$method.methods_conditional.minCor, tolerance=$method.methods_conditional.tolerance, - distance=$method.methods_conditional.distance, + distance=c($method.methods_conditional.distance), size=$method.methods_conditional.size) ## plot old spectrum with picked isotopes as green dots par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(picked_peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample)) + plot(picked_peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample])) points(peaks[[random_sample]], col="green", pch=20)} title(paste0("Monoisotopic peaks in green"), outer=TRUE, line=0) par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Monoisotopic peaks", outer=TRUE, line=0) minmz = round(min(unlist(lapply(peaks,mass))), digits=4) @@ -365,7 +368,7 @@ ## QC plot and numbers par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Aligned spectra", outer=TRUE, line=0) minmz = round(min(unlist(lapply(peaks,mass))), digits=4) maxmz = round(max(unlist(lapply(peaks,mass))), digits=4) @@ -400,7 +403,7 @@ ## QC plot and numbers par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Binned spectra", outer=TRUE, line=0) minmz = round(min(unlist(lapply(peaks,mass))), digits=4) maxmz = round(max(unlist(lapply(peaks,mass))), digits=4) @@ -451,7 +454,7 @@ ##QC plot and numbers par(mfrow = c(2, 2), oma=c(0,0,2,0)) for (random_sample in random_spectra){ - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", random_sample))} + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))} title("Filtered spectra", outer=TRUE, line=0) minmz = round(min(unlist(lapply(peaks,mass))), digits=4) maxmz = round(max(unlist(lapply(peaks,mass))), digits=4) @@ -550,7 +553,7 @@ - + @@ -571,11 +574,25 @@ - - - + help="Minimal correlation between the peak pattern generated by the model and the experimental peaks in the MassPeaks object to be recognized as isotopic pattern."/> + + + + + + + + + + + + + + + + + @@ -614,7 +631,7 @@ - + @@ -673,6 +690,7 @@ + @@ -802,6 +820,13 @@ - Monoisotopic peaks: Keeps only the monoisotopic peaks + - Based on poisson model for isotopic patterns as decribed in (`Breen et al. `_) + - Isotopic pattern can be characterized and recognized by + + - the similarity of the experimental pattern with the modelled pattern + - the distance between consecutive isotopic peaks. For polypeptides the average distance is 1.00235 (`Park et al. `_). 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). + - the size (length) of the pattern, multiple values can be applied, longer patterns are prefered over shorter ones. + - Spectra alignment (warping): alignment for (re)calibration of m/z values.