Skip to content

Commit fefeb11

Browse files
authored
Merge pull request #826 from npinter/update-maxquant
Update MaxQuant
2 parents 74bc7df + 32547de commit fefeb11

13 files changed

Lines changed: 278 additions & 703 deletions

File tree

tools/maxquant/macros.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<macros>
33
<token name="@PROFILE@">21.05</token>
44
<token name="@VERSION@">2.0.3.0</token>
5-
<token name="@VERSION_SUFFIX@">2</token>
6-
<token name="@VERSION_SUFFIX_MQPAR@">2</token>
5+
<token name="@VERSION_SUFFIX@">3</token>
6+
<token name="@VERSION_SUFFIX_MQPAR@">3</token>
77
<token name="@SUBSTITUTION_RX@">[^\w\-\s\.]</token>
88
<token name="@TMT2PLEX@">
99
- [TMT2plex-Lys126,TMT2plex-Nter126,0,0,0,0,True]

tools/maxquant/maxquant.xml

Lines changed: 118 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@
1818
#for $pg in $paramGroups
1919
#for $infile in $pg.files
2020
#set $identifier = re.sub('@SUBSTITUTION_RX@', '_', str($infile.element_identifier))
21-
#if $identifier.lower().endswith("."+$infile.ext)
21+
#if $infile.is_of_type("brukertdf.d.tar")
22+
#set $link_name = re.sub('(?i)\\.tar$', '', $identifier)
23+
#if not $link_name.lower().endswith(".d")
24+
#set $link_name = $link_name + ".d"
25+
#end if
26+
#elif $identifier.lower().endswith("."+$infile.ext)
2227
#set $link_name = $identifier
23-
#else
28+
#else
2429
#set $link_name = $identifier + "." + $infile.ext
2530
#end if
2631
#if $infile.ext == 'thermo.raw':
2732
cp '$infile' '$link_name' &&
33+
#elif $infile.is_of_type("brukertdf.d.tar")
34+
mkdir -p '$link_name' &&
35+
tar -xf '$infile' -C '$link_name' --strip-components=1 &&
2836
#else:
2937
ln -s '$infile' '$link_name' &&
3038
#end if
@@ -107,20 +115,46 @@
107115
#end if
108116
useCounterparts: $protein_quant.only_unmod_prot.discard_unmod_cpart_peptides
109117
#end if
118+
#if str($search_opts.full_min_mz) != '':
119+
fullMinMz: '${search_opts.full_min_mz}'
120+
#end if
121+
#if str($search_opts.full_max_mz) != '':
122+
fullMaxMz: '${search_opts.full_max_mz}'
123+
#end if
124+
#if str($search_opts.grid_spacing) != '':
125+
gridSpacing: ${search_opts.grid_spacing}
126+
#end if
110127
paramGroups:
111128
#for $pg in $paramGroups:
112129
#set $link_names = []
130+
#set $is_bruker_tims = False
113131
#for $infile in $pg.files
114132
#set $identifier = re.sub('@SUBSTITUTION_RX@', '_', str($infile.element_identifier))
115-
#if $identifier.lower().endswith("."+$infile.ext)
133+
#if $infile.is_of_type("brukertdf.d.tar")
134+
#set $link_name = re.sub('(?i)\\.tar$', '', $identifier)
135+
#if not $link_name.lower().endswith(".d")
136+
#set $link_name = $link_name + ".d"
137+
#end if
138+
#set $is_bruker_tims = True
139+
#elif $identifier.lower().endswith("."+$infile.ext)
116140
#set $link_name = $identifier
117-
#else
141+
#else
118142
#set $link_name = $identifier + "." + $infile.ext
119143
#end if
120144
#silent $link_names.append($link_name)
121145
#end for
122146
- files: $link_names
123147
maxMissedCleavages: ${pg.maxMissedCleavages}
148+
#if $is_bruker_tims
149+
lcmsRunType: 'TIMS-DDA'
150+
timsHalfWidth: ${pg.timsHalfWidth}
151+
timsStep: ${pg.timsStep}
152+
timsResolution: ${pg.timsResolution}
153+
timsMinMsmsIntensity: ${pg.timsMinMsmsIntensity}
154+
timsRemovePrecursor: ${pg.timsRemovePrecursor}
155+
timsIsobaricLabels: False
156+
timsCollapseMsms: ${pg.timsCollapseMsms}
157+
#end if
124158
#if $pg.fixedModifications:
125159
fixedModifications: [${pg.fixedModifications}]
126160
#else:
@@ -341,6 +375,14 @@ short peptides are usually not unique in the protein database and therefore not
341375
help="Specify the desired false discovery rate (FDR) at the peptide spectrum match (PSM) level. It is determined by the target-decoy approach. A value of 0.01 stands for 1% FDR."/>
342376
<param name="protein_fdr" type="float" label="Protein FDR" min="0" value="0.01"
343377
help="Specify the desired false discovery rate (FDR) at the protein level. It is determined by the target-decoy approach. A value of 0.01 stands for 1% FDR."/>
378+
<param name="full_min_mz" type="integer" label="Full scan minimum m/z" value="" optional="true"
379+
help="Generic MaxQuant full scan lower m/z bound. Leave empty to keep the MaxQuant template value.">
380+
</param>
381+
<param name="full_max_mz" type="integer" label="Full scan maximum m/z" value="" optional="true"
382+
help="Generic MaxQuant full scan upper m/z bound. Leave empty to keep the MaxQuant template value.">
383+
</param>
384+
<param name="grid_spacing" type="float" label="Grid spacing" min="0" value="" optional="true"
385+
help="Generic MaxQuant grid spacing. Leave empty to keep the MaxQuant template value. Adjust for ion mobility/TIMS workflows when required."/>
344386
<param name="min_pep_length" type="integer" label="Minimum peptide length for unspecific searches" min="1" value="8"
345387
help="During unspecific searches peptides that have fewer amino acids than this value will be discarded. This applies also to semi-specific (e.g. semi tryptic) searches"/>
346388
<param name="max_pep_length" type="integer" label="Maximum peptide length for unspecific searches" min="1" value="25"
@@ -417,8 +459,8 @@ short peptides are usually not unique in the protein database and therefore not
417459

418460

419461
<repeat name="paramGroups" title="Parameter Group" min="1" default="1">
420-
<param type="data" format="thermo.raw,mzxml,mzml" name="files" label="Infiles" multiple="true"
421-
help="Only select infiles of the same datatype."/>
462+
<param type="data" format="thermo.raw,mzxml,mzml,brukertdf.d.tar" name="files" label="Infiles" multiple="true"
463+
help="Only select infiles of the same datatype. Bruker .d folders must use the brukertdf.d.tar datatype and contain one top-level .d directory."/>
422464
<param type="integer" name="maxMissedCleavages"
423465
label="missed cleavages" value="2"
424466
help="The number of missed cleavages that are maximally tolerated in the in-silico digestion of the protien sequences."/>
@@ -463,6 +505,26 @@ short peptides are usually not unique in the protein database and therefore not
463505
<option value="4">Unspecific</option>
464506
<option value="5">No digestion</option>
465507
</param>
508+
<param type="integer" name="timsHalfWidth"
509+
label="TIMS half width" value="4" min="1"
510+
help="Used only for Bruker .d.tar inputs."/>
511+
<param type="integer" name="timsStep"
512+
label="TIMS step" value="3" min="1"
513+
help="Used only for Bruker .d.tar inputs."/>
514+
<param type="integer" name="timsResolution"
515+
label="TIMS resolution" value="32000" min="1"
516+
help="Used only for Bruker .d.tar inputs."/>
517+
<param type="float" name="timsMinMsmsIntensity"
518+
label="TIMS minimum MS/MS intensity" value="1.5" min="0"
519+
help="Used only for Bruker .d.tar inputs."/>
520+
<param name="timsRemovePrecursor" type="boolean" checked="true"
521+
label="TIMS remove precursor"
522+
truevalue="True" falsevalue="False"
523+
help="Used only for Bruker .d.tar inputs."/>
524+
<param name="timsCollapseMsms" type="boolean" checked="true"
525+
label="TIMS collapse MS/MS"
526+
truevalue="True" falsevalue="False"
527+
help="Used only for Bruker .d.tar inputs."/>
466528
<conditional name="quant_method">
467529
<param name="select_quant_method" type="select" label="Quantitation Methods"
468530
help="Select a method if needed.">
@@ -849,7 +911,7 @@ short peptides are usually not unique in the protein database and therefore not
849911
<section name="input_opts">
850912
<param name="fasta_files" value="bsa.fasta" />
851913
<param name="identifier_parse_rule" value="&gt;([^\s]*)" />
852-
<param name="description_parse_rule" value="&gt;(.*)" />
914+
<param name="description_parse_rule" value="&gt;(.*)" />
853915
</section>
854916
<section name="search_opts">
855917
<param name="template" value="04/exp_design" />
@@ -902,7 +964,7 @@ short peptides are usually not unique in the protein database and therefore not
902964
<section name="input_opts">
903965
<param name="fasta_files" value="tmt_data_16.fasta" />
904966
<param name="identifier_parse_rule" value="&gt;([^\s]*)" />
905-
<param name="description_parse_rule" value="&gt;(.*)" />
967+
<param name="description_parse_rule" value="&gt;(.*)" />
906968
</section>
907969
<repeat name="paramGroups">
908970
<param name="files" value="tmt_data.mzXML" ftype="mzxml"/>
@@ -928,7 +990,7 @@ short peptides are usually not unique in the protein database and therefore not
928990
<section name="input_opts">
929991
<param name="fasta_files" value="tmt_data_18.fasta" />
930992
<param name="identifier_parse_rule" value="&gt;([^\s]*)" />
931-
<param name="description_parse_rule" value="&gt;(.*)" />
993+
<param name="description_parse_rule" value="&gt;(.*)" />
932994
</section>
933995
<repeat name="paramGroups">
934996
<param name="files" value="tmt_data_18.mzXML" ftype="mzxml"/>
@@ -1006,6 +1068,49 @@ short peptides are usually not unique in the protein database and therefore not
10061068
</output>
10071069
<output name="mqpar" file="10/mqpar.xml" lines_diff="10" />
10081070
</test>
1071+
<!-- 12 Bruker .d.tar dry-run test -->
1072+
<test expect_num_outputs="2">
1073+
<section name="input_opts">
1074+
<param name="fasta_files" value="bsa.fasta" />
1075+
<param name="identifier_parse_rule" value="&gt;([^\s]*)" />
1076+
<param name="description_parse_rule" value="&gt;(.*)" />
1077+
</section>
1078+
<section name="search_opts">
1079+
<param name="grid_spacing" value="0.7" />
1080+
</section>
1081+
<repeat name="paramGroups">
1082+
<param name="files" location="https://zenodo.org/records/20552693/files/ThyroglobMRM000003.d.tar" ftype="brukertdf.d.tar"/>
1083+
<param name="maxMissedCleavages" value="2"/>
1084+
<param name="fixedModifications" value="Carbamidomethyl (C)" />
1085+
<param name="variableModifications" value="Oxidation (M)" />
1086+
<param name="enzymes" value="Trypsin/P" />
1087+
</repeat>
1088+
<section name="output_opts">
1089+
<param name="dry_run" value="True" />
1090+
<param name="output" value="config,mqpar" />
1091+
</section>
1092+
<output name="config">
1093+
<assert_contents>
1094+
<has_text text="gridSpacing: 0.7" />
1095+
<has_text text="files: ['ThyroglobMRM000003.d']" />
1096+
<has_text text="lcmsRunType: 'TIMS-DDA'" />
1097+
<has_text text="timsHalfWidth: 4" />
1098+
<has_text text="timsStep: 3" />
1099+
<has_text text="timsResolution: 32000" />
1100+
<has_text text="timsMinMsmsIntensity: 1.5" />
1101+
</assert_contents>
1102+
</output>
1103+
<output name="mqpar">
1104+
<assert_contents>
1105+
<has_text text="ThyroglobMRM000003.d" />
1106+
<has_text text="&lt;lcmsRunType&gt;TIMS-DDA&lt;/lcmsRunType&gt;" />
1107+
<has_text text="&lt;timsHalfWidth&gt;4&lt;/timsHalfWidth&gt;" />
1108+
<has_text text="&lt;timsStep&gt;3&lt;/timsStep&gt;" />
1109+
<has_text text="&lt;timsResolution&gt;32000&lt;/timsResolution&gt;" />
1110+
<has_text text="&lt;timsMinMsmsIntensity&gt;1.5&lt;/timsMinMsmsIntensity&gt;" />
1111+
</assert_contents>
1112+
</output>
1113+
</test>
10091114
</tests>
10101115

10111116
<help><![CDATA[
@@ -1015,9 +1120,11 @@ This tool is a wrapper for MaxQuant v@VERSION@. The current version of the wrapp
10151120
10161121
**Input files**
10171122
1018-
- Thermo raw, mzML, or mzXML files (in parameter group section)
1123+
- Thermo raw, mzML, mzXML files, or Bruker .d folders tarred as `*.d.tar`
1124+
(in parameter group section)
10191125
1020-
- The datatype of all files has to be either 'thermo.raw', 'mzml' or 'mzxml'. Make sure to specify the correct datatype either during upload to Galaxy or afterwards (edit attributes --> datatypes)
1126+
- The datatype of all non-Bruker files has to be either 'thermo.raw', 'mzml' or 'mzxml'. Make sure to specify the correct datatype either during upload to Galaxy or afterwards (edit attributes --> datatypes)
1127+
- Bruker .d folders must use the `brukertdf.d.tar` datatype and contain one top-level `.d` directory. The wrapper extracts the archive and passes the resulting `.d` directory to MaxQuant.
10211128
- Fasta file: specify parse rules according to your fasta file (header). Some examples for different fasta headers:
10221129
10231130
::

0 commit comments

Comments
 (0)