comparison msi_qualitycontrol.xml @ 16:ed23ae226cdc draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_qualitycontrol commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
author galaxyp
date Wed, 22 Aug 2018 13:43:49 -0400
parents 2d69460669ae
children
comparison
equal deleted inserted replaced
15:2d69460669ae 16:ed23ae226cdc
1 <tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.10.0.6"> 1 <tool id="mass_spectrometry_imaging_qc" name="MSI Qualitycontrol" version="1.10.0.7">
2 <description> 2 <description>
3 mass spectrometry imaging QC 3 mass spectrometry imaging QC
4 </description> 4 </description>
5 <requirements> 5 <requirements>
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> 6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
46 msidata <- readImzML('infile') 46 msidata <- readImzML('infile')
47 #end if 47 #end if
48 #elif $infile.ext == 'analyze75' 48 #elif $infile.ext == 'analyze75'
49 msidata = readAnalyze('infile') 49 msidata = readAnalyze('infile')
50 #else 50 #else
51 load('infile.RData') 51 loadRData <- function(fileName){
52 load(fileName)
53 get(ls()[ls() != "fileName"])
54 }
55 msidata = loadRData('infile.RData')
52 #end if 56 #end if
53
54 ## create full matrix to make processed imzML files compatible with segmentation and other steps
55 iData(msidata) <- iData(msidata)[]
56 57
57 ## remove duplicated coordinates 58 ## remove duplicated coordinates
58 print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed")) 59 print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed"))
59 msidata <- msidata[,!duplicated(coord(msidata))] 60 msidata <- msidata[,!duplicated(coord(msidata))]
61
62 ## create full matrix to make processed imzML files compatible with segmentation and other steps
63 iData(msidata) <- iData(msidata)[]
60 64
61 ## optional annotation from tabular file to obtain pixel groups (otherwise all pixels are considered to be one sample) 65 ## optional annotation from tabular file to obtain pixel groups (otherwise all pixels are considered to be one sample)
62 66
63 #if str($tabular_annotation.load_annotation) == 'yes_annotation': 67 #if str($tabular_annotation.load_annotation) == 'yes_annotation':
64 68
286 spectrum_list[[list_count]] = position_df 290 spectrum_list[[list_count]] = position_df
287 list_count = list_count+1 291 list_count = list_count+1
288 292
289 colnames(position_df)[3] = "annotation" 293 colnames(position_df)[3] = "annotation"
290 294
291 print(position_df)
292 print(class(position_df\$x))
293 print(class(position_df\$annotation))
294
295 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=annotation))+ 295 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=annotation))+
296 geom_tile() + 296 geom_tile() +
297 coord_fixed()+ 297 coord_fixed()+
298 ggtitle("Spatial orientation of pixel annotations")+ 298 ggtitle("Spatial orientation of pixel annotations")+
299 theme_bw()+ 299 theme_bw()+
300 theme(plot.title = element_text(hjust = 0.5))+ 300 theme(plot.title = element_text(hjust = 0.5))+
301 theme(text=element_text(family="ArialMT", face="bold", size=12))+ 301 theme(text=element_text(family="ArialMT", face="bold", size=12))+
302 theme(legend.position="bottom",legend.direction="vertical")+ 302 theme(legend.position="bottom",legend.direction="vertical")+
303 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+ 303 theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = legend_size))+
304 guides(fill=guide_legend(ncol=5,byrow=TRUE)) 304 guides(fill=guide_legend(ncol=4,byrow=TRUE))
305 305
306 print(combine_plot) 306 print(combine_plot)
307 307
308 ### order pixels according to annotation - this gives a new pixel/spectra index order according to the annotation groups 308 ### order pixels according to annotation - this gives a new pixel/spectra index order according to the annotation groups
309 pixel_name_df = data.frame(pixels(msidata), msidata\$annotation) 309 pixel_name_df = data.frame(pixels(msidata), msidata\$annotation)
1081 <![CDATA[ 1081 <![CDATA[
1082 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ 1082 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_
1083 1083
1084 This tool uses Cardinal to read files and create a quality control report with descriptive plots for mass spectrometry imaging data. 1084 This tool uses Cardinal to read files and create a quality control report with descriptive plots for mass spectrometry imaging data.
1085 1085
1086 Input data: 3 types of input data can be used: 1086 Input data: 3 types of MSI data can be used:
1087 1087
1088 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ 1088 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
1089 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) 1089 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
1090 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) 1090 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
1091 - 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.
1091 - optional: tabular file with pixel annotations: x and y values in separate columns and the corresponding annotation in a third column 1092 - optional: tabular file with pixel annotations: x and y values in separate columns and the corresponding annotation in a third column
1093
1092 1094
1093 Options: 1095 Options:
1094 1096
1095 - 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 1097 - 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
1096 - optional fold change plot: draws a heatmap (x-y grid) for the fold change of two m/z (log2(intensity ratio)) 1098 - optional fold change plot: draws a heatmap (x-y grid) for the fold change of two m/z (log2(intensity ratio))