# HG changeset patch # User galaxyp # Date 1587073998 14400 # Node ID d286ff4600dda7f6724d843b4cabf03bf53d9eb1 # Parent e66f552a3c470f449e4d1ba459f12e5f5a137409 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/MALDIquant commit 8c5cd26641af4b6206662ee525c1e7bd4205d96e" diff -r e66f552a3c47 -r d286ff4600dd maldi_quant_peakdetection.xml --- 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 @@ - + 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)