diff macros.xml @ 7:b4f6df8fa89b draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/fragpipe commit 9d8b2338a6a513124bc58223637ee4c5813e0bb4
author galaxyp
date Wed, 01 Oct 2025 22:20:54 +0000
parents 59fec1e2a6c3
children
line wrap: on
line diff
--- a/macros.xml	Sun Mar 30 23:00:45 2025 +0000
+++ b/macros.xml	Wed Oct 01 22:20:54 2025 +0000
@@ -1,7 +1,15 @@
 <macros>
     <import>msfragger_macros.xml</import>
-    <token name="@TOOL_VERSION@">20.0</token>
-    <token name="@VERSION_SUFFIX@">6</token>
+    <token name="@TOOL_VERSION@">23.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+
+    <!--
+        These keys were generated ONLY for use by the Galaxy tool wrapper, and only after
+        the user has selected agreed to the academic-use only terms in the tool wrapper.
+    -->
+    <token name="@MSFRAGGER_ACADEMIC_USE_KEY@">f28c4be2-759b0a11-6c1ea652-1240565a</token>
+    <token name="@IONQUANT_ACADEMIC_USE_KEY@">b6c0ad83-9a4e8900-3e83d29c-aeba3bfb</token>
+    <token name="@DIATRACER_ACADEMIC_USE_KEY@">8de4daf3-a090ed0d-0acdb00a-1485d8a7</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">fragpipe</requirement>
@@ -59,7 +67,14 @@
 
         #for $sf in $inputs
             #set $i_name = $ln_name($sf)
-            ln -s '$sf' 'scans/${i_name}' &&
+
+            ## speclib library does not follow links
+            #if $wf.workflow_name == "DIA_SpecLib_Quant"
+                cp '$sf' 'scans/${i_name}' &&
+            #else
+                ln -s '$sf' 'scans/${i_name}' &&
+            #end if
+
         #end for
     ]]></token>
 
@@ -117,7 +132,12 @@
                     awk 'NR==1{printf("Experiment\t%s\n",\$0);}' \$i > concat_\${f};
                 fi;
                 awk 'NR>1{printf("'"\${d}"'\t%s\n",\$0);}' \$i >> concat_\${f}; t=\$(echo \${i} | tr '/' '.');
-                mv \${i} \${t}; n=\$((n+1));
+                if [[ \${i} == \${t} ]]; then
+                    mv \${i} 1.\${i};
+                else
+                    mv \${i} \${t};
+                fi;
+                n=\$((n+1));
             done;
         done
     ]]></token>
@@ -151,16 +171,17 @@
     -->
     <xml name="workflow">
         <conditional name="wf">
-            <param name="workflow_name" type="select" label="Workflow"  help="Note: MSBooster is currently disabled in all Galaxy FragPipe workflows.">
-                <option value="Default">Default</option>
+            <param name="workflow_name" type="select" label="Workflow">
+                <option value="Basic-Search">Basic-Search</option>
                 <option value="Open">Open</option>
                 <option value="Nonspecific-HLA">Nonspecific-HLA</option>
                 <option value="LFQ-MBR">LFQ-MBR</option>
                 <option value="TMT10">TMT10</option>
                 <option value="TMT11">TMT11</option>
+                <option value="DIA_SpecLib_Quant">DIA_SpecLib_Quant</option>
             </param>
 
-            <when value="Default">
+            <when value="Basic-Search">
                 <section name="msfragger" expanded="false" title="MSFragger Options">
                     <expand macro="msfragger_default"/>
                 </section>
@@ -180,6 +201,8 @@
                 <expand macro="label_free_quantification" yes="false" no="true"/>
                 <expand macro="ptm_shepherd" yes="false" no="true" c="true" z="true"/>
                 <expand macro="isobaric_quantification" yes="false" no="true"/>
+                <expand macro="diann_quantification" yes="false" no="true"/>
+                <expand macro="dia_pseuedo_ms2"/>
             </when>
 
             <when value="Open">
@@ -204,6 +227,8 @@
                 <expand macro="label_free_quantification" yes="false" no="true"/>
                 <expand macro="ptm_shepherd" yes="true" no="false"/>
                 <expand macro="isobaric_quantification" yes="false" no="true" bridge="false" pool="true"/>
+                <expand macro="diann_quantification" yes="false" no="true"/>
+                <expand macro="dia_pseuedo_ms2"/>
             </when>
 
             <when value="Nonspecific-HLA">
@@ -226,6 +251,8 @@
                 <expand macro="label_free_quantification" yes="false" no="true"/>
                 <expand macro="ptm_shepherd" yes="false" no="true"/>
                 <expand macro="isobaric_quantification" yes="false" no="true"/>
+                <expand macro="diann_quantification" yes="false" no="true"/>
+                <expand macro="dia_pseuedo_ms2"/>
             </when>
 
             <when value="LFQ-MBR">
@@ -248,6 +275,34 @@
                 <expand macro="label_free_quantification" yes="true" no="false"/>
                 <expand macro="ptm_shepherd" yes="false" no="true"/>
                 <expand macro="isobaric_quantification" yes="false" no="true"/>
+                <expand macro="diann_quantification" yes="false" no="true"/>
+                <expand macro="dia_pseuedo_ms2"/>
+            </when>
+
+            <when value="DIA_SpecLib_Quant">
+                <section name="msfragger" expanded="false" title="MSFragger Options">
+                    <expand macro="msfragger_dia_speclib_quant"/>
+                </section>
+                <expand macro="validation"
+                  pep="false"
+                  perc="false"
+                  boost="true"
+                  no="false"
+                  masswidth="5"
+                  clevel="0"
+                  accmass="true"
+                  decoyprobs="true"
+                  nonparam="true"
+                  expectscore="true"
+                  ppm="true"
+                  combined_pepxml="false"
+                  protp_minprob="0.5"
+                  perc_minprob="0.7"/>
+                <expand macro="label_free_quantification" yes="false" no="true"/>
+                <expand macro="ptm_shepherd" yes="false" no="true" c="true" z="true"/>
+                <expand macro="isobaric_quantification" yes="false" no="true"/>
+                <expand macro="diann_quantification" yes="true" no="false"/>
+                <expand macro="dia_pseuedo_ms2"/>
             </when>
 
             <when value="TMT10">
@@ -284,6 +339,8 @@
         <expand macro="isobaric_quantification" yes="true" no="false" plex="@PLEX@" level="2" ref_tag="Bridge" mod_tag="none"/>
         <expand macro="label_free_quantification" yes="false" no="true"/>
         <expand macro="ptm_shepherd" yes="false" no="true" token_unimod="false" token_common="true"/>
+        <expand macro="diann_quantification" yes="false" no="true"/>
+        <expand macro="dia_pseuedo_ms2"/>
     </xml>
 
     <!-- Generates the FragPipe workflow-->
@@ -311,10 +368,55 @@
 
             ## Get the MSFragger Params (shared with the MSFragger tool)
             #set $prefix = $wf.msfragger
+
             @MSFRAGGER_PARAM_DICT@
             #if len($vmods) > 0
-              #set $msfragger_dict['table.var-mods'] = '; '.join([$re.sub('^(.*,)(\d)$','\\1True,\\2',m) for m in $vmods])
+              #set $msfragger_dict['table.var-mods'] = '; '.join([$re.sub('^(.*,)(\d)$','\\1true,\\2',m) for m in $vmods])
             #end if
+
+            #set $fmod_items = [
+                ("add_Cterm_peptide", "C-Term Peptide"),
+                ("add_Nterm_peptide", "N-Term Peptide"),
+                ("add_Cterm_protein", "C-Term Protein"),
+                ("add_Nterm_protein", "N-Term Protein"),
+                ("add_G_glycine","G (glycine)"),
+                ("add_A_alanine", "A (alanine)"),
+                ("add_S_serine", "S (serine)"),
+                ("add_P_proline", "P (proline)"),
+                ("add_V_valine", "V (valine)"),
+                ("add_T_threonine", "T (threonine)"),
+                ("add_C_cysteine", "C (cysteine)"),
+                ("add_L_leucine", "L (leucine)"),
+                ("add_I_isoleucine", "I (isoleucine)"),
+                ("add_N_asparagine", "N (asparagine)"),
+                ("add_D_aspartic_acid", "D (aspartic acid)"),
+                ("add_Q_glutamine", "Q (glutamine)"),
+                ("add_K_lysine", "K (lysine)"),
+                ("add_E_glutamic_acid", "E (glutamic acid)"),
+                ("add_M_methionine", "M (methionine)"),
+                ("add_H_histidine", "H (histidine)"),
+                ("add_F_phenylalanine", "F (phenylalanine)"),
+                ("add_R_arginine", "R (arginine)"),
+                ("add_Y_tyrosine", "Y (tyrosine)"),
+                ("add_W_tryptophan", "W (tryptophan)"),
+                ("add_B_user_amino_acid", "B "),
+                ("add_J_user_amino_acid", "J"),
+                ("add_O_user_amino_acid", "O"),
+                ("add_U_user_amino_acid", "U"),
+                ("add_X_user_amino_acid", "X"),
+                ("add_Z_user_amino_acid", "Z")
+            ]
+            #set $fmod_string = ""
+            #for $m in $fmod_items
+                #set fmod_var_name = $m[0]
+                #set fmod_wf_name = $m[1]
+                #set $fmod_bool = $fmod_bools.get($fmod_var_name + "_bool")
+                #set $fmod_val = $fmod_vals.get($fmod_var_name)
+                #set $fmod_string += "; " + ",".join([str($fmod_val),str($fmod_wf_name),str($fmod_bool),"-1"])
+            #end for
+            #set $fmod_string = $fmod_string[2:]
+            #set $msfragger_dict['table.fix-mods'] = $fmod_string
+
             #for $k in $msfragger_dict.keys()
                 #set $kv = $k + '=' + str($msfragger_dict[$k])
                 #set $wfk = 'msfragger.' + $k
@@ -325,6 +427,14 @@
             @PTM_SHEPHERD@
             @LABEL_FREE_QUANTIFICATION@
             @ISOBARIC_QUANTIFICATION@
+            @DIANN_QUANTIFICATION@
+            @DIA_PSEUDO_MS2@
+
+            ## These values are specifically set by the GUI when running DIA_SpecLib_Quant
+            #if $wf.workflow_name == "DIA_SpecLib_Quant"
+                #set $wfdict["ptmshepherd.annotate_assigned_mods"] = "false"
+                #set $wfdict["ptmshepherd.use_msfragger_localization"] = "true"
+            #end if
 
             ## Populate the workflow with configuration and comment dictionary entries populated by tool params.
             #for $comment in $comments
@@ -339,10 +449,10 @@
     </xml>
 
     <!-- Percolator options -->
-    <xml name="percolator">
+    <xml name="percolator" token_perc_minprob="0.5">
         <section name="percolator" expanded="true" title="Percolator">
             <param name="keep_tsv_files" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Keep intermediate files"/>
-            <param name="min_prob" type="float" value="0.5" label="Minimum probability (default 0.5)"/>
+            <param name="min_prob" type="float" value="@PERC_MINPROB@" label="Minimum probability (default 0.5)"/>
         </section>
     </xml>
 
@@ -358,15 +468,25 @@
         <section name="msbooster" expanded="true" title="MSBooster">
             <param name="predict_rt" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Predict RT"/>
             <param name="predict_spectra" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Predict spectra"/>
-            <param name="use_correlated_features" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use correlated features"/>
+            <param name="predict_im" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Predict IM"/>
+            <param name="use_koina" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use Koina server" help="The public server used is https://koina.wilhelmlab.org:443/v2/models"/>
+            <param name="find_best_rt_model" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Find best RT model (requires Koina server)"/>
+            <param name="find_best_im_model" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Find best IM model if applicable (requires Koina server)"/>
+            <param name="find_best_spectra_model" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Find best spectral model (requires Koina server)"/>
         </section>
     </xml>
     <token name="@MSBOOSTER@"><![CDATA[
         #set $prfx = $wf.validation.validation_tab.psm_validation.msbooster
         #set $wfdict['msbooster.run-msbooster'] = 'true'
-        #set $wfdict['msbooster.predict-rt'] = str($prfx.predict_rt)
-        #set $wfdict['msbooster.predict-spectra'] = str($prfx.predict_spectra)
-        #set $wfdict['msbooster.use-correlated-features'] = str($prfx.use_correlated_features)
+        #set $wfdict['msbooster.predict-rt'] = $prfx.predict_rt
+        #set $wfdict['msbooster.predict-spectra'] = $prfx.predict_spectra
+        #set $wfdict['msbooster.predict-im'] = $prfx.predict_im
+        #if $prfx.use_koina == 'true'
+            #set $wfdict['msbooster.koina-url'] = 'https://koina.wilhelmlab.org:443/v2/models/'
+        #end if
+        #set $wfdict['msbooster.find-best-rt-model'] = $prfx.find_best_rt_model
+        #set $wfdict['msbooster.find-best-spectra-model'] = $prfx.find_best_spectra_model
+        #set $wfdict['msbooster.find-best-im-model'] = $prfx.find_best_im_model
     ]]></token>
 
 
@@ -379,7 +499,7 @@
             </param>
             <when value="true">
               <section name="phi_report_opts" expanded="false" title="FDR Filter and Report">
-                  <param name="dont_use_prot_prophet_file" type="boolean" truevalue="true" falsevalue="false" checked="false"/>
+                  <param name="dont_use_prot_proph_file" type="boolean" truevalue="true" falsevalue="false" checked="false"/>
                   <param name="print_decoys" type="boolean" truevalue="true" falsevalue="false" checked="false"/>
               </section>
             </when>
@@ -394,6 +514,7 @@
           #set $wfdict['phi-report.run-report'] = 'true'
           #set $prfx = $wf.validation.validation_tab.phi_report.phi_report_opts
           #set $wfdict['phi-report.print-decoys'] = $prfx.print_decoys
+          #set $wfdict['phi-report.dont-use-prot-proph-file'] = $prfx.dont_use_prot_proph_file
         #else
           #set $wfdict['phi-report.run-report'] = 'false'
         #end if
@@ -438,7 +559,7 @@
     </xml>
 
     <!-- Protein Prophet options -->
-    <xml name="protein_prophet" token_minprob="0.05">
+    <xml name="protein_prophet" token_protp_minprob="0.05">
         <conditional name="protein_prophet">
             <param name="run_protein_prophet" type="select" label="Run Protein Prophet">
                 <option value="true" selected="true">Yes</option>
@@ -448,7 +569,7 @@
               <section name="protein_prophet_opts" expanded="true" title="Protein Prophet">
                 <param argument="--iprophet" type="boolean" truevalue="--iprophet" falsevalue="" checked="false" label="input is from iProphet" />
                 <param argument="--maxppmdiff" type="integer" value="2000000" label="maximum peptide mass difference in ppm (default 2000000)" />
-                <param argument="--minprob" type="float" value="@MINPROB@" label="PeptideProphet probability threshold (default 0.05)" />
+                <param argument="--minprob" type="float" value="@PROTP_MINPROB@" label="PeptideProphet probability threshold (default 0.05)" />
                 <param argument="--nonsp" type="boolean" truevalue="--nonsp" falsevalue="" checked="false" label="do not use NSP model" />
                 <param argument="--subgroups" type="boolean" truevalue="--subgroups" falsevalue="" checked="false" label="do not use NOGROUPS" />
                 <param argument="--unmapped" type="boolean" truevalue="--unmapped" falsevalue="" checked="false" label="report results for UNMAPPED proteins" />
@@ -462,19 +583,19 @@
     <token name="@PROTEINPROPHET@"><![CDATA[
         #set $prfx = $wf.validation.validation_tab.protein_prophet
         #if $prfx.run_protein_prophet == 'true'
-        #set $prfx = $wf.validation.validation_tab.protein_prophet.protein_prophet_opts
+            #set $prfx = $wf.validation.validation_tab.protein_prophet.protein_prophet_opts
             #set $wfdict['protein-prophet.run-protein-prophet'] = 'true'
             #set $cmd_opts = [str($prfx.iprophet),str($prfx.nonsp),str($prfx.subgroups),str($prfx.unmapped)]
             #silent $cmd_opts.append('--maxppmdiff ' + str($prfx.maxppmdiff))
             #silent $cmd_opts.append('--minprob ' + str($prfx.minprob))
             #set $wfdict['protein-prophet.cmd-opts'] = ' '.join($cmd_opts).strip()
         #else
-            #set $wfdict[protein-prophet.run-protein-prophet] = 'false'
+            #set $wfdict['protein-prophet.run-protein-prophet'] = 'false'
         #end if
     ]]></token>
 
     <!-- Validation options. Includes PeptideProphet, Percolator, MSBooster, ProteinProphet, and CrystalC -->
-    <xml name="validation" token_expand="false" token_pep="false" token_perc="false" token_boost="false" token_no="true" token_masswidth="5" token_clevel="0" token_accmass="true" token_decoyprobs="true" token_nonparam="true" token_expectscore="true" token_ppm="true" token_combined_pepxml="false" token_protp_minprob="0.05">
+    <xml name="validation" token_expand="false" token_pep="false" token_perc="false" token_boost="false" token_no="true" token_masswidth="5" token_clevel="0" token_accmass="true" token_decoyprobs="true" token_nonparam="true" token_expectscore="true" token_ppm="true" token_combined_pepxml="false" token_protp_minprob="0.05" token_perc_minprob="0.5">
         <section name="validation" expanded="@EXPAND@" title="Validation">
             <conditional name="validation_tab">
                 <param name="run_validation" type="select" label="Run Validation">
@@ -494,16 +615,16 @@
                             <expand macro="peptide_prophet" masswidth="@MASSWIDTH@" clevel="@CLEVEL@" accmass="@ACCMASS@" decoyprobs="@DECOYPROBS@" nonparam="@NONPARAM@" expectscore="@EXPECTSCORE@" ppm="@PPM@" combined_pepxml="@COMBINED_PEPXML@"/>
                         </when>
                         <when value="percolator">
-                            <expand macro="percolator"/>
+                            <expand macro="percolator" perc_minprob="@PERC_MINPROB@"/>
                         </when>
                         <when value="msbooster_percolator">
                             <expand macro="msbooster"/>
-                            <expand macro="percolator"/>
+                            <expand macro="percolator" perc_minprob="@PERC_MINPROB@"/>
                         </when>
                         <when value="no">
                         </when>
                     </conditional>
-                    <expand macro="protein_prophet" minprob="@PROTP_MINPROB@"/>
+                    <expand macro="protein_prophet" protp_minprob="@PROTP_MINPROB@"/>
                     <expand macro="phi_report"/>
                 </when>
                 <when value="false">
@@ -514,25 +635,34 @@
 
     <!-- Set validation workflow options -->
     <token name="@VALIDATION@"><![CDATA[
-        #set $prfx = $wf.validation.validation_tab.psm_validation
-        #if $prfx.run_psm_validation == 'peptide_prophet'
-            #set $wfdict['run-psm-validation'] = 'true'
-            #set $wfdict['msbooster.run-msbooster'] = 'false'
-            #set $wfdict['percolator.run-percolator'] = 'false'
-            @PEPTIDEPROPHET@
-        #elif $prfx.run_psm_validation == 'percolator'
-            #set $wfdict['run-psm-validation'] = 'true'
+        #if $wf.validation.validation_tab.run_validation == "true"
+            #set $prfx = $wf.validation.validation_tab.psm_validation
+            #if $prfx.run_psm_validation == 'peptide_prophet'
+                #set $wfdict['run-psm-validation'] = 'true'
+                #set $wfdict['msbooster.run-msbooster'] = 'false'
+                #set $wfdict['percolator.run-percolator'] = 'false'
+                @PEPTIDEPROPHET@
+            #elif $prfx.run_psm_validation == 'percolator'
+                #set $wfdict['run-psm-validation'] = 'true'
+                #set $wfdict['msbooster.run-msbooster'] = 'false'
+                #set $wfdict['peptide-prophet.run-peptide-prophet'] = 'false'
+                @PERCOLATOR@
+            #elif $prfx.run_psm_validation == 'msbooster_percolator'
+                #set $wfdict['run-psm-validation'] = 'true'
+                #set $wfdict['peptide-prophet.run-peptide-prophet'] = 'false'
+                @MSBOOSTER@
+                @PERCOLATOR@
+            #end if
+            @PROTEINPROPHET@
+            @PHIREPORT@
+        #else
+            #set $wfdict['run-psm-validation'] = 'false'
             #set $wfdict['msbooster.run-msbooster'] = 'false'
             #set $wfdict['peptide-prophet.run-peptide-prophet'] = 'false'
-            @PERCOLATOR@
-        #elif $prfx.run_psm_validation == 'msbooster_percolator'
-            #set $wfdict['run-psm-validation'] = 'true'
-            #set $wfdict['peptide-prophet.run-peptide-prophet'] = 'false'
-            @MSBOOSTER@
-            @PERCOLATOR@
+            #set $wfdict['percolator.run-percolator'] = 'false'
+            #set $wfdict['protein-prophet.run-protein-prophet'] = 'false'
+            #set $wfdict['phi-report.run-report'] = 'false'
         #end if
-        @PROTEINPROPHET@
-        @PHIREPORT@
     ]]></token>
 
     <!-- PTM-Sheperd options -->
@@ -597,7 +727,6 @@
                             <option value="z" selected="@Z@">z</option>
                         </param>
                         <param name="spectra_maxfragcharge" type="integer" value="" min="0" optional="true" label="Max fragment charge" help="ptmshepherd.spectra_maxfragcharge"/>
-                        <param name="localization_background" type="integer" value="" min="0" optional="true" label="Localization background" help="ptmshepherd.localization_background"/>
                         <param name="localization_allowed_res" type="select" label="Restrict localization to" help="ptmshepherd.localization_allowed_res">
                             <option value="" selected="true">none</option>
                             <option value="all">all</option>
@@ -628,14 +757,14 @@
                 #set $wfdict['ptmshepherd.histo_smoothbins'] = $cxt.histo_smoothbins
             #end if
             #if $cxt.precursor_tol != ''
-                #set $wfdict['ptmshepherd.precursor_mass_units'] = $ctx.precursor_mass_units
+                #set $wfdict['ptmshepherd.precursor_mass_units'] = $cxt.precursor_mass_units
                 #set $wfdict['ptmshepherd.precursor_tol'] = $cxt.precursor_tol
             #end if
             #if $cxt.peakpicking_promRatio != ''
                 #set $wfdict['ptmshepherd.peakpicking_promRatio'] = $cxt.peakpicking_promRatio
             #end if
             #if $cxt.peakpicking_width != ''
-                #set $wfdict['ptmshepherd.peakpicking_mass_units'] = $ctx.peakpicking_mass_units
+                #set $wfdict['ptmshepherd.peakpicking_mass_units'] = $cxt.peakpicking_mass_units
                 #set $wfdict['ptmshepherd.peakpicking_width'] = $cxt.peakpicking_width
             #end if
             #if $cxt.peakpicking_minPsm != ''
@@ -696,9 +825,6 @@
             #if $cxt.spectra_maxfragcharge != ''
                 #set $wfdict['ptmshepherd.spectra_maxfragcharge'] = $cxt.spectra_maxfragcharge
             #end if
-            #if $cxt.localization_background != ''
-                #set $wfdict['ptmshepherd.localization_background'] = $cxt.localization_background
-            #end if
             #set $wfdict['ptmshepherd.localization_allowed_res'] = $cxt.localization_allowed_res
         #else
             #set $wfdict['ptmshepherd.run-shepherd'] = 'false'
@@ -715,10 +841,94 @@
                 <param name="label_free_quantification_run" type="select" label="Perform Label-Free Quantification">
                     <option value="default" selected="true">Use workflow default</option>
                     <option value="no">No Label-Free Quantification</option>
+                    <option value="ionquant">Run IonQuant</option>
                     <option value="freequant">Run FreeQuant</option>
                 </param>
                 <when value="default"/>
                 <when value="no"/>
+                <when value="ionquant">
+                    <section name="ionquant" expanded="false" title="IonQuant Label-Free Quantification">
+                        <param name="mbr_select" type="select" optional="true" label="Match between runs (MBR)" help="ionquant.mbr">
+                            <option value="0">No</option>
+                            <option value="1">Yes</option>
+                        </param>
+                        <param name="normalization" type="select" optional="true" label="Normalize" help="ionquant.normalization">
+                            <option value="0">No</option>
+                            <option value="1">Yes</option>
+                        </param>
+                        <section name="feature_detection" expanded="false" title="Feature detection">
+                            <param name="mztol" type="integer" value="" optional="true" label="m/z tolerance in ppm" help="ionquant.mztol (default 10)"/>
+                            <param name="rttol" type="float" value="" optional="true" label="RT tolerance (minutes)" help="ionquant.rttol (default 0.4)"/>
+                            <param name="imtol" type="float" value="" optional="true" label="IM tolerance (1/k0)" help="ionquant.imtol (default 0.05)"/>
+                        </section>
+                        <section name="mbr" expanded="false" title="Match between runs (MBR)">
+                            <param name="mbrrttol" type="float" value="" optional="true" label="MBR RT tolerance (minutes)" help="ionquant.mbrrttol"/>
+                            <param name="mbrimtol" type="float" value="" optional="true" label="MBR IM tolerance (1/k0)" help="ionquant.mbrimtol"/>
+                            <param name="mbrmincorr" type="float" value="" optional="true" label="MBR min correlation" help="ionquant.mbrmincorr"/>
+                            <param name="mbrtoprun" type="integer" value="" optional="true" label="MBR top runs" help="ionquant.mbrtoprun"/>
+                            <param name="ionfdr" type="float" value="" min="0.00001" max="1.0" optional="true" label="MBR ion FDR" help="ionquant.ionfdr"/>
+                            <param name="peptidefdr" type="float" value="" min="0.00001" max="1.0" optional="true" label="MBR peptide FDR" help="ionquant.peptidefdr"/>
+                            <param name="proteinfdr" type="float" value="" min="0.00001" max="1.0" optional="true" label="MBR protein FDR" help="ionquant.proteinfdr"/>
+                        </section>
+                        <section name="topn" expanded="false" title="Top-N options">
+                            <param name="tp" type="integer" value="" min="0" optional="true" label="Top N ions" help="ionquant.tp"/>
+                            <param name="minfreq" type="float" value="" min="0.0" max="1.0" optional="true" label="Min freq" help="ionquant.minfreq"/>
+                        </section>
+                        <conditional name="labeling_conditional">
+                            <param name="labeling_option" type="select" label="Labeling option">
+                              <option value="lfq" selected="true">LFQ</option>
+                              <option value="labeling">Labeling</option>
+                            </param>
+                            <when value="lfq">
+                              <section name="lfq" expanded="false" title="LFQ">
+                                <param name="maxlfq" type="select" optional="true" label="MaxLFQ" help="ionquant.maxlfq">
+                                    <option value="0">No</option>
+                                    <option value="1">Yes</option>
+                                </param>
+                                <param name="minions" type="integer" value="" optional="true" label="Min ions" help="ionquant.minions"/>
+                              </section>
+                            </when>
+                            <when value="labeling">
+                              <section name="labeling" expanded="false" title="Labeling-based quant">
+                                  <param name="light" type="select" label="Light" help="ionquant.light">
+                                      <option value="" selected="true">none</option>
+                                      <option value="C463.2366">C463.2366</option>
+                                      <option value="C464.28596">C464.28596</option>
+                                      <option value="C561.3387">C561.3387</option>
+                                      <option value="K0;R0">K0;R0</option>
+                                  </param>
+                                  <param name="medium" type="select" label="Medium" help="ionquant.medium">
+                                      <option value="" selected="true">none</option>
+                                      <option value="K4.025107;R6.020129">K4.025107;R6.020129</option>
+                                  </param>
+                                  <param name="heavy" type="select" label="Heavy" help="ionquant.heavy">
+                                      <option value="" selected="true">none</option>
+                                      <option value="C467.2529">C467.2529</option>
+                                      <option value="C470.29977">C470.29977</option>
+                                      <option value="C567.3462">C567.3462</option>
+                                      <option value="K8.014199;R10.008269">K8.014199;R10.008269</option>
+                                  </param>
+                                  <param name="requantify" type="select" label="Re-quantify" help="ionquant.requantify">
+                                      <option value="0">No</option>
+                                      <option value="1" selected="true">Yes</option>
+                                  </param>
+                              </section>
+                            </when>
+                        </conditional>
+                        <section name="advanced" expanded="false" title="Advanced options">
+                            <param name="excludemods" type="text" optional="true" label="excludemods" help="ionquant.excludemods">
+                                <validator type="regex">^\s*@RE_EXCLUDEMODS@\s*$</validator>
+                            </param>
+                            <param name="minscans" type="integer" value="" min="0" optional="true" label="Min scans" help="ionquant.minscans"/>
+                            <param name="minisotopes" type="integer" value="" min="1" max="3" optional="true" label="Min isotopes" help="ionquant.minisotopes"/>
+                            <param name="locprob" type="float" value="" min="0.0" max="1.0" optional="true" label="Min site probability" help="ionquant.locprob"/>
+                            <param name="writeindex" type="select" optional="true" label="Write index" help="ionquant.writeindex">
+                                <option value="0">No</option>
+                                <option value="1">Yes</option>
+                            </param>
+                        </section>
+                    </section>
+                </when>
                 <when value="freequant">
                     <section name="freequant" expanded="false" title="IonQuant Label-Free Quantification">
                         <param name="rt_tol" type="float" value="" min="0" optional="true" label="RT Window (minutes)"/>
@@ -734,8 +944,96 @@
         #set $prfx = $wf.quant_ms1.label_free_quantification
         #if $prfx.label_free_quantification_run == 'no'
             #set $wfdict['quantitation.run-label-free-quant'] = 'false'
+            #set $wfdict['ionquant.run-ionquant'] = 'false'
+            #set $wfdict['freequant.run-freequant'] = 'false'
+        #elif $prfx.label_free_quantification_run == 'ionquant'
+            #set $wfdict['quantitation.run-label-free-quant'] = 'true'
+            #set $wfdict['ionquant.run-ionquant'] = 'true'
+            #set $wfdict['freequant.run-freequant'] = 'false'
+            #set $cxt = $prfx.ionquant
+            #if $cxt.mbr_select != 'None'
+                #set $wfdict['ionquant.mbr'] = $cxt.mbr_select
+            #end if
+            #if $cxt.normalization != 'None'
+                #set $wfdict['ionquant.normalization'] = $cxt.normalization
+            #end if
+            #set $cxt = $prfx.ionquant.feature_detection
+            #if $cxt.mztol != ''
+                #set $wfdict['ionquant.mztol'] = $cxt.mztol
+            #end if
+            #if $cxt.rttol != ''
+                #set $wfdict['ionquant.rttol'] = $cxt.rttol
+            #end if
+            #if $cxt.imtol != ''
+                #set $wfdict['ionquant.imtol'] = $cxt.imtol
+            #end if
+            #set $cxt = $prfx.ionquant.mbr
+            #if $cxt.mbrrttol != ''
+                #set $wfdict['ionquant.mbrrttol'] = $cxt.mbrrttol
+            #end if
+            #if $cxt.mbrimtol != ''
+                #set $wfdict['ionquant.mbrimtol'] = $cxt.mbrimtol
+            #end if
+            #if $cxt.mbrmincorr != ''
+                #set $wfdict['ionquant.mbrmincorr'] = $cxt.mbrmincorr
+            #end if
+            #if $cxt.mbrtoprun != ''
+                #set $wfdict['ionquant.mbrtoprun'] = $cxt.mbrtoprun
+            #end if
+            #if $cxt.ionfdr != ''
+                #set $wfdict['ionquant.ionfdr'] = $cxt.ionfdr
+            #end if
+            #if $cxt.peptidefdr != ''
+                #set $wfdict['ionquant.peptidefdr'] = $cxt.peptidefdr
+            #end if
+            #if $cxt.proteinfdr != ''
+                #set $wfdict['ionquant.proteinfdr'] = $cxt.proteinfdr
+            #end if
+            #set $cxt = $prfx.ionquant.topn
+            #if $cxt.tp != ''
+                #set $wfdict['ionquant.tp'] = $cxt.tp
+            #end if
+            #if $cxt.minfreq != ''
+                #set $wfdict['ionquant.minfreq'] = $cxt.minfreq
+            #end if
+            #set $cxt = $prfx.ionquant.labeling_conditional
+            #if $cxt.labeling_option == 'labeling'
+                #set $cxt = $prfx.ionquant.labeling_conditional.labeling
+                #set $wfdict['ionquant.use-labeling'] = 'true'
+                #set $wfdict['ionquant.use-lfq'] = 'false'
+                #set $wfdict['ionquant.light'] = $cxt.light
+                #set $wfdict['ionquant.medium'] = $cxt.medium
+                #set $wfdict['ionquant.heavy'] = $cxt.heavy
+                #set $wfdict['ionquant.requantify'] = $cxt.requantify
+            #else
+                #set $cxt = $prfx.ionquant.labeling_conditional.lfq
+                #set $wfdict['ionquant.use-labeling'] = 'false'
+                #set $wfdict['ionquant.use-lfq'] = 'true'
+                #if $cxt.maxlfq != 'None'
+                    #set $wfdict['ionquant.maxlfq'] = $cxt.maxlfq
+                #end if
+                #if $cxt.minions != ''
+                    #set $wfdict['ionquant.minions'] = $cxt.minions
+                #end if
+            #end if
+            #set $cxt = $prfx.ionquant.advanced
+            #if $cxt.excludemods != ''
+                #set $wfdict['ionquant.excludemods'] = $cxt.excludemods
+            #end if
+            #if $cxt.minscans != ''
+                #set $wfdict['ionquant.minscans'] = $cxt.minscans
+            #end if
+            #if $cxt.minisotopes != ''
+                #set $wfdict['ionquant.minisotopes'] = $cxt.minisotopes
+            #end if
+            #if $cxt.locprob != ''
+                #set $wfdict['ionquant.locprob'] = $cxt.locprob
+            #end if
+            #if $cxt.writeindex != 'None'
+                #set $wfdict['ionquant.writeindex'] = $cxt.writeindex
+            #end if
         #elif $prfx.label_free_quantification_run == 'freequant'
-            #set $wfdict['quantitation.run-label-free-quant'] = 'false'
+            #set $wfdict['quantitation.run-label-free-quant'] = 'true'
             #set $wfdict['ionquant.run-ionquant'] = 'false'
             #set $wfdict['freequant.run-freequant'] = 'true'
             #set $cxt = $prfx.freequant
@@ -796,9 +1094,11 @@
                         <conditional name="glycan_conditional">
                             <param name="use_glycan_composition" type="select" label="Perform Isobaric Quantification">
                                 <option value="default">Use workflow defaults</option>
+                                <option value="no">no</option>
                                 <option value="yes">yes</option>
                             </param>
                             <when value="default"/>
+                            <when value="no"/>
                             <when value="yes">
                               <param name="mod_tag" type="select" optional="true" label="PTM Mod tag">
                                   <option value="none">none</option>
@@ -885,7 +1185,6 @@
             #set $wfdict['tmtintegrator.run-tmtintegrator'] = 'false'
         #elif $prfx.isobaric_quantification_step == 'yes'
             #set $wfdict['tmtintegrator.run-tmtintegrator'] = 'true'
-            #set $wfdict['tmtintegrator.dont-run-fq-lq'] = 'false'
             #set $cxt = $prfx.options
             #set $wfdict['tmtintegrator.quant_level'] = $cxt.quant_level
             #set $wfdict['tmtintegrator.channel_num'] = $cxt.channel_num
@@ -895,14 +1194,17 @@
                 #set $wfdict['tmtintegrator.add_Ref'] = 1
                 #set $wfdict['tmtintegrator.ref_tag'] = $cxt.ref_tag
             #end if
-            #if $cxt.groupby != ''
+            #if $cxt.groupby != 'None'
                 #set $wfdict['tmtintegrator.groupby'] = $cxt.groupby
             #end if
             #set $wfdict['tmtintegrator.log2transformed'] = $cxt.log2transformed
             #if $cxt.prot_norm != 'None'
                 #set $wfdict['tmtintegrator.prot_norm'] = $cxt.prot_norm
             #end if
-            #if $cxt.glycan_conditional.use_glycan_composition == 'yes'
+            #if $cxt.glycan_conditional.use_glycan_composition == 'no'
+                #set $wfdict['tmtintegrator.use_glycan_composition'] = 'false'
+            #elif $cxt.glycan_conditional.use_glycan_composition == 'yes'
+                #set $wfdict['tmtintegrator.use_glycan_composition'] = 'true'
                 #if $cxt.glycan_conditional.mod_tag != 'None'
                     #set $wfdict['tmtintegrator.mod_tag'] = $cxt.glycan_conditional.mod_tag
                 #end if
@@ -970,18 +1272,110 @@
         #end if
     ]]></token>
 
+    <xml name="dia_pseuedo_ms2" token_expand="false" token_yes="false" token_no="true">
+        <section name="dia_pseudo" expanded="@EXPAND@" title="DIA Pseudo MS2">
+            <conditional name="diatracer">
+                <param name="diatracer_step" type="select" label="Run diaTracer">
+                    <option value="default">Use workflow defaults</option>
+                    <option value="yes" selected="@YES@">yes</option>
+                    <option value="no" selected="@NO@">no</option>
+                </param>
+                <when value="default"/>
+                <when value="no"/>
+                <when value="yes">
+                    <section name="options" expanded="true" title="diaPASEF Spectrum Deconvolution">
+                        <param name="corr_threshold" type="float" value="0.3" label="Corr Threshold"/>
+                        <param name="delta_apex_im" type="float" value="0.01" label="Delta Apex IM"/>
+                        <param name="delta_apex_rt" type="integer" value="3" label="Delta Apex RT"/>
+                        <param name="rf_max" type="integer" value="500" label="RF max" />
+                        <param name="mass_defect_offset" type="float" value="0.1" label="Mass Defect Offset"/>
+                        <param name="mass_defect_filter" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Mass Defect Filter"/>
+                    </section>
+                </when>
+            </conditional>
+        </section>
+    </xml>
+    <token name="@DIA_PSEUDO_MS2@"><![CDATA[
+#set $prfx = $wf.dia_pseudo.diatracer
+#if $prfx.diatracer_step == 'no'
+  #set $wfdict['diatracer.run-diatracer'] = 'false'
+#elif $prfx.diatracer_step == 'yes'
+  #set $wfdict['diatracer.run-diatracer'] = 'true'
+  #set $cxt = $prfx.options
+  #set $wfdict['diatracer.corr-threshold'] = $cxt.corr_threshold
+  #set $wfdict['diatracer.delta-apex-im'] = $cxt.delta_apex_im
+  #set $wfdict['diatracer.delta-apex-rt'] = $cxt.delta_apex_rt
+  #set $wfdict['diatracer.rf-max'] = $cxt.rf_max
+  #set $wfdict['diatracer.mass-defect-offset'] = $cxt.mass_defect_offset
+  #set $wfdict['diatracer.mass-defect-filter'] = $cxt.mass_defect_filter
+#end if
+]]></token>
+
+    <xml name="diann_quantification" token_expand="false" token_yes="true" token_no="false">
+        <section name="quant_dia" expanded="@EXPAND@" title="Quant (DIA)">
+            <conditional name="diann_quantification">
+                <param name="diann_quantification_step" type="select" label="Perform DIA Quantification with DIA-NN">
+                    <option value="default">Use workflow defaults</option>
+                    <option value="yes" selected="@YES@">yes</option>
+                    <option value="no" selected="@NO@">no</option>
+                </param>
+                <when value="default"/>
+                <when value="no"/>
+                <when value="yes">
+                    <section name="options" expanded="true" title="Isobaric Quantification">
+                        <param name="qvalue" type="float" value="0.01" min="0.0" max="1.0" optional="true" label="Precursor FDR" help="default 0.01"/>
+                        <param name="generate_msstats" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Generate MSStats input"/>
+                        <param name="unrelated_runs" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Unrelated runs"/>
+                        <param name="use_predicted_spectra" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Replace library spectra with predicted"/>
+                        <param name="library" type="data" format="csv,tsv,xls,txt,binary" optional="true" label="Spectral Library"/>
+                        <param name="quantification_strategy" type="select" optional="true" label="Quantification strategy" help="default: Robust LC (high precision)">
+                            <option value="0">Any LC (high accuracy)</option>
+                            <option value="1">Any LC (high precision)</option>
+                            <option value="2">Robust LC (high accuracy)</option>
+                            <option value="3">Robust LC (high precision)</option>
+                        </param>
+                    </section>
+                </when>
+            </conditional>
+        </section>
+    </xml>
+    <token name="@DIANN_QUANTIFICATION@"><![CDATA[
+#set $prfx = $wf.quant_dia.diann_quantification
+#if $prfx.diann_quantification_step == 'no'
+  #set $wfdict['diann.run-dia-nn'] = 'false'
+#elif $prfx.diann_quantification_step == 'yes'
+  #set $wfdict['diann.run-dia-nn'] = 'true'
+  #set $cxt = $prfx.options
+  #if $cxt.qvalue != ''
+    #set $wfdict['diann.q-value'] = $cxt.qvalue
+  #end if
+  #set $wfdict['diann.generate-msstats'] = $cxt.generate_msstats
+  #set $wfdict['diann.unrelated-runs'] = $cxt.unrelated_runs
+  #set $wfdict['diann.use-predicted-spectra'] = $cxt.use_predicted_spectra
+  #if $cxt.quantification_strategy != ''
+    #set $wfdict['diann.quantification-strategy'] = $cxt.quantification_strategy
+  #end if
+  #if $cxt.library
+    ln -s '$cxt.library' './diann_lib.speclib'
+    #set $wfdict['diann.library'] = 'diann_lib.speclib'
+  #end if
+#end if
+]]></token>
+
+
+
     <!-- License agreement texts. -->
     <token name="@MSFRAGGER_LICENSE_AGREEMENT@">
-MSFragger is available freely for academic research and educational purposes only. I have read the ACADEMIC license for MSFragger software: http://msfragger-upgrader.nesvilab.org/upgrader/MSFragger-LICENSE.pdf. This license provides with non-exclusive, non-transferable right to use MSFragger solely for academic research, non-commercial or educational purposes. I agree to be subject to the terms and conditions of this license. I understand that to use MSFragger for other purposes requires a commercial license from the University of Michigan Office of Tech Transfer.
+MSFragger is available freely for academic research and educational purposes only. I have read the ACADEMIC license for MSFragger software: http://msfragger-upgrader.nesvilab.org/upgrader/LICENSE-ACADEMIC.pdf. This license provides with non-exclusive, non-transferable right to use MSFragger solely for academic research, non-commercial or educational purposes. I agree to be subject to the terms and conditions of this license. I understand that to use MSFragger for other purposes requires a commercial license from the University of Michigan Office of Tech Transfer.
     </token>
     <token name="@IONQUANT_LICENSE_AGREEMENT@">
-IonQuant is available freely for academic research and educational purposes only. I have read the ACADEMIC license for MSFragger software: https://msfragger.arsci.com/ionquant/IonQuant%20Academic%20Use%20License%2005162022.pdf
+IonQuant is available freely for academic research and educational purposes only. I have read the ACADEMIC license for MSFragger software: https://msfragger-upgrader.nesvilab.org/ionquant/LICENSE-ACADEMIC.pdf
     </token>
     <token name="@THERMO_RAW_READER_LICENSE_AGREEMENT@">
 I agree to the terms of Thermo (c) Raw File Reader License Agreement: http://msfragger-upgrader.nesvilab.org/upgrader/RawFileRdr_License_Agreement_RevA.pdf
     </token>
     <token name="@BRUKER_LICENSE_AGREEMENT@">
-I agree to the terms of Bruker SDK library distribution conditions: http://msfragger-upgrader.nesvilab.org/upgrader/redist.txt
+I agree to the terms of Bruker SDK library distribution conditions: http://msfragger-upgrader.nesvilab.org/upgrader/EULA%20TDF-SDK.pdf
     </token>
     <token name="@LICENSE_AGREEMENTS@">
 @MSFRAGGER_LICENSE_AGREEMENT@