annotate spatial_DGMM.xml @ 2:fd6c9bc77405 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
author galaxyp
date Thu, 04 Jul 2024 13:28:45 +0000
parents 75b43378fb02
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
1 <tool id="cardinal_single_ion_segmentation" name="MSI single ion segmentation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
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>
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
6 <expand macro="requirements"/>
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
7 <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
8 <![CDATA[
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
9
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
10 @INPUT_LINKING@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
11 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
12 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
13
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
14 ]]>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
15 </command>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
16 <configfiles>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
17 <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
18
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
19 ################################# 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
20
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
21 library(Cardinal)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
22 library(gridExtra)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
23
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
24 @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
25
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
26 #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
27 ## 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
28 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
29 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
30 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
31 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
32
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
33 ## 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
34 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
35 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
36 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
37 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
38 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
39 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
40 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
41
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
42
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
43 @DATA_PROPERTIES_INRAM@
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
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
46 ## remove duplicated coordinates
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
47 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
48
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
49
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
50 ######################################## PDF ###################################
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 ################################################################################
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 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
56 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
57
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
58 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
59
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
60 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
61
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
62 if (npeaks > 0)
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
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
65 ## 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
66 set.seed($setseed)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
67
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
68 ## single ion segmentation
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
69 dgmm <- spatialDGMM(msidata,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
70 r = c($r),
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
71 k = c($k),
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
72 #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
73 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
74 #else
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
75 groups = msidata\$annotation,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
76 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
77 method = "$method",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
78 dist = "$dist",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
79 annealing = $annealing,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
80 init = "$init",
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
81 p0 = $p0,
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
82 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
83 tol = $tol)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
84
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
85 ## Summary results table
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
86 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
87 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
88 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
89 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
90 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
91 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
92 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
93
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
94 ## Results images
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
95 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
96 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
97 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
98
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
99 ## optional outputs
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
100 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
101
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
102 #if $output_probability:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
103 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
104 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
105 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
106 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
107 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
108 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
109 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
110 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
111
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
112 #if $output_estimates:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
113 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
114 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
115 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
116 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
117 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
118 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
119 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
120
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
121 #if $output_plots:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
122 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
123 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
124 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
125 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
126 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
127 dev.off()
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
128 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
129 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
130
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
131 ## 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
132 #if $output_rdata:
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
133 ## save as (.RData)
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
134 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
135 #end if
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
136
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
137 }else{
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
138 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
139 }
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
140
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
141 ]]></configfile>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
142 </configfiles>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
143 <inputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
144 <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
145 <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
146 <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
147 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
148 <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
149 <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
150 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
151 <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
152 <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
153 <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
154 </when>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
155 </conditional>
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
156 <param name="r" type="text" value="2"
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
157 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
158 <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
159 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
160 <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
161 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
162 <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
163 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
164 <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
165 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
166 <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
167 <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
168 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
169 <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
170 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
171 default).">
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
172 <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
173 <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
174 <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
175 <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
176 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
177 <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
178 <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
179 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
180 <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
181 <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
182 </param>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
183 <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
184 <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
185 <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
186 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
187 <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
188 <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
189 <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
190 <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
191 <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
192 </inputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
193 <outputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
194 <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
195 <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
196 <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
197 <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
198 </data>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
199 <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
200 <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
201 <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
202 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
203 <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
204 <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
205 <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
206 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
207 <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
208 <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
209 <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
210 </collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
211 </outputs>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
212 <tests>
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
213 <test expect_num_outputs="4">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
214 <param name="infile" value="" ftype="imzml">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
215 <composite_data value="spatial_DGMM_input.imzML"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
216 <composite_data value="spatial_DGMM_input.ibd"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
217 </param>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
218 <param name="r" value="1"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
219 <param name="k" value="6"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
220 <param name="method" value="adaptive"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
221 <param name="dist" value="radial"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
222 <param name="annealing" value="TRUE"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
223 <param name="setseed" value="7353"/>
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
224 <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
225 <param name="output_probability" value="True"/>
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
226 <output name="file_info" file="dgmm_test1.pdf" compare="sim_size"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
227 <output name="dgmm_summary" file="dgmm_summary1.tabular"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
228 <output_collection name="estimates_output" type="list" count="10">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
229 <element name="estimates_r1_k6_mz1135.93347167969">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
230 <assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
231 <has_text text="files_"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
232 <has_text text="3"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
233 <has_text_matching expression="0\.\d+"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
234 </assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
235 </element>
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
236 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
237 <output_collection name="probability_output" type="list" count="10">
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
238 <element name="probability_r1_k6_mz1023.70806884766">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
239 <assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
240 <has_text text="xy_16_1"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
241 <has_text text="3"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
242 <has_text_matching expression="0\.\d+"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
243 </assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
244 </element>
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
245 </output_collection>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
246 </test>
2
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
247 <test expect_num_outputs="6">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
248 <param name="infile" value="" ftype="imzml">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
249 <composite_data value="spatial_DGMM_input.imzML"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
250 <composite_data value="spatial_DGMM_input.ibd"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
251 </param>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
252 <conditional name="sample_groups">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
253 <param name="group" value="multiple_groups"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
254 <param name="annotation_file" value="DGMM_annotations.tabular"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
255 <param name="column_x" value="1"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
256 <param name="column_y" value="2"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
257 <param name="column_names" value="3"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
258 <param name="tabular_header" value="True"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
259 </conditional>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
260 <param name="r" value="2"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
261 <param name="k" value="10"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
262 <param name="annealing" value="TRUE"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
263 <param name="setseed" value="7353"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
264 <param name="output_estimates" value="True"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
265 <param name="output_probability" value="True"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
266 <param name="output_plots" value="True"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
267 <param name="output_rdata" value="True"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
268 <output name="file_info" file="dgmm_test2.pdf" compare="sim_size"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
269 <output name="dgmm_summary" file="dgmm_summary2.tabular"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
270 <output name="dgmm_rdata" file="dgmm_test2.RData" compare="sim_size"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
271 <output_collection name="estimates_output" type="list" count="10">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
272 <element name="estimates_r2_k10_mz1200.46533203125">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
273 <assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
274 <has_text text="circle"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
275 <has_text text="3"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
276 <has_text_matching expression="0\.\d+"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
277 </assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
278 </element>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
279 </output_collection>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
280 <output_collection name="probability_output" type="list" count="10">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
281 <element name="probability_r2_k10_mz1135.93347167969">
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
282 <assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
283 <has_text text="xy_9_1"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
284 <has_text text="3"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
285 <has_text_matching expression="0\.\d+"/>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
286 </assert_contents>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
287 </element>
fd6c9bc77405 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
galaxyp
parents: 0
diff changeset
288 </output_collection>
0
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
289 </test>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
290 </tests>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
291 <help>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
292 <![CDATA[
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
293
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
294 @CARDINAL_DESCRIPTION@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
295
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
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
298 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
299 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
300 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
301
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
302 @MSIDATA_INPUT_DESCRIPTION@
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
303 - 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
304 - 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
305 - 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
306
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
307 @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
308
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
309 **Tips**
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
310
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
311 - 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
312 - 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
313
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
314 **Output**
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
315
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
316 - 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
317 - 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
318 - (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
319
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
320 - 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
321 - 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
322 - (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
323 - (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
324
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
325 ]]>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
326 </help>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
327 <citations>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
328 <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
329 <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
330 </citations>
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
331
75b43378fb02 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit badc51fcd74ba0c14cd1ae64d5f524291fa11441"
galaxyp
parents:
diff changeset
332 </tool>