annotate spatial_DGMM.xml @ 1:dc07c4f727de draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit eeeb69463a2037a6ee620b9223cb152fcc39f1b0
author galaxyp
date Wed, 19 Apr 2023 22:22:32 +0000
parents 75b43378fb02
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
1 <tool id="cardinal_single_ion_segmentation" name="MSI single ion segmentation" version="@VERSION@.0">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
2 <description>mass spectrometry imaging spatial DGMM</description>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
3 <macros>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
4 <import>macros.xml</import>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
5 </macros>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
6 <expand macro="requirements">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
7 <requirement type="package" version="2.3">r-gridextra</requirement>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
8 </expand>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
9 <command detect_errors="exit_code">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
10 <![CDATA[
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
11
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
12 @INPUT_LINKING@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
13 cat '${MSI_spatial_DGMM}' &&
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
14 Rscript '${MSI_spatial_DGMM}'
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
15
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
16 ]]>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
17 </command>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
18 <configfiles>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
19 <configfile name="MSI_spatial_DGMM"><![CDATA[
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
20
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
21 ################################# load libraries and read file #################
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
22
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
23 library(Cardinal)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
24 library(gridExtra)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
25
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
26 @READING_MSIDATA_FULLY_COMPATIBLE@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
27
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
28 #if str($sample_groups.group) == "multiple_groups":
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
29 ## read and extract x,y,annotation information
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
30 input_tabular <- read.delim("$sample_groups.annotation_file", header = $sample_groups.tabular_header, stringsAsFactors = FALSE)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
31 annotation_input <- input_tabular[,c($sample_groups.column_x, $sample_groups.column_y, $sample_groups.column_names)]
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
32 annotation_name <- colnames(annotation_input)[3] ##extract header for annotations to later export tabular with same name
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
33 colnames(annotation_input) <- c("x", "y", "annotation") ## rename annotations header to default name "annotation"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
34
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
35 ## merge with coordinate information of msidata
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
36 msidata_coordinates <- data.frame(coord(msidata)\$x, coord(msidata)\$y, c(1:ncol(msidata)))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
37 colnames(msidata_coordinates) <- c("x", "y", "pixel_index")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
38 merged_annotation <- merge(msidata_coordinates, annotation_input, by=c("x", "y"), all.x=TRUE)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
39 merged_annotation[is.na(merged_annotation)] <- "NA"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
40 merged_annotation <- merged_annotation[order(merged_annotation\$pixel_index),]
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
41 msidata\$annotation <- as.character(merged_annotation[,4])
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
42 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
43
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
44
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
45 @DATA_PROPERTIES_INRAM@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
46
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
47
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
48 ## remove duplicated coordinates
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
49 msidata <- msidata[,!duplicated(coord(msidata))]
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
50
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
51
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
52 ######################################## PDF ###################################
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
53 ################################################################################
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
54 ################################################################################
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
55
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
56
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
57 pdf("single_ion_segmentation.pdf", fonts = "Times", pointsize = 12)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
58 plot(0,type='n',axes=FALSE,ann=FALSE)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
59
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
60 title(main=paste0("Single ion segmentation for file: \n\n", "$infile.display_name"))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
61
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
62 grid.table(property_df, rows= NULL)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
63
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
64 if (npeaks > 0)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
65 {
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
66
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
67 ## set seed to make analysis reproducible
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
68 set.seed($setseed)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
69
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
70
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
71 ## single ion segmentation
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
72 dgmm <- spatialDGMM(msidata,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
73 r = c($r),
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
74 k = c($k),
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
75 #if str($sample_groups.group) == 'single_group':
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
76 groups = as.factor(rep("$infile.display_name", ncol(msidata))),
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
77 #else
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
78 groups = msidata\$annotation,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
79 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
80 method = "$method",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
81 dist = "$dist",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
82 annealing = $annealing,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
83 init = "$init",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
84 p0 = $p0,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
85 iter.max = $iter_max,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
86 tol = $tol)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
87
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
88 ## Summary results table
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
89 dgmm_summary <- as.data.frame(summary(dgmm))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
90 colnames(dgmm_summary) <- c('r', 'k', 'Feature', 'Classes/group')
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
91 dgmm_summary\$'m/z' <- mz(msidata)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
92 feature_n <- dgmm_summary\$Feature
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
93 dgmm_summary\$Feature <- NULL
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
94 dgmm_summary\$Feature <- feature_n
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
95 write.table(dgmm_summary, file="$dgmm_summary", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
96
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
97 ## Results images
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
98 for (dgmm_repeat in 1:nrow(dgmm_summary)){
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
99 print(image(dgmm, values="class", model=dgmm_repeat))}
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
100 dev.off() ## closes pdf file
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
101
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
102 ## optional outputs
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
103 pixel_names <- paste0("xy_", coord(dgmm)\$x, "_", coord(dgmm)\$y)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
104
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
105 #if $output_probability:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
106 dir.create("DGMM_probability")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
107 for (dgmm_repeat in 1:nrow(dgmm_summary)){
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
108 name_repeat <- file.path(paste0("DGMM_probability/probability_r", dgmm_summary\$r[dgmm_repeat], "_k", dgmm_summary\$k[dgmm_repeat], "_mz", dgmm_summary\$`m/z`[dgmm_repeat], ".tabular"))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
109 prob_df <- data.frame(coord(dgmm)\$x, coord(dgmm)\$y, pixel_names, resultData(dgmm, dgmm_repeat, "class"), resultData(dgmm, dgmm_repeat, "probability"))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
110 colnames(prob_df)[1:4] <- c("x", "y", "pixel_names", "class")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
111 write.table(prob_df, file=name_repeat, quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
112 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
113 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
114
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
115 #if $output_estimates:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
116 dir.create("DGMM_estimates")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
117 for (dgmm_repeat in 1:nrow(dgmm_summary)){
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
118 name_repeat <- file.path(paste0("DGMM_estimates/estimates_r", dgmm_summary\$r[dgmm_repeat], "_k", dgmm_summary\$k[dgmm_repeat], "_mz", dgmm_summary\$`m/z`[dgmm_repeat], ".tabular"))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
119 est_df <- resultData(dgmm, dgmm_repeat, "estimates")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
120 write.table(est_df, file=name_repeat, quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
121 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
122 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
123
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
124 #if $output_plots:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
125 dir.create("DGMM_plots")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
126 for (dgmm_repeat in 1:nrow(dgmm_summary)){
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
127 name_repeat <- file.path(paste0("DGMM_plots/plot_r", dgmm_summary\$r[dgmm_repeat], "_k", dgmm_summary\$k[dgmm_repeat], "_mz", dgmm_summary\$`m/z`[dgmm_repeat], ".png"))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
128 png(file=name_repeat)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
129 print(plot(dgmm, model=dgmm_repeat, lwd=2))
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
130 dev.off()
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
131 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
132 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
133
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
134 ## optional output as .RData
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
135 #if $output_rdata:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
136 ## save as (.RData)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
137 save(dgmm, file="$dgmm_rdata")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
138 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
139
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
140 }else{
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
141 print("Inputfile has no intensities > 0")
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
142 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
143
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
144 ]]></configfile>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
145 </configfiles>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
146 <inputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
147 <expand macro="reading_msidata"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
148 <conditional name="sample_groups">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
149 <param name="group" type="select" label="Dataset groups" help="Pixels from different groups will be segmented separately. For the validity of
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
150 downstream statistical analysis, it is important that each distinct observational unit (e.g., tissue sample) is assigned to a unique group">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
151 <option value="single_group" selected="True">Dataset is a single group</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
152 <option value="multiple_groups">Dataset contains multiple groups</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
153 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
154 <when value="single_group"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
155 <when value="multiple_groups">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
156 <expand macro="reading_pixel_annotations"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
157 </when>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
158 </conditional>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
159 <param name="r" type="text" value="2"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
160 label="r" help="The spatial neighborhood radius of nearby pixels to consider. Only a single value is allowed">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
161 <expand macro="sanitizer_multiple_digits"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
162 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
163 <param name="k" type="text" value="5"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
164 label="k" help="The maximum number of segments (clusters). The final number of segments may differ. Only a single value is allowed.">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
165 <expand macro="sanitizer_multiple_digits"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
166 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
167 <param name="method" type="select" display="radio"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
168 label="weights method" help="The method to use to calculate the spatial smoothing weights. The 'gaussian' method refers to spatially-aware (SA) weights, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) weights">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
169 <option value="gaussian" selected="True">gaussian</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
170 <option value="adaptive">adaptive</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
171 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
172 <param name="dist" type="select" display="radio"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
173 label="distance metric" help="The type of distance metric to use when calculating neighboring pixels based on r. The options are ‘radial’, ‘manhattan’, ‘minkowski’, and ‘chebyshev’ (the
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
174 default).">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
175 <option value="chebyshev" selected="True">chebyshev</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
176 <option value="manhattan">manhattan</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
177 <option value="radial">radial</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
178 <option value="minkowski">minkowski</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
179 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
180 <param name="annealing" type="boolean" label="annealing" help="Should simulated annealing be used during the optimization process to improve parameter estimates?" truevalue="TRUE" falsevalue="FALSE" />
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
181 <param name="init" type="select" display="radio"
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
182 label="init" help="Should the parameter estimates be initialized using k-means (’kmeans’) or Gaussian mixture model (’gmm’)?">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
183 <option value="kmeans" selected="True">kmeans</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
184 <option value="gmm">gmm</option>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
185 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
186 <param name="p0" type="float" value="0.05" label="p0" help="A regularization parameter applied to estimated posterior class probabilities to avoid singularities. Must be positive for successful gradient descent optimization.Changing this value (within reason) should have only minimal impact on values of parameter estimates, but may greatly affect the algorithm’s speed and stability." />
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
187 <param name="iter_max" type="integer" value="100" label="iter.max" help="The maximum number of EM-algorithm iterations." />
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
188 <param name="tol" type="float" value="0.05" label="tolerance" help="The tolerance convergence criterion for the EM-algorithm. Corresponds to the
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
189 change in log-likelihood."/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
190 <param name="setseed" type="integer" value="1" label="set seed" help="Use same value to reproduce previous results"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
191 <param name="output_estimates" type="boolean" label="Generate estimates results"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
192 <param name="output_probability" type="boolean" label="Generate probability and class results"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
193 <param name="output_plots" type="boolean" label="Generate plots results"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
194 <param name="output_rdata" type="boolean" label="Results as .RData output"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
195 </inputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
196 <outputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
197 <data format="tabular" name="dgmm_summary" label="${tool.name} on ${on_string}: summary"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
198 <data format="pdf" name="file_info" from_work_dir="single_ion_segmentation.pdf" label = "${tool.name} on ${on_string}: file_info"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
199 <data format="rdata" name="dgmm_rdata" label="${tool.name} on ${on_string}: dgmm.RData">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
200 <filter>output_rdata</filter>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
201 </data>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
202 <collection name="estimates_output" type="list" label="${tool.name} logs: ${on_string}: estimates">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
203 <filter>output_estimates</filter>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
204 <discover_datasets pattern="__designation_and_ext__" directory="DGMM_estimates" format="tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
205 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
206 <collection name="probability_output" type="list" label="${tool.name} logs: ${on_string}: probability">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
207 <filter>output_probability</filter>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
208 <discover_datasets pattern="__designation_and_ext__" directory="DGMM_probability" format="tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
209 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
210 <collection name="plots_output" type="list" label="${tool.name} logs: ${on_string}: plots">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
211 <filter>output_plots</filter>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
212 <discover_datasets pattern="__designation_and_ext__" directory="DGMM_plots" format="tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
213 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
214 </outputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
215 <tests>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
216 <test>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
217 <param name="infile" value="" ftype="imzml">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
218 <composite_data value="spatial_DGMM_input.imzML"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
219 <composite_data value="spatial_DGMM_input.ibd"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
220 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
221 <param name="r" value="1"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
222 <param name="k" value="6"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
223 <param name="method" value="adaptive"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
224 <param name="dist" value="radial"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
225 <param name="annealing" value="TRUE"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
226 <param name="output_estimates" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
227 <param name="output_probability" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
228 <output name="file_info" file="dgmm_test1.pdf" compare="sim_size"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
229 <output name="dgmm_summary" file="dgmm_summary1.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
230 <output_collection name="estimates_output" type="list" count="10">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
231 <element name="estimates_r1_k6_mz1135.93347167969" file="estimates_r1_k6_mz1135.93347167969.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
232 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
233 <output_collection name="probability_output" type="list" count="10">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
234 <element name="probability_r1_k6_mz1023.70806884766" file="probability_r1_k6_mz1023.70806884766.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
235 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
236 </test>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
237 <test>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
238 <param name="infile" value="" ftype="imzml">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
239 <composite_data value="spatial_DGMM_input.imzML"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
240 <composite_data value="spatial_DGMM_input.ibd"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
241 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
242 <conditional name="sample_groups">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
243 <param name="group" value="multiple_groups"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
244 <param name="annotation_file" value="DGMM_annotations.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
245 <param name="column_x" value="1"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
246 <param name="column_y" value="2"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
247 <param name="column_names" value="3"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
248 <param name="tabular_header" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
249 </conditional>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
250 <param name="r" value="2"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
251 <param name="k" value="10"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
252 <param name="annealing" value="TRUE"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
253 <param name="output_estimates" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
254 <param name="output_probability" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
255 <param name="output_plots" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
256 <param name="output_rdata" value="True"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
257 <output name="file_info" file="dgmm_test2.pdf" compare="sim_size"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
258 <output name="dgmm_summary" file="dgmm_summary2.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
259 <output name="dgmm_rdata" file="dgmm_test2.RData" compare="sim_size"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
260 <output_collection name="estimates_output" type="list" count="10">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
261 <element name="estimates_r2_k10_mz1200.46533203125" file="estimates_r2_k10_mz1200.46533203125.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
262 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
263 <output_collection name="probability_output" type="list" count="10">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
264 <element name="probability_r2_k10_mz1135.93347167969" file="probability_r2_k10_mz1135.93347167969.tabular"/>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
265 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
266 </test>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
267 </tests>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
268 <help>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
269 <![CDATA[
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
270
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
271 @CARDINAL_DESCRIPTION@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
272
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
273 -----
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
274
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
275 This tool fits spatially-aware Dirichlet Gaussian mixture models (DGMM) to each feature and each run in an mass spectrometry imaging
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
276 experiment. Each image is segmented and the means and variances of all Gaussian components are estimated. A linear filter with a spatial kernel is applied to the component probabilities to achieve
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
277 spatial smoothing. Simulated annealing is used in the EM-algorithm to avoid local optima and achieve more accurate parameter estimates.
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
278
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
279 @MSIDATA_INPUT_DESCRIPTION@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
280 - NA intensities are not allowed
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
281 - duplicated coordinates will be removed
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
282 - It is highly recommended to use a dataset that is reduced for the number of m/z features e.g. pre-processed, binned, filtered for m/z of interest in order to keep computational times reasonable. In addition, it is beneficial to run the tool first without generating all possible results data and upon inspection of the summary of the results decide on the best tool parameters and m/z features (which can be filtered in the MSI filtering tool).
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
283
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
284 @SPECTRA_TABULAR_INPUT_DESCRIPTION@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
285
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
286 **Tips**
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
287
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
288 - The input dataset should contain as few m/z features as possible to keep computational times reasonable. In addition, it is beneficial to run the tool first without generating all possible results data and upon inspection of the summary of the results decide on the best tool parameters and m/z features (which can be filtered in the MSI filtering tool).
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
289 - Pixels from distinct ovbservational units (e.g. sample, patient) should be assigned to a unique group via the annotation file and segmented separately for the validity of downstream statistical analysis.
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
290
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
291 **Output**
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
292
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
293 - Pdf with file info and an image of the clusters for each m/z feature
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
294 - Tabular file summarizing spatial DGMM performance for each feature
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
295 - (optional) Tabular files for each spatial DGMM run and feature with
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
296
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
297 - probabilities (The probability of class membership for each Gaussian component) and classes (The predicted Gaussian component)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
298 - estimates (A list giving the parameter estimates for the means and variances for each Gaussian component)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
299 - (optional) Visualization of features density plots
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
300 - (optional) .RData file which contains the segmentation results and can be used for further exploration in R using the Cardinal package
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
301
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
302 ]]>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
303 </help>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
304 <citations>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
305 <citation type="doi">10.1093/bioinformatics/btv146</citation>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
306 <citation type="doi">10.1093/bioinformatics/btz345</citation>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
307 </citations>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
308
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
309 </tool>