Mercurial > repos > galaxyp > maldi_quant_peak_detection
changeset 6:d286ff4600dd draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/MALDIquant commit 8c5cd26641af4b6206662ee525c1e7bd4205d96e"
author | galaxyp |
---|---|
date | Thu, 16 Apr 2020 17:53:18 -0400 |
parents | e66f552a3c47 |
children | 160538a890a6 |
files | maldi_quant_peakdetection.xml |
diffstat | 1 files changed, 37 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/maldi_quant_peakdetection.xml Thu Mar 19 18:09:47 2020 -0400 +++ b/maldi_quant_peakdetection.xml Thu Apr 16 17:53:18 2020 -0400 @@ -1,4 +1,4 @@ -<tool id="maldi_quant_peak_detection" name="MALDIquant peak detection" version="@VERSION@.5"> +<tool id="maldi_quant_peak_detection" name="MALDIquant peak detection" version="@VERSION@.6"> <description> Peak detection, binning and filtering for mass-spectrometry imaging data </description> @@ -379,6 +379,7 @@ #end if peaks = removeEmptyMassObjects(peaks) + pixelnames = paste("xy", coordinates(peaks)[,1],coordinates(peaks)[,2], sep="_") } #end if @@ -387,15 +388,15 @@ for (random_sample in random_spectra){ - - tryCatch( - { - plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample]))}, - error=function(cond) { - plot(NULL, xlim=c(0,0), ylim=c(0,0), ylab="intensity", xlab="m/z") - } - ) -} + tryCatch( + { + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample])) + },error=function(cond) + { + plot(NULL, xlim=c(0,0), ylim=c(0,0), ylab="intensity", xlab="m/z") + } + ) + } title("Aligned spectra", outer=TRUE, line=0) minmz = round(min(unlist(lapply(peaks,mass))), digits=4) @@ -415,12 +416,14 @@ featureMatrix <- intensityMatrix(peaks, maldi_data) #end if #end if + featureMatrix2 =cbind(pixelnames, featureMatrix) colnames(featureMatrix2)[1] = c("mz") featureMatrix2 = t(featureMatrix2) write.table(featureMatrix2, file="$intensity_matrix", quote = FALSE, row.names = TRUE, col.names=FALSE, sep = "\t") }else{print("There are no spectra with peaks left")} + #elif str( $method.methods_conditional.method ) == 'Binning': print('binning') @@ -430,8 +433,19 @@ ## 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 ", pixelnames[random_sample]))} + + tryCatch( + { + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample])) + },error=function(cond) + { + plot(NULL, xlim=c(0,0), ylim=c(0,0), ylab="intensity", xlab="m/z") + } + ) + } + 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) @@ -481,8 +495,19 @@ ##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 ", pixelnames[random_sample]))} + + tryCatch( + { + plot(peaks[[random_sample]], sub="", main=paste0("spectrum ", pixelnames[random_sample])) + },error=function(cond) + { + plot(NULL, xlim=c(0,0), ylim=c(0,0), ylab="intensity", xlab="m/z") + } + ) + } + 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)