# HG changeset patch # User galaxyp # Date 1534959285 14400 # Node ID f561660822225293d393776609b37bdda68ae19c # Parent 898dec99d9fc482c2cf7820def2a7dbea67655f2 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6 diff -r 898dec99d9fc -r f56166082222 msi_qualitycontrol.xml --- a/msi_qualitycontrol.xml Wed Aug 15 05:39:22 2018 -0400 +++ b/msi_qualitycontrol.xml Wed Aug 22 13:34:45 2018 -0400 @@ -1,4 +1,4 @@ - + mass spectrometry imaging QC @@ -48,16 +48,20 @@ #elif $infile.ext == 'analyze75' msidata = readAnalyze('infile') #else - load('infile.RData') + loadRData <- function(fileName){ + load(fileName) + get(ls()[ls() != "fileName"]) + } + msidata = loadRData('infile.RData') #end if -## create full matrix to make processed imzML files compatible with segmentation and other steps -iData(msidata) <- iData(msidata)[] - ## remove duplicated coordinates print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed")) msidata <- msidata[,!duplicated(coord(msidata))] +## create full matrix to make processed imzML files compatible with segmentation and other steps +iData(msidata) <- iData(msidata)[] + ## optional annotation from tabular file to obtain pixel groups (otherwise all pixels are considered to be one sample) #if str($tabular_annotation.load_annotation) == 'yes_annotation': @@ -288,10 +292,6 @@ colnames(position_df)[3] = "annotation" -print(position_df) -print(class(position_df\$x)) -print(class(position_df\$annotation)) - combine_plot = ggplot(position_df, aes(x=x, y=y, fill=annotation))+ geom_tile() + coord_fixed()+ @@ -301,7 +301,7 @@ theme(text=element_text(family="ArialMT", face="bold", size=12))+ theme(legend.position="bottom",legend.direction="vertical")+ theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ - guides(fill=guide_legend(ncol=5,byrow=TRUE)) + guides(fill=guide_legend(ncol=4,byrow=TRUE)) print(combine_plot) @@ -1083,13 +1083,15 @@ This tool uses Cardinal to read files and create a quality control report with descriptive plots for mass spectrometry imaging data. -Input data: 3 types of input data can be used: +Input data: 3 types of MSI data can be used: - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format `_ - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) +- Coordinates stored as decimals rather than integers will be rounded to obtain a regular pixel grid. This might lead to duplicated coordinates which will be automatically removed before the tools analysis starts. - optional: tabular file with pixel annotations: x and y values in separate columns and the corresponding annotation in a third column + Options: - internal calibrants are used for m/z heatmaps (x-y grid), heatmap of number of calibrants per spectrum (x-y grid), zoomed in mass spectra, m/z accuracy