Skip to content

Commit bbbcc75

Browse files
authored
V1.11.4galaxy0.2.5 (#25)
* Updates based on v1.11.4 of msPurity * updating tests * update of rdata objects * fix average param selection, clarify ppmInter * update average xml selection * update based on msPurity backend changes * Update versions in readme * Version fix * Update readme * Update version in readme (again)
1 parent 9dc9d58 commit bbbcc75

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2151
-1916
lines changed

README.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Warning
66
------
77
Proceed with caution these tools are in active development so tools may change! Stable release to Galaxy toolshed coming soon. Currently these tools will only work when the 'tomnl' conda channel is being used with Galaxy.
88

9-
Version v1.11.3-galaxy0.2.5
9+
Version v1.11.4-galaxy0.2.5
1010
------
11-
NOTE: bioconductor-mspurity v1.11.3 only available on 'tomnl' conda channel - to be updated to bioconda soon.
11+
NOTE: bioconductor-mspurity v1.11.4 only available on 'tomnl' conda channel - to be updated to bioconda soon.
1212

1313
- msPurity
14-
- bioconductor-mspurity v1.11.3
15-
- Galaxy tools
14+
- bioconductor-mspurity v1.11.4
15+
- Galaxy tools
1616
- v0.2.5
1717

1818
About
@@ -58,7 +58,14 @@ Authors, contributors & contacts
5858

5959
Changes
6060
-------------------------
61+
v1.11.4-galaxy0.2.5:
62+
- Added ppmInterp parameter to purityA
63+
- Complete update of combineAnnotation tool to use either sqlite, postgres or mysql database
64+
- Update of spectralMatching tool to use either sqlite, postgres or mysql database
65+
- Added include_adducts parameter to createMSP
66+
6167
v1.11.3-galaxy0.2.5:
68+
- Note: This was not pushed to test toolshed
6269
- Clean up of the versioning to be in line with IUC
6370
- All tools updated with the same versioning
6471
- Bump to msPurity v1.11.3 to so EIC is calculated for all features

conda_testing/meta.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version="1.11.3" %}
1+
{% set version="1.11.4" %}
22
{% set name="msPurity" %}
33
{% set bioc="3.8" %}
44

@@ -7,7 +7,7 @@ package:
77
version: '{{ version }}'
88

99
source:
10-
url: https://github.com/computational-metabolomics/msPurity/archive/ea484f8d0f3dc892cc8dd1d545af66e150223a70.zip
10+
url: https://github.com/computational-metabolomics/msPurity/archive/8db971368dc24b53d4acf4e6a282e99f4e5f1bfe.zip
1111

1212

1313
build:
@@ -39,7 +39,8 @@ requirements:
3939
- r-rsqlite
4040
- r-stringr
4141
- r-uuid
42-
- r-jsonlite
42+
- r-rpostgres
43+
- r-rmysql
4344

4445

4546
run:
@@ -64,7 +65,9 @@ requirements:
6465
- r-rsqlite
6566
- r-stringr
6667
- r-uuid
67-
- r-jsonlite
68+
- r-rpostgres
69+
- r-rmysql
70+
6871

6972
build:
7073
- {{ compiler('c') }}

tools/msPurity/averageFragSpectra.xml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,14 @@
3333
<param name="pa" type="data" label="purityA object" format="rdata"
3434
help="purityA object saved as 'pa' in a RData file (output from frag4feature tool)"/>
3535

36-
<conditional name="av">
37-
<param name="level" type="select" label="Average and filter fragmentation spectra for each XCMS feature" help="">
38-
<option value="intra" selected="true">within a MS data file</option>
39-
<option value="inter">accross MS data files</option>
40-
<option value="all">within and accross MS data files (ignoring intra and inter relationships)</option>
41-
</param>
42-
<when value="intra">
43-
<param name="snr" type="float" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
44-
<param name="ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
45-
</when>
46-
<when value="inter">
47-
<param name="snr" type="float" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
48-
<param name="ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
49-
</when>
50-
<when value="all">
51-
<param name="snr" type="float" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
52-
<param name="ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
53-
</when>
54-
</conditional>
5536

5637
<param name="av_level" type="select" label="Average and filter fragmentation spectra for each XCMS feature" help="">
5738
<option value="intra" selected="true">within a MS data file</option>
58-
<option value="inter">accross MS data files</option>
59-
<option value="all">within and accross MS data files (ignoring intra and inter relationships)</option>
39+
<option value="inter">across MS data files</option>
40+
<option value="all">within and across MS data files (ignoring intra and inter relationships)</option>
6041
</param>
42+
43+
6144
<param name="snr" type="float" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
6245
<param name="ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
6346
<param name="minfrac" type="float" min="0.0" max="1.0" value="0.5" label="Minimum fraction (i.e. percentage) of (averaged) scans a fragment peak has to be present in." help="" />

tools/msPurity/combineAnnotations.R

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@ option_list <- list(
88
make_option(c("-m","--metfrag_resultPth"),type="character"),
99
make_option(c("-c","--sirius_csi_resultPth"),type="character"),
1010
make_option(c("-p","--probmetab_resultPth"),type="character"),
11+
make_option(c("-l","--ms1_lookup_resultPth"),type="character"),
12+
13+
make_option("--ms1_lookup_checkAdducts", action="store_true"),
14+
make_option("--ms1_lookup_keepAdducts", type="character", default=NA),
15+
make_option("--ms1_lookup_dbSource", type="character", default="hmdb"),
16+
1117
make_option(c("-sw","--sm_weight"),type="numeric"),
1218
make_option(c("-mw","--metfrag_weight"),type="numeric"),
1319
make_option(c("-cw","--sirius_csi_weight"),type="numeric"),
1420
make_option(c("-pw","--probmetab_weight"),type="numeric"),
21+
make_option(c("-lw","--ms1_lookup_weight"),type="numeric"),
22+
make_option(c("-bw","--biosim_weight"),type="numeric"),
23+
1524
make_option("--create_new_database", action="store_true"),
1625
make_option(c("-o","--outdir"),type="character", default="."),
17-
make_option("--eic", action="store_true")
26+
27+
make_option("--compoundDbType", type="character", default="sqlite"),
28+
make_option("--compoundDbPth", type="character", default=NA),
29+
make_option("--compoundDbHost", type="character", default=NA)
1830
)
1931
opt <- parse_args(OptionParser(option_list=option_list))
2032

@@ -27,23 +39,61 @@ if (!is.null(opt$create_new_database)){
2739
sm_resultPth <- opt$sm_resultPth
2840
}
2941

42+
if (is.null(opt$ms1_lookup_checkAdducts)){
43+
opt$ms1_lookup_checkAdducts <- FALSE
44+
}
45+
if (!is.null(opt$ms1_lookup_keepAdducts)){
46+
opt$ms1_lookup_keepAdducts <- gsub("__ob__", "[", opt$ms1_lookup_keepAdducts)
47+
opt$ms1_lookup_keepAdducts <- gsub("__cb__", "]", opt$ms1_lookup_keepAdducts)
48+
ms1_lookup_keepAdducts <- strsplit(opt$ms1_lookup_keepAdducts, ",")[[1]]
49+
}
3050

3151
weights <-list('sm'=opt$sm_weight,
3252
'metfrag'=opt$metfrag_weight,
3353
'sirius_csifingerid'= opt$sirius_csi_weight,
34-
'probmetab'=opt$probmetab_weight
54+
'probmetab'=opt$probmetab_weight,
55+
'ms1_lookup'=opt$ms1_lookup_weight,
56+
'biosim'=opt$biosim_weight
3557
)
36-
58+
print(weights)
3759
if (round(!sum(unlist(weights),0)==1)){
3860

3961
stop(paste0('The weights should sum to 1 not ', sum(unlist(weights))))
4062
}
4163

42-
summary_output <- msPurity::combineAnnotations(sm_resultPth,
43-
opt$metfrag_resultPth,
44-
opt$sirius_csi_resultPth,
45-
opt$probmetab_resultPth,
46-
weights = weights)
64+
if (opt$compoundDbType=='local_config'){
65+
# load in compound config
66+
# Soure local function taken from workflow4metabolomics
67+
source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
68+
source_local("dbconfig.R")
69+
}else{
70+
compoundDbType = opt$compoundDbType
71+
compoundDbName = NA
72+
compoundDbHost = NA
73+
compoundDbPort = NA
74+
compoundDbUser = NA
75+
compoundDbPass = NA
76+
}
77+
78+
79+
80+
summary_output <- msPurity::combineAnnotations(
81+
sm_resultPth = sm_resultPth,
82+
compoundDbPth = opt$compoundDbPth,
83+
metfrag_resultPth = opt$metfrag_resultPth,
84+
sirius_csi_resultPth = opt$sirius_csi_resultPth,
85+
probmetab_resultPth = opt$probmetab_resultPth,
86+
ms1_lookup_resultPth = opt$ms1_lookup_resultPth,
87+
ms1_lookup_keepAdducts = ms1_lookup_keepAdducts,
88+
ms1_lookup_checkAdducts = opt$ms1_lookup_checkAdducts,
89+
90+
compoundDbType = compoundDbType,
91+
compoundDbName = compoundDbName,
92+
compoundDbHost = compoundDbHost,
93+
compoundDbPort = compoundDbPort,
94+
compoundDbUser = compoundDbUser,
95+
compoundDbPass = compoundDbPass,
96+
weights = weights)
4797

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

tools/msPurity/combineAnnotations.xml

Lines changed: 66 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,49 +19,97 @@
1919
--metfrag_resultPth="$metfrag_resultPth"
2020
--sirius_csi_resultPth="$sirius_csi_resultPth"
2121
--probmetab_resultPth="$probmetab_resultPth"
22+
23+
--ms1_lookup_resultPth=$ms1_lookup_resultPth
24+
25+
#if $ms1_lookup_checkAdducts:
26+
--ms1_lookup_checkAdducts
27+
#end if
28+
29+
--ms1_lookup_keepAdducts="$ms1_lookup_keepAdducts"
30+
--ms1_lookup_dbSource=$ms1_lookup_dbSource
31+
2232
--sm_weight=$sm_weight
2333
--metfrag_weight=$metfrag_weight
2434
--sirius_csi_weight=$sirius_csi_weight
2535
--probmetab_weight=$probmetab_weight
36+
--ms1_lookup_weight=$ms1_lookup_weight
37+
--biosim_weight=$biosim_weight
38+
39+
2640
#if $create_new_database:
2741
--create_new_database
2842
#end if
2943
44+
--compoundDbType=$compoundDbTypeCond.compoundDbType
45+
46+
#if $compoundDbTypeCond.compoundDbType== 'sqlite'
47+
--compoundDbPth=$compoundDbTypeCond.compoundDbPth
48+
#end if
49+
3050
3151
]]></command>
3252
<inputs>
33-
<param name="sm_resultPth" type="data" label="Spectral matching result" format="sqlite"
53+
54+
55+
<param name="sm_resultPth" type="data" label="Spectral matching result" format="sqlite"
3456
help="The SQLite database generated from msPurity.spectralMatching"/>
35-
<param name="metfrag_resultPth" type="data" label="Metfrag result" format="tsv,tabular" optional="true"
36-
help="The result of the MetFrag analysis (requires a column indicating the XCMS group ID and fragmentation spectra ID)"/>
37-
<param name="sirius_csi_resultPth" type="data" label="Sirius CSI:FingerID result" format="tsv,tabular" optional="true"
38-
help="The result of the CSI:FingerID analysis (requires a column indicating the XCMS group ID and fragmentation spectra ID)"/>
39-
<param name="probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular" optional="true"
40-
help="The result of the Probmetab analysis (requires a column indicating the XCMS group ID and fragmentation spectra ID)"/>
41-
<param name="sm_weight" type="float" min="0.0" max="1.0" value="0.4" label="Spectral matching weight" help="all weights need to sum to 1" />
42-
<param name="metfrag_weight" type="float" min="0.0" max="1.0" value="0.25" label="Metfrag weight" help="all weights need to sum to 1" />
43-
<param name="sirius_csi_weight" type="float" min="0.0" max="1.0" value="0.25" label="Sirius CSI:FingerID weight" help="all weights need to sum to 1" />
44-
<param name="probmetab_weight" type="float" min="0.0" max="1.0" value="0.1" label="Probmetab weight" help="all weights need to sum to 1" />
45-
<param name="create_new_database" type="boolean" checked="true" label="Create a new database for the results?"
57+
<param name="metfrag_resultPth" type="data" label="Metfrag result" format="tsv,tabular" optional="true"
58+
help="The result of the MetFrag analysis (requires a column indicating the XCMS group ID)"/>
59+
<param name="sirius_csi_resultPth" type="data" label="Sirius CSI:FingerID result" format="tsv,tabular" optional="true"
60+
help="The result of the CSI:FingerID analysis (requires a column indicating the XCMS group ID)"/>
61+
<param name="probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular" optional="true"
62+
help="The result of the Probmetab analysis (requires a column indicating the XCMS group ID)"/>
63+
<param name="ms1_lookup_resultPth" type="data" label="MS1 Lookup result" format="tsv,tabular" optional="true"
64+
help="The result of the a generic MS1 lookup annotation software (e.g. BEAMS can be used)"/>
65+
<param name="ms1_lookup_keepAdducts" type="text" label="MS1 lookup adducts to keep" optional="true"
66+
help="Provide a list of adducts that should be used from the MS1 lookup (e.g. [M+H]+, [M+Na]+"/>
67+
<param name="ms1_lookup_checkAdducts" type="boolean" label="MS1 lookup check adducts to CAMERA"
68+
help="Check if adducts match to those found in CAMERA (requires the database to have been created with CAMERA object"/>
69+
<param name="ms1_lookup_dbSource" type="select" label="MS1 lookup database source" help="Which database was used for the MS1 lookup" >
70+
<option value="hmdb" selected="true">hmdb</option>
71+
<option value="pubchem">pubchem</option>
72+
<option value="kegg">kegg</option>
73+
</param>
74+
<param name="sm_weight" type="float" min="0.0" max="1.0" value="0.3" label="Spectral matching weight" help="all weights need to sum to 1" />
75+
<param name="metfrag_weight" type="float" min="0.0" max="1.0" value="0.2" label="Metfrag weight" help="all weights need to sum to 1" />
76+
<param name="sirius_csi_weight" type="float" min="0.0" max="1.0" value="0.2" label="Sirius CSI:FingerID weight" help="all weights need to sum to 1" />
77+
<param name="probmetab_weight" type="float" min="0.0" max="1.0" value="0.0" label="Probmetab weight" help="all weights need to sum to 1" />
78+
<param name="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" />
79+
<param name="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" />
80+
<param name="create_new_database" type="boolean" checked="true" label="Create a new database for the results?"
4681
help="A copy will be made of the input SQLite spectral matching database and the results will be added to this copy.
4782
When False, the input SQLite database will be updated the results. Use False
4883
if you want to reduce storage space being used."/>
84+
85+
<conditional name="compoundDbTypeCond">
86+
<param name="compoundDbType" type="select" label="compoundDbType" help="Database type for compound database to be used full database available on request - contact [email protected])." >
87+
<option value="sqlite" selected="true">SQLite</option>
88+
<option value="local_config" >Locally configured MySQL, Postgres or SQLite database</option>
89+
</param>
90+
<when value="sqlite">
91+
<param type="data" name="compoundDbPth" label="SQLite compound database pth" format="sqlite" help=""/>
92+
</when>
93+
<when value="local_config">
94+
</when>
95+
<when value="msPurityData">
96+
</when>
97+
</conditional>
98+
4999
</inputs>
50100
<outputs>
51101
<data name="combined_annotations_sqlite" from_work_dir="combined_annotations.sqlite" format="sqlite" label="${tool.name} on ${on_string}: sqlite" />
52102
<data name="combined_annotations_tsv" from_work_dir="combined_annotations.tsv" format="tsv" label="${tool.name} on ${on_string}: tsv" />
53103
</outputs>
54104
<tests>
55105
<test>
56-
<param name="sm_resultPth" value="spectralMatching_db_with_spectral_matching.sqlite" />
106+
<param name="sm_resultPth" value="combinedAnnotation_input_spectralMatching.sqlite" />
57107
<param name="metfrag_resultPth" value="combineAnnotations_input_metfrag.tsv" />
58108
<param name="sirius_csi_resultPth" value="combineAnnotations_input_sirus_csifingerid.tsv" />
59109
<param name="probmetab_resultPth" value="combineAnnotations_input_probmetab.tsv" />
60-
<output name="combined_annotations_tsv" file="combineAnnotations_combined_annotations.tsv" ftype="tsv" >
61-
<assert_contents>
62-
<has_n_columns n="32" />
63-
</assert_contents>
64-
</output>
110+
<param name="beams_resultPth" value="combineAnnotations_input_beams.tsv" />
111+
<param name="compoundDbTypeCond|compoundDbPth" value="metab_compound_subset.sqlite" />
112+
<output name="combined_annotations_tsv" file="combineAnnotations_combined_annotations.tsv" ftype="tsv" />
65113
<output name="combined_annotations_sqlite" file="combineAnnotations_combined_annotations.sqlite" ftype="sqlite" compare="sim_size"/>
66114
</test>
67115
</tests>

0 commit comments

Comments
 (0)