Skip to content

Commit cb903cd

Browse files
authored
v1.12.0+galaxy0 (#29)
* version bump and readme update * bug fix for combineAnnotations * update error detection cmd in xml * Tool review (#28) * initial commit * some changes * fix some things * fix some other things * add combine_annotations to travis * combine annotation cli argument fix * Update email for simon * update file input processing dimsPredictPuritySingle and purityA * addressing issue #22 * Update dependency * Removed tomnl channel from travis * update packages and spectral matching * updated msp files with new msPurity version tag * adding use-galaxy style travis testing and auto toolshed uploader * Revert "adding use-galaxy style travis testing and auto toolshed uploader" This reverts commit f021b2f. * update travis * travis troubleshoot * travis updates * pinned versions of packages * update readme * updated readme * update for 'argument' name
1 parent 1d6d23b commit cb903cd

Some content is hidden

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

42 files changed

+3309
-3328
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cache:
77

88
env:
99
- TEST=tools/msPurity/purityA.xml
10+
- TEST=tools/msPurity/combineAnnotations.xml
1011
- TEST=tools/msPurity/spectralMatching.xml
1112
- TEST=tools/msPurity/dimsPredictPuritySingle.xml
1213
- TEST=tools/msPurity/filterFragSpectra.xml
@@ -27,5 +28,5 @@ before_install:
2728

2829
script:
2930
- planemo lint ${TRAVIS_BUILD_DIR}/${TEST}
30-
- travis_wait 30 planemo test --conda_debug --conda_ensure_channels tomnl,iuc,bioconda,conda-forge,defaults ${TRAVIS_BUILD_DIR}/${TEST}
31+
- planemo test --conda_debug ${TRAVIS_BUILD_DIR}/${TEST}
3132

README.rst

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

5-
Warning
6-
------
7-
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.
85

9-
Version v1.11.4+galaxy0.2.7
6+
Version v1.12.0+galaxy0
107
------
11-
NOTE: bioconductor-mspurity v1.11.4 only available on 'tomnl' conda channel - to be updated to bioconda soon.
128

139
- msPurity
14-
- bioconductor-mspurity v1.11.4
10+
- bioconductor-mspurity v1.12.0
1511
- Galaxy tools
16-
- v0.2.7
12+
- v0
1713

1814
About
1915
------
@@ -55,9 +51,19 @@ Authors, contributors & contacts
5551
- Ralf J. M. Weber ([email protected]) - `University of Birmingham (UK) <http://www.birmingham.ac.uk/index.aspx>`_
5652
- Jordi Capellades ([email protected]) - `Universitat Rovira i Virgili (SP) <http://www.urv.cat/en/>`_
5753
- Julien Saint-Vanne (jsaintvanne) - `ABiMS (France) <http://abims.sb-roscoff.fr/>`_
54+
- Simon Bray ([email protected]) - `University of Freiburg (Germany) <https://www.uni-freiburg.de/>`_
5855

5956
Changes
6057
-------------------------
58+
v1.12.0-galaxy0
59+
- Updates for Bioconductor stable msPurity v1.12.0 release
60+
- Additional columns added for spectral matching (for msnpy use case)
61+
- Merge of v1.11.4-galaxy1
62+
63+
v1.11.4-galaxy1
64+
- Not submitted to toolshed
65+
- Update to follow IUC guidelines for Galaxy tool development
66+
6167
v1.11.4-galaxy0.2.7
6268
- submitted to test toolshed (20190927)
6369
- Bug fix for spectralMatching choice of instrument types

tools/msPurity/averageFragSpectra.R

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,18 @@ if (length(pa)>0){
144144
} else{
145145
colnames(av_spectra)[1] <- 'grpid'
146146
av_spectra$grpid <- names(pa@av_spectra)[av_spectra$grpid]
147+
148+
if((length(pa@av_intra_params)>0) || (length(pa@av_inter_params)>0) ){
149+
# Add some extra info (only required if av_intra or av_inter performed)
150+
colnames(av_spectra)[2] <- 'fileid'
151+
av_spectra$avid <- 1:nrow(av_spectra)
152+
153+
filenames <- sapply(av_spectra$fileid, function(x) names(pa@fileList)[as.integer(x)])
154+
# filenames_galaxy <- sapply(av_spectra$fileid, function(x) basename(pa@fileList[as.integer(x)]))
155+
156+
av_spectra = as.data.frame(append(av_spectra, list(filename = filenames), after=2))
157+
}
147158

148-
colnames(av_spectra)[2] <- 'fileid'
149-
av_spectra$avid <- 1:nrow(av_spectra)
150-
151-
filenames <- sapply(av_spectra$fileid, function(x) names(pa@fileList)[as.integer(x)])
152-
# filenames_galaxy <- sapply(av_spectra$fileid, function(x) basename(pa@fileList[as.integer(x)]))
153-
154-
av_spectra = as.data.frame(append(av_spectra, list(filename = filenames), after=2))
155159

156160
print(head(av_spectra))
157161
write.table(av_spectra, opt$out_peaklist, row.names=FALSE, sep='\t')

tools/msPurity/averageFragSpectra.xml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
<tool id="mspurity_averagefragspectra" name="msPurity.averageFragSpectra" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
2-
<description>
3-
Average and filter LC-MS/MS fragmentation spectra (Inter, Intra or All)
4-
</description>
5-
2+
<description>Average and filter LC-MS/MS fragmentation spectra (Inter, Intra or All)</description>
63
<macros>
74
<import>macros.xml</import>
85
</macros>
9-
10-
<expand macro="requirements">
11-
</expand>
12-
13-
<stdio>
14-
<exit_code range="1:" />
15-
</stdio>
16-
<command interpreter="Rscript"><![CDATA[
17-
averageFragSpectra.R
18-
--out_rdata="$averageFragSpectra_output_rdata"
19-
--out_peaklist="$averageFragSpectra_output_tsv"
20-
--pa="$pa"
6+
<expand macro="requirements"/>
7+
<command detect_errors="exit_code"><![CDATA[
8+
Rscript '$__tool_directory__/averageFragSpectra.R'
9+
--out_rdata='$averageFragSpectra_output_rdata'
10+
--out_peaklist='$averageFragSpectra_output_tsv'
11+
--pa='$pa'
2112
--av_level=$av_level
2213
--cores=\${GALAXY_SLOTS:-4}
2314
--minfrac=$minfrac
@@ -30,29 +21,29 @@
3021
$rmp
3122
]]></command>
3223
<inputs>
33-
<param name="pa" type="data" label="purityA object" format="rdata"
24+
<param argument="--pa" type="data" label="purityA object" format="rdata"
3425
help="purityA object saved as 'pa' in a RData file (output from frag4feature tool)"/>
3526

3627

37-
<param name="av_level" type="select" label="Average and filter fragmentation spectra for each XCMS feature" help="">
28+
<param argument="--av_level" type="select" label="Average and filter fragmentation spectra for each XCMS feature" help="">
3829
<option value="intra" selected="true">within a MS data file</option>
3930
<option value="inter">across MS data files</option>
4031
<option value="all">within and across MS data files (ignoring intra and inter relationships)</option>
4132
</param>
4233

4334

44-
<param name="snr" type="float" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
45-
<param name="ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
46-
<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="" />
47-
<param name="minnum" type="integer" value="1" label="Minimum number of (averaged) fragmentation scans for a fragmentation event (precursor)." help="" />
48-
<param name="ppm" type="float" value="5.0" label="Ppm error tolerance" help="Maximum tolerated m/z deviation in parts per million." />
49-
<param name="sumi" type="boolean" checked="false" truevalue="--sumi" falsevalue="" label="Sum intensities across (averaged) scans?" help="" />
50-
<param name="av" type="select" label="Function to calculate the average intensity, m/z and SNR values across (averaged) scans after filtering." help="This is ignored for intensities when intensities are summed." >
35+
<param argument="--snr" type="float" min="0.0" value="0.0" label="Signal-to-noise threshold after averaging or summing" help="" />
36+
<param argument="--ra" type="float" min="0.0" max="1.0" value="0.0" label="Relative abundance threshold after averaging or summing" help="" />
37+
<param argument="--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="" />
38+
<param argument="--minnum" type="integer" min="1" value="1" label="Minimum number of (averaged) fragmentation scans for a fragmentation event (precursor)." help="" />
39+
<param argument="--ppm" type="float" min="0.0" value="5.0" label="Ppm error tolerance" help="Maximum tolerated m/z deviation in parts per million." />
40+
<param argument="--sumi" type="boolean" checked="false" truevalue="--sumi" falsevalue="" label="Sum intensities across (averaged) scans?" help="" />
41+
<param argument="--av" type="select" label="Function to calculate the average intensity, m/z and SNR values across (averaged) scans after filtering." help="This is ignored for intensities when intensities are summed." >
5142
<option value="median" selected="true">median</option>
5243
<option value="mean">mean</option>
5344
</param>
5445

55-
<param name="rmp" type="boolean" checked="true" truevalue="--rmp" falsevalue="" label="Remove peaks that do not meet the filtering criteria. Otherwise peaks will be flagged instead."
46+
<param argument="--rmp" type="boolean" checked="true" truevalue="--rmp" falsevalue="" label="Remove peaks that do not meet the filtering criteria. Otherwise peaks will be flagged instead."
5647
help="" />
5748
</inputs>
5849
<outputs>

tools/msPurity/combineAnnotations.R

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ option_list <- list(
1414
make_option("--ms1_lookup_keepAdducts", type="character", default=NA),
1515
make_option("--ms1_lookup_dbSource", type="character", default="hmdb"),
1616

17-
make_option(c("-sw","--sm_weight"),type="numeric"),
18-
make_option(c("-mw","--metfrag_weight"),type="numeric"),
19-
make_option(c("-cw","--sirius_csi_weight"),type="numeric"),
20-
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"),
17+
make_option("--sm_weight", type="numeric"),
18+
make_option("--metfrag_weight", type="numeric"),
19+
make_option("--sirius_csi_weight", type="numeric"),
20+
make_option("--probmetab_weight", type="numeric"),
21+
make_option("--ms1_lookup_weight", type="numeric"),
22+
make_option("--biosim_weight", type="numeric"),
2323

2424
make_option("--create_new_database", action="store_true"),
25-
make_option(c("-o","--outdir"),type="character", default="."),
25+
make_option("--outdir", type="character", default="."),
2626

2727
make_option("--compoundDbType", type="character", default="sqlite"),
2828
make_option("--compoundDbPth", type="character", default=NA),
@@ -67,7 +67,8 @@ if (opt$compoundDbType=='local_config'){
6767
source_local <- function(fname){ argv <- commandArgs(trailingOnly=FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
6868
source_local("dbconfig.R")
6969
}else{
70-
compoundDbType = compoundDbType
70+
compoundDbPth = opt$compoundDbPth
71+
compoundDbType = opt$compoundDbType
7172
compoundDbName = NA
7273
compoundDbHost = NA
7374
compoundDbPort = NA

tools/msPurity/combineAnnotations.xml

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
<tool id="mspurity_combineannotations" name="msPurity.combineAnnotations" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
2-
<description>
3-
Combine, score and rank metabolite annotation results
4-
</description>
5-
2+
<description>Combine, score and rank metabolite annotation results</description>
63
<macros>
74
<import>macros.xml</import>
85
</macros>
9-
10-
<expand macro="requirements">
11-
</expand>
12-
13-
<stdio>
14-
<exit_code range="1:" />
15-
</stdio>
16-
<command interpreter="Rscript"><![CDATA[
17-
combineAnnotations.R
18-
--sm_resultPth="$sm_resultPth"
19-
--metfrag_resultPth="$metfrag_resultPth"
20-
--sirius_csi_resultPth="$sirius_csi_resultPth"
21-
--probmetab_resultPth="$probmetab_resultPth"
22-
23-
--ms1_lookup_resultPth=$ms1_lookup_resultPth
6+
<expand macro="requirements"/>
7+
<command detect_errors="exit_code"><![CDATA[
8+
Rscript '$__tool_directory__/combineAnnotations.R'
9+
--sm_resultPth='$sm_resultPth'
10+
--metfrag_resultPth='$metfrag_resultPth'
11+
--sirius_csi_resultPth='$sirius_csi_resultPth'
12+
--probmetab_resultPth='$probmetab_resultPth'
13+
--ms1_lookup_resultPth='$ms1_lookup_resultPth'
2414
2515
#if $ms1_lookup_checkAdducts:
2616
--ms1_lookup_checkAdducts
2717
#end if
2818
29-
--ms1_lookup_keepAdducts="$ms1_lookup_keepAdducts"
19+
--ms1_lookup_keepAdducts='$ms1_lookup_keepAdducts'
3020
--ms1_lookup_dbSource=$ms1_lookup_dbSource
3121
3222
--sm_weight=$sm_weight
@@ -44,56 +34,54 @@
4434
--compoundDbType=$compoundDbTypeCond.compoundDbType
4535
4636
#if $compoundDbTypeCond.compoundDbType== 'sqlite'
47-
--compoundDbPth=$compoundDbTypeCond.compoundDbPth
37+
--compoundDbPth='$compoundDbTypeCond.compoundDbPth'
4838
#end if
4939
5040
5141
]]></command>
5242
<inputs>
5343

5444

55-
<param name="sm_resultPth" type="data" label="Spectral matching result" format="sqlite"
45+
<param argument="--sm_resultPth" type="data" label="Spectral matching result" format="sqlite"
5646
help="The SQLite database generated from msPurity.spectralMatching"/>
57-
<param name="metfrag_resultPth" type="data" label="Metfrag result" format="tsv,tabular" optional="true"
47+
<param argument="--metfrag_resultPth" type="data" label="Metfrag result" format="tsv,tabular" optional="true"
5848
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"
49+
<param argument="--sirius_csi_resultPth" type="data" label="Sirius CSI:FingerID result" format="tsv,tabular" optional="true"
6050
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"
51+
<param argument="--probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular" optional="true"
6252
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"
53+
<param argument="--ms1_lookup_resultPth" type="data" label="MS1 Lookup result" format="tsv,tabular" optional="true"
6454
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"
55+
<param argument="--ms1_lookup_keepAdducts" type="text" label="MS1 lookup adducts to keep" optional="true"
6656
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"
57+
<param argument="--ms1_lookup_checkAdducts" type="boolean" label="MS1 lookup check adducts to CAMERA"
6858
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" >
59+
<param argument="--ms1_lookup_dbSource" type="select" label="MS1 lookup database source" help="Which database was used for the MS1 lookup" >
7060
<option value="hmdb" selected="true">hmdb</option>
7161
<option value="pubchem">pubchem</option>
7262
<option value="kegg">kegg</option>
7363
</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?"
64+
<param argument="--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" />
65+
<param argument="--metfrag_weight" type="float" min="0.0" max="1.0" value="0.2" label="Metfrag weight" help="all weights need to sum to 1" />
66+
<param argument="--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" />
67+
<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" />
68+
<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" />
69+
<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" />
70+
<param argument="--create_new_database" type="boolean" checked="true" label="Create a new database for the results?"
8171
help="A copy will be made of the input SQLite spectral matching database and the results will be added to this copy.
8272
When False, the input SQLite database will be updated the results. Use False
8373
if you want to reduce storage space being used."/>
8474

8575
<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])." >
76+
<param argument="--compoundDbType" type="select" label="compoundDbType" help="Database type for compound database to be used full database available on request - contact [email protected])." >
8777
<option value="sqlite" selected="true">SQLite</option>
8878
<option value="local_config" >Locally configured MySQL, Postgres or SQLite database</option>
8979
</param>
9080
<when value="sqlite">
91-
<param type="data" name="compoundDbPth" label="SQLite compound database pth" format="sqlite" help=""/>
81+
<param argument="--compoundDbPth" type="data" label="SQLite compound database pth" format="sqlite" help=""/>
9282
</when>
9383
<when value="local_config">
9484
</when>
95-
<when value="msPurityData">
96-
</when>
9785
</conditional>
9886

9987
</inputs>

0 commit comments

Comments
 (0)