Skip to content

Commit 20d432c

Browse files
authored
v1.12.0+galaxy1 (#33)
* Default offsets values able mzXML files We can run mzXML files with default values here for offsets... Can be good to remove them, but it may be produce an error after that should be managed ! * Bug fix for purityA offsets * Add missing bracket * Close bracket * flagRemove exit updated, update shed yml, update readme * Make flagRemove.R rdata object backward compatible
1 parent cb903cd commit 20d432c

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

README.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ msPurity for Galaxy
33
|Build Status (Travis)| |Git| |Bioconda| |License|
44

55

6-
Version v1.12.0+galaxy0
6+
Version v1.12.0+galaxy1
77
------
88

99
- msPurity
1010
- bioconductor-mspurity v1.12.0
1111
- Galaxy tools
12-
- v0
12+
- v1
1313

1414
About
1515
------
@@ -55,6 +55,12 @@ Authors, contributors & contacts
5555

5656
Changes
5757
-------------------------
58+
v1.12.0-galaxy1
59+
- Bug fix (offsets were not being automatically selected for purityA) thanks jsaintvanne
60+
- Exit script without error for flagRemove
61+
- Username updated in Toolshed yaml
62+
63+
5864
v1.12.0-galaxy0
5965
- Updates for Bioconductor stable msPurity v1.12.0 release
6066
- Additional columns added for spectral matching (for msnpy use case)

tools/msPurity/.shed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
owner: tomnl
1+
owner: computational-metabolomics
22
remote_repository_url: https://github.com/computational-metabolomics/mspurity-galaxy
33
homepage_url: https://github.com/computational-metabolomics/mspurity-galaxy
44
categories: ["Metabolomics"]

tools/msPurity/flagRemove.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ if (is.null(opt$samplelist)){
138138
chosen_blank <- samplelist_blank[samplelist_blank %in% xset@phenoData$class]
139139
if (length(chosen_blank)>1){
140140
print('ERROR: only 1 blank is currently allowed to be used with this tool')
141-
exit()
141+
quit()
142142
}
143143
blank_class <- as.character(chosen_blank)
144144
print(blank_class)
@@ -171,7 +171,7 @@ if (is.null(opt$multilist)){
171171
grp_peaklist <- ffrm_out[[2]]
172172
removed_peaks <- ffrm_out[[3]]
173173

174-
save.image(file=file.path(opt$out_dir, 'xset_filtered.RData'))
174+
save.image(file=file.path(opt$out_dir, 'xset_filtered.RData'), version=2)
175175

176176
# grpid needed for mspurity ID needed for deconrank... (will clean up at some up)
177177
peak_pth <- file.path(opt$out_dir, 'peaklist_filtered.tsv')

tools/msPurity/macros.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<macros>
33
<token name="@TOOL_VERSION@">1.12.0</token>
4-
<token name="@GALAXY_TOOL_VERSION@">0</token>
4+
<token name="@GALAXY_TOOL_VERSION@">1</token>
55

66
<xml name="requirements">
77
<requirements>

tools/msPurity/purityA.R

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ option_list <- list(
66
make_option(c("-o", "--out_dir"), type="character"),
77
make_option("--mzML_files", type="character"),
88
make_option("--galaxy_names", type="character"),
9-
make_option("--minOffset", default=0.5),
10-
make_option("--maxOffset", default=0.5),
11-
make_option("--ilim", default=0.05),
9+
make_option("--minOffset", type="numeric"),
10+
make_option("--maxOffset", type="numeric"),
11+
make_option("--ilim", type="numeric"),
1212
make_option("--iwNorm", default="none", type="character"),
1313
make_option("--exclude_isotopes", action="store_true"),
1414
make_option("--isotope_matrix", type="character"),
@@ -22,18 +22,26 @@ option_list <- list(
2222
opt <- parse_args(OptionParser(option_list=option_list))
2323
print(opt)
2424

25-
minOffset = as.numeric(opt$minOffset)
26-
maxOffset = as.numeric(opt$maxOffset)
2725

2826
if (opt$iwNorm=='none'){
2927
iwNorm = FALSE
3028
iwNormFun = NULL
3129
}else if (opt$iwNorm=='gauss'){
3230
iwNorm = TRUE
33-
iwNormFun = msPurity::iwNormGauss(minOff=-minOffset, maxOff=maxOffset)
31+
if (is.null(opt$minOffset) || is.null(opt$maxOffset)){
32+
print('User has to define offsets if using Gaussian normalisation')
33+
}else{
34+
iwNormFun = msPurity::iwNormGauss(minOff=-as.numeric(opt$minOffset),
35+
maxOff=as.numeric(opt$maxOffset))
36+
}
3437
}else if (opt$iwNorm=='rcosine'){
3538
iwNorm = TRUE
36-
iwNormFun = msPurity::iwNormRcosine(minOff=-minOffset, maxOff=maxOffset)
39+
if (is.null(opt$minOffset) || is.null(opt$maxOffset)){
40+
print('User has to define offsets if using R-cosine normalisation')
41+
}else{
42+
iwNormFun = msPurity::iwNormRcosine(minOff=-as.numeric(opt$minOffset),
43+
maxOff=as.numeric(opt$maxOffset))
44+
}
3745
}else if (opt$iwNorm=='QE5'){
3846
iwNorm = TRUE
3947
iwNormFun = msPurity::iwNormQE.5()

0 commit comments

Comments
 (0)