# HG changeset patch # User galaxyp # Date 1511564856 18000 # Node ID 641316f29395904fe4add0066b8a81eaaae1a2d3 # Parent 133a921f4ef53d56564d17a5cb578b0f496e2520 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_preprocessing commit a8eebad4ad469908f64c25e1e2c705eb637e3cae diff -r 133a921f4ef5 -r 641316f29395 msi_preprocessing.xml --- a/msi_preprocessing.xml Tue Oct 31 15:04:41 2017 -0400 +++ b/msi_preprocessing.xml Fri Nov 24 18:07:36 2017 -0500 @@ -1,4 +1,4 @@ - + mass spectrometry imaging preprocessing @@ -35,6 +35,7 @@ load('infile.RData') #end if + maxpixel = length(pixels(msidata)) pixelnumber = c(1:maxpixel) @@ -64,6 +65,7 @@ msidata <- smoothSignal(msidata, method="$method.methods_conditional.methods_for_smoothing.smoothing_method", window=$method.methods_conditional.window_smoothing, coef = $method.methods_conditional.methods_for_smoothing.coefficients_ma_filter) #end if + #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking': print('Peak_picking') ## Peakpicking @@ -81,6 +83,8 @@ msidata = peakPick(msidata, pixel=pixelnumber, window = $method.methods_conditional.window_picking, blocks = $method.methods_conditional.blocks_picking, method='$method.methods_conditional.methods_for_picking.picking_method', SNR=$method.methods_conditional.SNR_picking_method) #end if + + #elif str( $method.methods_conditional.preprocessing_method ) == 'Peak_alignment': print('Peak_alignment') ## Peakalignment @@ -100,22 +104,31 @@ #end if #end for + ## save as as (.RData) save(msidata, file="$msidata_preprocessed") -## save as intensity matrix (.csv) -csvmatrix = spectra(msidata) -rownames(csvmatrix) = mz(msidata) -newmatrix = rbind(pixels(msidata), csvmatrix) -write.csv(newmatrix[2:nrow(newmatrix),], file="$preprocessed_intensity_matrix") +if (length(features(msidata))> 0) +{ + +## save as intensity matrix +spectramatrix = spectra(msidata) +rownames(spectramatrix) = mz(msidata) +newmatrix = rbind(pixels(msidata), spectramatrix) +write.table(newmatrix[2:nrow(newmatrix),], file="$matrixasoutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") + +}else{ + print("file has no features left") +write.table(matrix(rownames(coord(msidata)), ncol=ncol(msidata), nrow=1), file="$matrixasoutput", quote = FALSE, row.names = FALSE, col.names=FALSE, sep = "\t") +} + ]]> - + label="MSI rawdata as imzml or Cardinal MSImageSet saved as RData" + help="load imzml and ibd file by uploading composite datatype imzml"/> @@ -210,14 +223,14 @@ - - + + - - + + @@ -226,9 +239,15 @@ + + + + + + - + @@ -246,26 +265,26 @@ - + - + - + - - + + @@ -281,27 +300,25 @@ - + - - - + + + - + @@ -317,11 +334,12 @@ - + + -