# HG changeset patch # User galaxyp # Date 1587073733 0 # Node ID 8431b33e6989052be04f40f5b0517d156776cd90 # Parent af766257766e366706aec1600c1aa8e835050965 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/MALDIquant commit 8c5cd26641af4b6206662ee525c1e7bd4205d96e" diff -r af766257766e -r 8431b33e6989 maldi_quant_peakdetection.xml --- a/maldi_quant_peakdetection.xml Thu Mar 19 22:06:54 2020 +0000 +++ b/maldi_quant_peakdetection.xml Thu Apr 16 21:48:53 2020 +0000 @@ -1,4 +1,4 @@ - + Peak detection, binning and filtering for mass-spectrometry imaging data @@ -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)