Skip to content

Commit 242de15

Browse files
authored
v1.12.2+galaxy0 (#37)
* Update to include grp peaklist * Add summary output for combineAnnotation xml * Update combineAnnotation.R with summaryOutput opt * Update to version 1.12.2 In preparation for bug fix * Update readme * Add check for null probmetab_resultPth * Hid probmetab option * Add param name for probmetabchoice * update tests
1 parent 514e4f1 commit 242de15

20 files changed

+171
-133
lines changed

README.rst

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

55

6-
Version v1.12.1+galaxy0
6+
Version v1.12.2+galaxy0
77
------
88

99
- msPurity
10-
- bioconductor-mspurity v1.12.1
10+
- bioconductor-mspurity v1.12.2
1111
- Galaxy tools
1212
- v0
1313

@@ -55,6 +55,14 @@ Authors, contributors & contacts
5555

5656
Changes
5757
-------------------------
58+
v1.12.2-galaxy0
59+
- Update to version v1.12.2 of `msPurity <https://github.com/computational-metabolomics/msPurity/pull/71>`_
60+
- Optional summary output for combineAnnotations (for very large output)
61+
- Extra column added to flagRemove output
62+
- Hide probmetab input
63+
- Make dimsPredictPuritySingle more compatible with "simple workflow inputs"
64+
65+
5866
v1.12.1-galaxy0
5967
- Update to version v1.12.1 of `msPurity <https://github.com/computational-metabolomics/msPurity/pull/71>`_
6068

tools/msPurity/combineAnnotations.R

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ option_list <- list(
2020
make_option("--probmetab_weight", type="numeric"),
2121
make_option("--ms1_lookup_weight", type="numeric"),
2222
make_option("--biosim_weight", type="numeric"),
23-
23+
24+
make_option("--summaryOutput", action="store_true"),
25+
2426
make_option("--create_new_database", action="store_true"),
2527
make_option("--outdir", type="character", default="."),
2628

@@ -56,11 +58,21 @@ weights <-list('sm'=opt$sm_weight,
5658
'biosim'=opt$biosim_weight
5759
)
5860
print(weights)
59-
if (round(!sum(unlist(weights),0)==1)){
6061

62+
if (is.null(opt$probmetab_resultPth)){
63+
opt$probmetab_resultPth = NA
64+
}
65+
66+
if (round(!sum(unlist(weights),0)==1)){
6167
stop(paste0('The weights should sum to 1 not ', sum(unlist(weights))))
6268
}
6369

70+
if (is.null(opt$summaryOutput)){
71+
summaryOutput = FALSE
72+
}else{
73+
summaryOutput = TRUE
74+
}
75+
6476
if (opt$compoundDbType=='local_config'){
6577
# load in compound config
6678
# Soure local function taken from workflow4metabolomics
@@ -76,8 +88,6 @@ if (opt$compoundDbType=='local_config'){
7688
compoundDbPass = NA
7789
}
7890

79-
80-
8191
summary_output <- msPurity::combineAnnotations(
8292
sm_resultPth = sm_resultPth,
8393
compoundDbPth = compoundDbPth,
@@ -94,7 +104,12 @@ summary_output <- msPurity::combineAnnotations(
94104
compoundDbPort = compoundDbPort,
95105
compoundDbUser = compoundDbUser,
96106
compoundDbPass = compoundDbPass,
97-
weights = weights)
107+
weights = weights,
108+
summaryOutput = summaryOutput)
109+
if (summaryOutput){
110+
write.table(summary_output, file.path(opt$outdir, 'combined_annotations.tsv'), sep = '\t', row.names = FALSE)
111+
}
112+
98113

99114
write.table(summary_output, file.path(opt$outdir, 'combined_annotations.tsv'), sep = '\t', row.names = FALSE)
100115

tools/msPurity/combineAnnotations.xml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
--sm_resultPth='$sm_resultPth'
1010
--metfrag_resultPth='$metfrag_resultPth'
1111
--sirius_csi_resultPth='$sirius_csi_resultPth'
12-
--probmetab_resultPth='$probmetab_resultPth'
12+
13+
#if $probmetabCond.probmetabChoice == 'probmetab'
14+
--probmetab_resultPth='$probmetabCond.probmetab_resultPth'
15+
#end if
16+
1317
--ms1_lookup_resultPth='$ms1_lookup_resultPth'
1418
1519
#if $ms1_lookup_checkAdducts:
@@ -25,8 +29,8 @@
2529
--probmetab_weight=$probmetab_weight
2630
--ms1_lookup_weight=$ms1_lookup_weight
2731
--biosim_weight=$biosim_weight
28-
29-
32+
33+
3034
#if $create_new_database:
3135
--create_new_database
3236
#end if
@@ -37,6 +41,10 @@
3741
--compoundDbPth='$compoundDbTypeCond.compoundDbPth'
3842
#end if
3943
44+
#if $summaryOutput:
45+
--summaryOutput
46+
#end if
47+
4048
4149
]]></command>
4250
<inputs>
@@ -48,8 +56,19 @@
4856
help="The result of the MetFrag analysis (requires a column indicating the XCMS group ID)"/>
4957
<param argument="--sirius_csi_resultPth" type="data" label="Sirius CSI:FingerID result" format="tsv,tabular" optional="true"
5058
help="The result of the CSI:FingerID analysis (requires a column indicating the XCMS group ID)"/>
51-
<param argument="--probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular" optional="true"
52-
help="The result of the Probmetab analysis (requires a column indicating the XCMS group ID)"/>
59+
<conditional name="probmetabCond">
60+
<param name="probmetabChoice" type="select" label="Use probmetab data" help="The result of the Probmetab analysis" >
61+
<option value="no_probmetab" selected="true" >Do not include probmetab results</option>
62+
<option value="probmetab" >Include probmetab results</option>
63+
</param>
64+
<when value="probmetab">
65+
<param argument="--probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular" optional="true"
66+
help="The result of the Probmetab analysis (requires a column indicating the XCMS group ID). Alternatively any ms1 annotation tool can be used
67+
instead of probmetab"/>
68+
</when>
69+
<when value="no_probmetab">
70+
</when>
71+
</conditional>
5372
<param argument="--ms1_lookup_resultPth" type="data" label="MS1 Lookup result" format="tsv,tabular" optional="true"
5473
help="The result of the a generic MS1 lookup annotation software (e.g. BEAMS can be used)"/>
5574
<param argument="--ms1_lookup_keepAdducts" type="text" label="MS1 lookup adducts to keep" optional="true"
@@ -67,6 +86,7 @@
6786
<param argument="--probmetab_weight" type="float" min="0.0" max="1.0" value="0.0" label="Probmetab weight" help="all weights need to sum to 1" />
6887
<param argument="--ms1_lookup_weight" type="float" min="0.0" max="1.0" value="0.05" label="MS1 Lookup weight" help="all weights need to sum to 1" />
6988
<param argument="--biosim_weight" type="float" min="0.0" max="1.0" value="0.25" label="Biological similarity weight" help="all weights need to sum to 1" />
89+
<param argument="--summaryOutput" type="boolean" checked="true" label="Create summary output" help="Create tab separated file of all annotations and features"/>
7090
<param argument="--create_new_database" type="boolean" checked="true" label="Create a new database for the results?"
7191
help="A copy will be made of the input SQLite spectral matching database and the results will be added to this copy.
7292
When False, the input SQLite database will be updated the results. Use False
@@ -93,8 +113,8 @@
93113
<test>
94114
<param name="sm_resultPth" value="combinedAnnotation_input_spectralMatching.sqlite" />
95115
<param name="metfrag_resultPth" value="combineAnnotations_input_metfrag.tsv" />
96-
<param name="sirius_csi_resultPth" value="combineAnnotations_input_sirus_csifingerid.tsv" />
97-
<param name="probmetab_resultPth" value="combineAnnotations_input_probmetab.tsv" />
116+
<param name="sirius_csi_resultPth" value="combineAnnotations_input_sirus_csifingerid.tsv" />
117+
<param name="compoundDbTypeCond|compoundDbPth" value="metab_compound_subset.sqlite" />
98118
<param name="beams_resultPth" value="combineAnnotations_input_beams.tsv" />
99119
<param name="compoundDbTypeCond|compoundDbPth" value="metab_compound_subset.sqlite" />
100120
<output name="combined_annotations_tsv" file="combineAnnotations_combined_annotations.tsv" ftype="tsv" />

tools/msPurity/createDatabase.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ if (opt$xcms_camera_option=='xcms'){
115115

116116

117117

118-
if(is.null(opt$grp_peaklist)){
118+
if(is.null(opt$grpPeaklist)){
119119
grpPeaklist = NA
120120
}else{
121-
grpPeaklist = opt$grp_peaklist
121+
grpPeaklist = opt$grpPeaklist
122122
}
123123

124124

tools/msPurity/macros.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<macros>
3-
<token name="@TOOL_VERSION@">1.12.1</token>
3+
<token name="@TOOL_VERSION@">1.12.2</token>
44
<token name="@GALAXY_TOOL_VERSION@">0</token>
55

66
<xml name="requirements">
-2 Bytes
Binary file not shown.
-2 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)