view searchgui.xml @ 27:70dade9fb8e3 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/peptideshaker commit 9cae80c2ab1d6c933382cd8584e2d51f3c3d305b-dirty
author galaxyp
date Fri, 20 May 2016 14:06:55 -0400
parents 3ef5a7dd1a36
children 432140bcc7fe
line wrap: on
line source

<tool id="search_gui" name="Search GUI" version="@SEARCHGUI_VERSION@.0">
    <description>
        Perform protein identification using various search engines and prepare results for input to Peptide Shaker
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="@SEARCHGUI_VERSION@">searchgui</requirement>
        <environment_variable name="LC_ALL" action="set_to">C</environment_variable>        
    </requirements>
    <expand macro="stdio" />
    <command>
<![CDATA[
        #from datetime import datetime
        #set $exp_str = "Galaxy_Experiment_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
        #set $samp_str = "Sample_%s" % datetime.now().strftime("%Y%m%d%H%M%s")
        #set $temp_stderr = "searchgui_stderr"

        mkdir output;
        mkdir output_reports;
        cwd=`pwd`;
        export HOME=\$cwd;

        ##Create a searchgui.properties file for the version, which will be added to the searchgui_results if not already present
        echo "searchgui.version=@SEARCHGUI_VERSION@" >> searchgui.properties;

        cp -r "\${SEARCHGUI_JAR_PATH%/*}" bin;
        tmp_searchgui_jar_path=`echo "\$cwd/bin/\${SEARCHGUI_JAR_PATH\#\#/*/}"`;

        #for $mgf in $peak_lists:
            #set $input_name = $mgf.display_name.replace(".mgf", "") + ".mgf"
            ln -s -f '${mgf}' '${input_name}';
        #end for
        ##ln -s "${input_database}" input_database.fasta;
        cp "${input_database}" input_database.fasta;

        ###########################################
        ####       Creating decoy database     ####
        ###########################################
        #if $create_decoy:
            echo "Creating decoy database.";
            java -cp \$tmp_searchgui_jar_path eu.isas.searchgui.cmd.FastaCLI -in input_database.fasta -decoy &&
            rm input_database.fasta &&
            cp input_database_concatenated_target_decoy.fasta input_database.fasta &&
            ## ln -sf input_database_concatenated_target_decoy.fasta input_database.fasta;
        #end if

        #####################################################
        ## generate IdentificationParameters for SearchGUI ##
        #####################################################

        (java -cp \$tmp_searchgui_jar_path eu.isas.searchgui.cmd.IdentificationParametersCLI
            -out SEARCHGUI_IdentificationParameters.par

            @GENERAL_PARAMETERS@

            -db input_database.fasta
            $use_gene_mapping

            #if $xtandem.xtandem_advanced == "yes"

                -xtandem_npeaks ${xtandem.xtandem_npeaks}
                -xtandem_min_peaks ${xtandem.xtandem_min_peaks}
                -xtandem_min_frag_mz ${xtandem.xtandem_min_frag_mz}
                -xtandem_min_prec_mass ${xtandem.xtandem_min_prec_mass}
                -xtandem_noise_suppr ${xtandem.xtandem_noise_suppr}
                -xtandem_dynamic_range ${xtandem.xtandem_dynamic_range}
                -xtandem_quick_acetyl ${xtandem.xtandem_quick_acetyl} 
                -xtandem_quick_pyro ${xtandem.xtandem_quick_pyro} 
                -xtandem_stp_bias ${xtandem.xtandem_stp_bias} 
                -xtandem_evalue ${xtandem.xtandem_evalue} 
                -xtandem_output_proteins ${xtandem.xtandem_output_proteins} 
                -xtandem_output_sequences ${xtandem.xtandem_output_sequences} 
                -xtandem_output_spectra ${xtandem.xtandem_output_spectra}
                ## -xtandem_skyline_path ${xtandem.xtandem_skyline_path}

                #if $xtandem.xtandem_refine.xtandem_refine_selector == "yes"
                    -xtandem_refine 1
                    -xtandem_refine_unc ${xtandem.xtandem_refine.xtandem_refine_unc}
                    -xtandem_refine_semi ${xtandem.xtandem_refine.xtandem_refine_semi}
                    -xtandem_refine_p_mut ${xtandem.xtandem_refine.xtandem_refine_p_mut}
                    -xtandem_refine_snaps ${xtandem.xtandem_refine.xtandem_refine_snaps}
                    -xtandem_refine_spec_synt ${xtandem.xtandem_refine.xtandem_refine_spec_synt}
                    -xtandem_refine_pot ${xtandem.xtandem_refine.xtandem_refine_pot}
                    -xtandem_refine_pot ${xtandem.xtandem_refine.xtandem_refine_evalue}
                    
                #end if
            #else 
                -xtandem_output_spectra 1
            #end if

            #if $omssa.omssa_advanced == "yes"
                -omssa_hitlist_length ${omssa.hitlist_length}
                -omssa_remove_prec ${omssa.remove_precursor}
                -omssa_scale_prec ${omssa.scale_precursor}
                -omssa_estimate_charge ${omssa.estimate_charge}

                -omssa_memory ${omssa.omssa_memory}
                -omssa_isotopes ${omssa.omssa_isotopes} 
                -omssa_neutron ${omssa.omssa_neutron} 
                -omssa_low_intensity "${omssa.omssa_low_intensity}" 
                -omssa_high_intensity ${omssa.omssa_high_intensity} 
                -omssa_intensity_incr ${omssa.omssa_intensity_incr} 
                -omssa_single_window_wd ${omssa.omssa_single_window_wd} 
                -omssa_double_window_wd ${omssa.omssa_double_window_wd} 
                -omssa_single_window_pk ${omssa.omssa_single_window_pk} 
                -omssa_double_window_pk ${omssa.omssa_double_window_pk} 
                -omssa_min_ann_int_pks ${omssa.omssa_min_ann_int_pks} 
                -omssa_min_annotated_peaks ${omssa.omssa_min_annotated_peaks} 
                -omssa_min_peaks ${omssa.omssa_min_peaks} 
                -omssa_methionine ${omssa.omssa_methionine} 
                -omssa_max_ladders ${omssa.omssa_max_ladders} 
                -omssa_max_frag_charge ${omssa.omssa_max_frag_charge} 
                -omssa_fraction ${omssa.omssa_fraction} 
                -omssa_plus_one ${omssa.omssa_plus_one} 
                -omssa_charge ${omssa.omssa_charge} 
                -omssa_prec_per_spectrum ${omssa.omssa_prec_per_spectrum} 
                -omssa_forward ${omssa.omssa_forward} 
                -omssa_rewind ${omssa.omssa_rewind} 
                -omssa_max_frag_series ${omssa.omssa_max_frag_series} 
                -omssa_corr ${omssa.omssa_corr} 
                -omssa_consecutive_p ${omssa.omssa_consecutive_p} 
                -omssa_it_sequence_evalue ${omssa.omssa_it_sequence_evalue} 
                -omssa_it_spectrum_evalue ${omssa.omssa_it_spectrum_evalue} 
                -omssa_it_replace_evalue ${omssa.omssa_it_replace_evalue} 
                -omssa_max_evalue ${omssa.omssa_max_evalue} 
                -omssa_hitlist_charge ${omssa.omssa_hitlist_charge} 
                -omssa_min_pep_length ${omssa.omssa_min_pep_length} 
                -omssa_max_pep_length ${omssa.omssa_max_pep_length} 
                -omssa_format ${omssa.omssa_format}   
            #end if

            #if $msgf.msgf_advanced == "yes"
                -msgf_decoy ${msgf.msgf_decoy}
                -msgf_min_pep_length ${msgf.msgf_min_pep_length}
                -msgf_max_pep_length ${msgf.msgf_max_pep_length}
                -msgf_termini ${msgf.msgf_termini}
                -msgf_num_ptms ${msgf.msgf_num_ptms}
                -msgf_instrument ${msgf.msgf_instrument} 
                -msgf_fragmentation ${msgf.msgf_fragmentation}
                -msgf_protocol ${msgf.msgf_protocol} 
                -msgf_num_matches ${msgf.msgf_num_matches} 
                -msgf_additional ${msgf.msgf_additional} 
                -msgf_isotope_low ${msgf.msgf_isotope_low} 
                -msgf_isotope_high ${msgf.msgf_isotope_high} 
            #end if
            
            #* Not working in tests
            #if $ms_amanda.ms_amanda_advanced == "yes"
                 -ms_amanda_decoy ${ms_amanda.ms_amanda_decoy}
                 -ms_amanda_max_evalue ${ms_amanda.ms_amanda_max_evalue}
                 -ms_amanda_instrument ${ms_amanda.ms_amanda_instrument} 
                 -ms_amanda_max_rank ${ms_amanda.ms_amanda_max_rank} 
                 -ms_amanda_mono ${ms_amanda.ms_amanda_mono}
            #end if
            *#
            
            #* Not working in tests
            #if $myrimatch.myrimatch_advanced == "yes"
                -myrimatch_min_pep_length ${myrimatch.myrimatch_min_pep_length}
                -myrimatch_max_pep_length ${myrimatch.myrimatch_max_pep_length}
                -myrimatch_min_prec_mass ${myrimatch.myrimatch_min_prec_mass}
                -myrimatch_max_prec_mass ${myrimatch.myrimatch_max_prec_mass}
                -myrimatch_isotope_low ${myrimatch.myrimatch_isotope_low}
                -myrimatch_isotope_high ${myrimatch.myrimatch_isotope_high}
                -myrimatch_num_matches ${myrimatch.myrimatch_num_matches}
                -myrimatch_num_ptms ${myrimatch.myrimatch_num_ptms}
                -myrimatch_fragmentation ${myrimatch.myrimatch_fragmentation}
                -myrimatch_termini ${myrimatch.myrimatch_termini}
                -myrimatch_plus_three ${myrimatch.myrimatch_plus_three}
                -myrimatch_xcorr ${myrimatch.myrimatch_xcorr}
                -myrimatch_tic_cutoff ${myrimatch.myrimatch_tic_cutoff}
                -myrimatch_intensity_classes ${myrimatch.myrimatch_intensity_classes}
                -myrimatch_class_multiplier ${myrimatch.myrimatch_class_multiplier}
                -myrimatch_num_batches ${myrimatch.myrimatch_num_batches}
                -myrimatch_max_peak ${myrimatch.myrimatch_max_peak}                    
            #end if
            *#

            #* Not working in tests
            #if $andromeda.andromeda_advanced == "yes"
                -andromeda_max_pep_mass ${andromeda.andromeda_max_pep_mass}
                -andromeda_max_comb ${andromeda.andromeda_max_comb}
                -andromeda_top_peaks ${andromeda.andromeda_top_peaks}
                -andromeda_top_peaks_window ${andromeda.andromeda_top_peaks_window}
                -andromeda_incl_water ${andromeda.andromeda_incl_water}
                -andromeda_incl_ammonia ${andromeda.andromeda_incl_ammonia}
                -andromeda_neutral_losses ${andromeda.andromeda_neutral_losses}
                -andromeda_fragment_all ${andromeda.andromeda_fragment_all}
                -andromeda_emp_correction ${andromeda.andromeda_emp_correction}
                -andromeda_higher_charge ${andromeda.andromeda_higher_charge}
                -andromeda_equal_il ${andromeda.andromeda_equal_il}
                -andromeda_frag_method ${andromeda.andromeda_frag_method}
                -andromeda_max_mods ${andromeda.andromeda_max_mods}
                -andromeda_min_pep_length ${andromeda.andromeda_min_pep_length}
                -andromeda_max_pep_length ${andromeda.andromeda_max_pep_length}
                -andromeda_max_psms ${andromeda.andromeda_max_psms}
            #end if
            *#
 
            #* Not working in tests
            #if $tide.tide_advanced == "yes"
                -tide_num_ptms ${tide.tide_num_ptms}
                -tide_num_ptms_per_type ${tide.tide_num_ptms_per_type}
                -tide_min_pep_length ${tide.tide_min_pep_length}
                -tide_max_pep_length ${tide.tide_max_pep_length}
                -tide_min_prec_mass ${tide.tide_min_prec_mass}
                -tide_max_prec_mass ${tide.tide_max_prec_mass}
                -tide_decoy_format ${tide.tide_decoy_format}
                -tide_keep_terminals ${tide.tide_keep_terminals}
            
                -tide_output_folder ${tide.tide_output_folder}
                -tide_print_peptides ${tide.tide_print_peptides}
                -tide_verbosity ${tide.tide_verbosity}
                -tide_monoisotopic ${tide.tide_monoisotopic}
                -tide_clip_n_term ${tide.tide_clip_n_term}
                -tide_digestion_type ${tide.tide_digestion_type}
                -tide_compute_sp ${tide.tide_compute_sp}
                -tide_max_psms ${tide.tide_max_psms}
                -tide_compute_p ${tide.tide_compute_p}
                -tide_min_spectrum_mz ${tide.tide_min_spectrum_mz}
                -tide_max_spectrum_mz ${tide.tide_max_spectrum_mz}
                -tide_min_spectrum_peaks ${tide.tide_min_spectrum_peaks}
                -tide_spectrum_charges ${tide.tide_spectrum_charges}
                -tide_remove_prec ${tide.tide_remove_prec}
                -tide_remove_prec_tol ${tide.tide_remove_prec_tol}
                -tide_progress_indicator ${tide.tide_progress_indicator}
                -tide_use_flanking ${tide.tide_use_flanking}
                -tide_use_neutral_losses ${tide.tide_use_neutral_losses}
                -tide_mz_bin_width ${tide.tide_mz_bin_width}
                -tide_mz_bin_offset ${tide.tide_mz_bin_offset}
                -tide_concat ${tide.tide_concat}
                -tide_export_text ${tide.tide_export_text}
                -tide_export_sqt ${tide.tide_export_sqt}
                -tide_export_pepxml ${tide.tide_export_pepxml}
                -tide_export_mzid ${tide.tide_export_mzid}
                -tide_export_pin ${tide.tide_export_pin}
                -tide_remove_temp ${tide.tide_remove_temp}
            #end if
            *#

            #if $comet.comet_advanced == "yes"

                #if $comet.comet_spectrum.comet_spectrum_selector == "yes"
                    -comet_min_peaks ${comet.comet_spectrum.comet_min_peaks}
                    -comet_min_peak_int ${comet.comet_spectrum.comet_min_peak_int}
                    -comet_remove_prec ${comet.comet_spectrum.comet_remove_prec}


                     #if $comet.comet_spectrum.comet_remove_prec == "1"
                        -comet_remove_prec_tol ${comet.comet_spectrum.comet_remove_prec_tol}
                     #end if
                     
                     #if $comet.comet_spectrum.comet_remove_prec == "2"
                        -comet_remove_prec_tol ${comet.comet_spectrum.comet_remove_prec_tol}
                     #end if
                     
                    -comet_clear_mz_range_lower ${comet.comet_spectrum.comet_clear_mz_range_lower}
                    -comet_clear_mz_range_upper ${comet.comet_spectrum.comet_clear_mz_range_upper}
                #end if

                #if $comet.comet_search.comet_search_selector == "yes"
                    -comet_enzyme_type ${comet.comet_search.comet_enzyme_type}
                    -comet_isotope_correction ${comet.comet_search.comet_isotope_correction}
                    -comet_min_prec_mass ${comet.comet_search.comet_min_prec_mass}
                    -comet_max_prec_mass ${comet.comet_search.comet_max_prec_mass}
                    -comet_num_matches ${comet.comet_search.comet_num_matches}
                    -comet_max_frag_charge ${comet.comet_search.comet_max_frag_charge}
                    -comet_remove_meth ${comet.comet_search.comet_remove_meth}
                    -comet_batch_size ${comet.comet_search.comet_batch_size}
                    -comet_num_ptms ${comet.comet_search.comet_num_ptms}
                #end if

                #if $comet.comet_fragment_ions.comet_fragment_ions_selector == "yes"
                    -comet_frag_bin_offset ${comet.comet_fragment_ions.comet_frag_bin_offset}
                    -comet_sparse_matrix ${comet.comet_fragment_ions.comet_sparse_matrix}
                    -comet_theoretical_fragment_ions ${comet.comet_fragment_ions.comet_theoretical_fragment_ions}
                #end if
            #end if

        2> $temp_stderr)
        &&

        ################
        ## Search CLI ##
        ################
        (java -Djava.awt.headless=true -cp \$tmp_searchgui_jar_path eu.isas.searchgui.cmd.SearchCLI 
            -temp_folder `pwd`
            -spectrum_files \$cwd
            -output_folder \$cwd/output
            -id_params SEARCHGUI_IdentificationParameters.par

            -threads "\${GALAXY_SLOTS:-12}"

            #if $searchgui_advanced.searchgui_advanced_selector == 'advanced'
                -correct_titles "${searchgui_advanced.correct_titles}"
                $searchgui_advanced.missing_titles
                -mgf_splitting "${searchgui_advanced.mgf_splitting}"
                -mgf_spectrum_count "${searchgui_advanced.mgf_spectrum_count}"
            #end if

            ## Turn of the protein tree generation as it can produce errors if the search is finished before the tree is created
            ## the tree is generated afterwards in PeptideShaker
            ## -protein_index 0

            ##-makeblastdb_folder \$BLAST_ROOT_DIR

            #set $engines_list = str($engines).split(',')
            #if 'X!Tandem' in $engines_list:
                -xtandem 1
            #else
                -xtandem 0
            #end if

            #if 'MyriMatch' in $engines_list:
                -myrimatch 1
            #else
                -myrimatch 0
            #end if

            #if 'MSGF' in $engines_list:
                -msgf 1
            #else
                -msgf 0
            #end if

            #if 'OMSSA' in $engines_list:
                -omssa 1
            #else
                -omssa 0
            #end if

            #if 'Comet' in $engines_list:
                -comet 1
            #else
                -comet 0
            #end if

            #if 'Tide' in $engines_list:
                -tide 1
            #else
                -tide 0
            #end if

            #if 'MS_Amanda' in $engines_list:
                -ms_amanda 1
            #else
                -ms_amanda 0
            #end if

            #if 'Andromeda' in $engines_list:
                -andromeda 1
            #else
                -andromeda 0
            #end if

            ## single zip file
            -output_option 0

            ## mgf and database in output
            -output_data 1

        2>> $temp_stderr)

        &&

        (mv output/searchgui_out.zip searchgui_out.zip 2>> $temp_stderr)

        &&

        (zip -u searchgui_out.zip searchgui.properties 2>> $temp_stderr);

        exit_code_for_galaxy=\$?;
        cat $temp_stderr 2>&1;
        (exit \$exit_code_for_galaxy)
]]>
    </command>
    <inputs>

        <param format="fasta" name="input_database" type="data" label="Protein Database"
            help="Select FASTA database from history"/>

        <param name="create_decoy" type="boolean" truevalue="True" falsevalue="False" checked="true"
            label="Create a concatenated target/decoy database before running PeptideShaker"
            help="Selecting this option will help PeptideShaker calculate FDR values" />

        <param name="use_gene_mapping" type="boolean" truevalue="-useGeneMapping 1" falsevalue="-useGeneMapping 0" checked="false"
            label="gene mappings will be used and saved along with the project (UniProt databases only)"
            help="This should only be enabled for UniProt databaases" />

        <param name="peak_lists" format="mgf" type="data" multiple="true" label="Input Peak Lists (mgf)"
            help="Select appropriate MGF dataset(s) from history" />

        <!-- Search Engine Selection -->
        <param name="engines" type="select" display="checkboxes" multiple="True" label="DB-Search Engines">
            <help>Comet and Tide shouldn't both be selected since they use a similar algoritm.</help>
            <option value="X!Tandem" selected="True">X!Tandem</option>
            <!-- Not working in tests
            <option value="MyriMatch">MyriMatch</option> 
            <option value="MS_Amanda">MS_Amanda</option>
            -->
            <option value="MSGF" selected="True">MS-GF+</option>
            <option value="OMSSA" selected="True">OMSSA</option>
            <option value="Comet">Comet</option>
            <!-- Not working in tests
            <option value="Tide">Tide</option>
            -->
            <!-- Windows only
            <option value="Andromeda">Andromeda</option>
            -->
            <validator type="no_options" message="Please select at least one output file" />
        </param>


        <!-- General Parameters -->
        <expand macro="general_options"/>

        <!-- Optional Advanced SearchGUI Parameters -->
        <conditional name="searchgui_advanced">
            <param name="searchgui_advanced_selector" type="select" label="SearchGUI Options">
                <option value="basic" selected="True">Default</option>
                <option value="advanced">Advanced</option>
            </param>
            <when value="basic" />
            <when value="advanced">
            <param name="correct_titles" type="select" label="How should PeptideShaker deal with duplicate spectra?"
                help="Unless you suspect some input files to be genuine duplicates then rename spectra is the safest option">
                <option value="0">no correction</option>
                <option value="1" selected="True">rename spectra</option>
                <option value="2">delete spectra</option>
            </param>

            <param name="missing_titles" type="boolean" checked="false" truevalue="-missing_titles 1" falsevalue="-missing_titles 0"
                label="Add missing spectrum titles" help="(-missing_titles)"/>

            <param name="mgf_splitting" type="integer" value="1000" label="The maximum mgf file size in MB before splitting the mgf"
                help="Choose a smaller value if you are running on a machine with limited memory"/>

            <param name="mgf_spectrum_count" type="integer" value="25000" label="The maximum number of spectra per mgf file when splitting"
                help="Choose a smaller value if you are running on a machine with limited memory"/>
        </when>
        </conditional>


        <!-- X!TANDEM ADVANCED PARAMETERS -->
        <conditional name="xtandem">
            <param name="xtandem_advanced" type="select" label="X!Tandem Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="xtandem_npeaks" type="integer" value="50" 
                    label="X!Tandem: Total Peaks" help="Maximum number of peaks to be used from a spectrum"/>
                <param name="xtandem_min_peaks" type="integer" value="15" 
                    label="X!Tandem: Min Peaks" help="Minimum number of peaks required for a spectrum to be considered"/>
                <param name="xtandem_min_frag_mz" type="integer" value="200" 
                    label="X!Tandem: Min Frag m/z" help="Fragment mass peaks with m/z less than this value will be discarded"/>
                <param name="xtandem_min_prec_mass" type="integer" value="200" 
                    label="X!Tandem: Min Precursor Mass" help="Minimum mass of 1+ mass of parent ion to be considered"/>
                <param name="xtandem_noise_suppr" type="boolean" checked="true" truevalue="1" falsevalue="0"
                    label="X!Tandem: Noise Suppression" help="Use noise suppression"/>
                <param name="xtandem_dynamic_range" help="Sets the dynamic range for scoring spectra"
                    label="X!Tandem: Dynamic Range" value="100" type="integer" />
                <param name="xtandem_quick_acetyl" help="Protein N-terminal modification detection"
                    label="X!Tandem: Quick Acetyl" type="boolean" truevalue="1" falsevalue="0" checked="true" />
                <param name="xtandem_quick_pyro" help="Peptide N-terminus cyclization detection"
                    label="X!Tandem: Quick Pyrolidone" type="boolean" truevalue="1" falsevalue="0" checked="true" /> 
                <param name="xtandem_stp_bias" help="Interpretation of peptide phosphorylation models"
                    label="X!Tandem: Protein stP Bias" type="boolean" truevalue="1" falsevalue="0" checked="false" /> 
                <param name="xtandem_evalue" help="Highest value for recorded peptides"
                    label="X!Tandem: Maximum Valid Expectation Value" type="float" value="100" />
                <param name="xtandem_output_proteins" help="Controls output of protein sequences"
                    label="X!Tandem: Output Proteins" type="boolean" truevalue="1" falsevalue="0" checked="false" />
                <param name="xtandem_output_sequences" help="Controls output of sequence information"
                    label="X!Tandem: Output Sequences" type="boolean" truevalue="1" falsevalue="0" checked="false" />
                <param name="xtandem_output_spectra" help="Controls output of spectrum information"
                    label="X!Tandem: Output Spectra" type="boolean" truevalue="1" falsevalue="0" checked="true" />
                <!-- <param name="xtandem_skyline_path" label="X!Tandem 'spectrum, skyline path'" type="text" help="Path to a spectrum data file for use by skyline." -->
                    
                <conditional name="xtandem_refine"><!-- -xtandem_refine -->
                    <param name="xtandem_refine_selector" type="select" label="X!Tandem peptide model refinement">
                        <option value="no" selected="True">Don't refine</option>
                        <option value="yes" >Use refinement</option>
                    </param>
                    <when value="no"/>
                    <when value="yes">
                        <param name="xtandem_refine_unc" type="boolean" truevalue="1" falsevalue="0" checked="true"
                            label="X!Tandem: Unanticipated cleavage, refinement" help="Allow for unanticipated cleavage during refinement"/>
                        <param name="xtandem_refine_semi" type="boolean" truevalue="1" falsevalue="0" checked="false"
                            label="X!Tandem: Cleavage semi, refinement" help="Search for semi-tryptic peptides during refinement"/>
                        <param name="xtandem_refine_p_mut" type="boolean" truevalue="1" falsevalue="0" checked="false"
                            label="X!Tandem: Point mutations, refinement" help="Allow for point mutations during refinement"/>
                        <param name="xtandem_refine_snaps" type="boolean" truevalue="1" falsevalue="0" checked="true"
                            label="X!Tandem: snAPs, refinement" help="Search for known single amino acid polymorphisms during refinement"/>
                        <param name="xtandem_refine_spec_synt" type="boolean" truevalue="1" falsevalue="0" checked="true"
                            label="X!Tandem: Spectrum synthesis, refinement" help="Use spectrum synthesis scoring"/>
                        <param name="xtandem_refine_pot" type="boolean" truevalue="1" falsevalue="0" checked="false"
                            label="X!Tandem: Use potential modifications, refinement" help="Controls the use of refinement modifications in all refinement modules."/>
                        <param name="xtandem_refine_evalue" help="Highest value for recorded peptides during refinement"
                            label="X!Tandem: Maximum Valid Expectation Value, refinement" type="float" value="0.01" />
                    </when>
                </conditional>
            </when>
        </conditional>

        <!-- OMSSA ADVANCED PARAMETERS -->
        <conditional name="omssa">
            <param name="omssa_advanced" type="select" label="OMSSA Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="hitlist_length" label="OMSSA: Hit List Length" type="integer" value="25" />
                <param name="remove_precursor" label="OMSSA: Remove Precurosr" type="boolean" truevalue="1" falsevalue="0" checked="true"/>
                <param name="scale_precursor" label="OMSSA: Scale Precursor Mass" type="boolean" truevalue="1" falsevalue="0" checked="false"/>
                <param name="estimate_charge" label="OMSSA: Estimate Charge" type="boolean" truevalue="1" falsevalue="0" checked="true" />
                
                <param name="omssa_memory" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="OMSSA: Map Sequences in Memory" help="Use memory mapped sequence libraries" />
                  <!-- param name="omssa_isotopes" type="integer" value="0" 
                      label="OMSSA: Number of Isotopes" help="Number of isotopes to use (integer), 0 implies monoisotopic (default)" / -->
                   <param name="omssa_neutron" type="float" value="1446.94" 
                       label="OMSSA: Neutron Mass" help="Mass after which OMSSA should consider neutron exact mass" />
                <param name="omssa_low_intensity" type="float" value="0.0" 
                    label="OMSSA: Low Intensity Cutoff" help="Low intensity cutoff as a fraction of max peak" />
                <param name="omssa_high_intensity" type="float" value="0.2" 
                    label="OMSSA: High Intensity Cutoff" help="High intensity cutoff as a fraction of max peak" />
                   <param name="omssa_intensity_incr" type="float" value="0.0005" 
                       label="OMSSA: Intensity Increment" help="Intensity increment" />
                <param name="omssa_single_window_wd" type="integer" value="27" 
                    label="OMSSA: Single Charge Window Width" help="Single charge window width in Da (integer)" />
                <param name="omssa_double_window_wd" type="integer" value="14" 
                    label="OMSSA: Double Charge Window Width" help="OMSSA double charge window width in Da (integer)" />
                <param name="omssa_single_window_pk" type="integer" value="2" 
                    label="OMSSA: Single Charge Window Peaks" help="Minimum number of peaks in single charge window (integer)" />
                <param name="omssa_double_window_pk" type="integer" value="2" 
                    label="OMSSA: Double Charge Window Peaks" help="Minimum number of peaks in double charge window (integer)" />
                <param name="omssa_min_ann_int_pks" type="integer" value="6" 
                    label="OMSSA: Minimum Number of Annotated Peaks of Intense Ones" help="Minimum number of annotated peaks among the most intense ones" />
                <param name="omssa_min_annotated_peaks" type="integer" value="2" 
                    label="OMSSA: Minimum number of Annotated Peaks" help="Minimum number of annotated peaks" />
                   <param name="omssa_min_peaks" type="integer" value="4" 
                       label="OMSSA: Minimum Peak Count" help="The minimum number of m/z values a spectrum must have to be searched" />
                <param name="omssa_methionine" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="OMSSA: Cleave n-term Methionine" help="Allow for N-terminal methionine cleavage" />
                <param name="omssa_max_ladders" type="integer" value="128" 
                    label="OMSSA: Maximum Number of m/z Ladders" help="The maximum number of mass ladders to generate per database peptide" />
                <param name="omssa_max_frag_charge" type="integer" value="2" 
                    label="OMSSA: Maximum Fragment Charge" help="Maximum fragment charge" />
                <param name="omssa_fraction" type="float" value="0.95" 
                    label="OMSSA: Fraction of Peaks to estimate Charge 1" help="fraction of peaks to estimate charge 1" />
                <param name="omssa_plus_one" type="boolean" truevalue="1" falsevalue="0" checked="true" 
                    label="OMSSA: Estimate Plus One Charge" help="Allow OMSSA to estimate plus one charge algorithmically"/>
                <param name="omssa_charge" type="select" 
                    label="OMSSA: Fragment Charge" help="OMSSA fragment charge option" >
                    <option value="0" >Minus</option>
                    <option value="1" selected="True">Plus</option>
                </param>
                <param name="omssa_prec_per_spectrum" type="integer" value="1" 
                    label="OMSSA: Minimum Number of Precursors per Spectrum" help="Minimum number of precursors per spectrum" />
                <param name="omssa_forward" type="boolean" truevalue="1" falsevalue="0" checked="true" 
                    label="OMSSA: Include First Forward Ion (b1) in Search" help="Allow OMSSA to include first forward ion (b1) in search" />
                <param name="omssa_rewind" type="boolean" truevalue="1" falsevalue="0" checked="true"  
                    label="OMSSA: Search Rewind" help="Allow search rewind (C-terminal) ions" />
                <param name="omssa_max_frag_series" type="integer" value="100" 
                    label="OMSSA: Maximum Fragment per Series" help="Max number of fragments ions ions in each series being searched" />
                <param name="omssa_corr" type="boolean" truevalue="1" falsevalue="0" checked="true" 
                    label="OMSSA: Use Correlation Correction" help="Allow the use correlation correction score" />
                <param name="omssa_consecutive_p" type="float" value="0.5" 
                    label="OMSSA: Consecutive Ion Probability" help="Probability of consecutive ion (used in correlation correction)" />
                <param name="omssa_it_sequence_evalue" type="float" value="0.0" 
                    label="OMSSA: Sequence e-value Cutoff" help="The maximum e-value allowed to consider a sequence in the iterative search(0.0 means all)" />
                <param name="omssa_it_spectrum_evalue" type="float" value="0.01" 
                    label="OMSSA: Spectrum e-value Cutoff" help="The maximum e-value allowed to consider a spectrum in the iterative search(0.0 means all)" />
                <param name="omssa_it_replace_evalue" type="float" value="0.01" 
                    label="OMSSA: Replace e-value cutoff" help="The maximum e-value allowed to replace a hit in the iterative search(0.0 means all)" />
                <param name="omssa_remove_prec" type="boolean" truevalue="1" falsevalue="0" checked="true" 
                    label="OMSSA: Remove Precursor" help="Remove precursors" />
                <param name="omssa_scale_prec" type="boolean" truevalue="1" falsevalue="0" checked="false"  
                    label="OMSSA: Scale Precursor Mass" help="scale precursor mass" />
                <param name="omssa_estimate_charge" type="boolean" truevalue="1" falsevalue="0" checked="true"  
                    label="OMSSA: Remove Precursor" help="Remove precursors" />
                <param name="omssa_max_evalue" type="float" value="100" 
                    label="OMSSA: Maximal evalue Considered" help="The maximum e-value considered" />
                <param name="omssa_remove_prec" type="boolean" truevalue="1" falsevalue="0" checked="true"  
                    label="OMSSA: Estimate Precursor Charge" help="Allow estimation of precursor charge" />
                <param name="omssa_it_replace_evalue" type="float" value="100" 
                    label="OMSSA: Maximal evalue" help="The maximum OMSSA e-value considered" />
                <param name="omssa_hitlist_length" type="integer" value="0" 
                    label="OMSSA: Hitlist Length" help="OMSSA hitlist length, 0 means all" />
                <param name="omssa_hitlist_charge" type="integer" value="30" 
                    label="OMSSA: Number of Hits per Spectrum per Charge" help="number of hits per spectrum per charge" />
                <param name="omssa_min_pep_length" type="integer" value="4" 
                    label="OMSSA: Minumum Peptide Length" help="Minimum length of peptides for no-enzyme and semi-tryptic searches" />
                <param name="omssa_max_pep_length" type="integer" value="40" 
                    label="OMSSA: Maximum Peptide Length" help="Maximum length of peptides for no-enzyme and semi-tryptic searches (0: none)" />
                <param name="omssa_format" label="OMSSA output format" type="select" >
                    <option value="0" selected="True">OMX</option>
                    <option value="1" >CSV</option>
                </param>
            </when>
        </conditional>

        <!-- MS-GF+ ADVANCED PARAMETERS -->
        <conditional name="msgf">
            <param name="msgf_advanced" type="select" label="MSGF Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="msgf_decoy" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="MSGF: Search Decoys" help="If yes then a decoy database will be generated and searched. Assumed input database contains no decoys"/>
                <param name="msgf_min_pep_length" type="integer" value="6"
                    label="MSGF: Minimum Peptide Length" help="Minimum length for a peptide to be considered"/>
                <param name="msgf_max_pep_length" type="integer" value="30" 
                    label="MSGF: Maximum Peptide Length" help="Maximum length for a peptide to be considered"/>
                <param name="msgf_termini" type="select" format="text" 
                    label="MSGF: Number of tolerable termini" help="Searches will take much longer if selecting a value other than 2">
                    <option value="0">0 (ie non-specific cleavage)</option>
                    <option value="1">1 (ie semi-tryptic cleavage)</option>
                    <option value="2" selected="true">2 (ie fully-tryptic cleavage)</option>
                </param>
                <param name="msgf_num_ptms" label="MSGF: Max PTMs per peptide" type="integer" value="2"/>
                
                <param name="msgf_instrument" label="MSGF: Instrument type" type="select" help="Identifier of the instrument to generate MS/MS spectra (used to determine the scoring model)">
                    <option value="0" selected="True">Low-res LCQ/LTQ</option>
                    <option value="1" >High-res LTQ</option>
                    <option value="2" >TOF</option>
                    <option value="3" >Q-Exactive</option>
                </param>
                <param name="msgf_fragmentation" label="MSGF: Fragmentation type" type="select" help="Fragmentation method identifier (used to determine the scoring model)">
                    <option value="0" selected="True">As written in the spectrum or CID if no info</option>
                    <option value="1" >CID</option>
                    <option value="2" >ETD</option>
                    <option value="3" >HCD</option>
                </param>
                <param name="msgf_protocol" label="MSGF: Protocol type" type="select" help="Protocol identifier. Protocols are used to enable scoring parameters for enriched and/or labeled samples">
                    <option value="0" selected="True">Automatic</option>
                    <option value="1" >Phosphorylation</option>
                    <option value="2" >iTRAQ</option>
                    <option value="3" >iTRAQPhospho</option>
                    <option value="4" >TMT</option>
                    <option value="5" >Standard</option>
                </param>
                <param name="msgf_num_matches" label="MSGF: Maximum Number of Spectrum Matches" type="integer" value="1" help="Number of peptide matches per spectrum to report" />
                <param name="msgf_additional" label="MS-GF+ additional features" type="select" help="Additional features to export">
                    <option value="0" selected="True">output basic scores only</option>
                    <option value="1" >output additional features</option>
                </param>
                <param name="msgf_isotope_low" label="MSGF: Lower Isotope Error Range" type="integer" value="0" help="Lower isotope error range" />
                <param name="msgf_isotope_high" label="MSGF: Upper Isotope Error Range" type="integer" value="1" help="Upper isotope errror range" /> 
            </when>
        </conditional>

          <!-- MS-AMANDA ADVANCED PARAMETERS  -->
        <!-- Not working in tests
        <conditional name="ms_amanda">
            <param name="ms_amanda_advanced" type="select" label="MS Amanda Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="ms_amanda_decoy"  type="boolean" truevalue="1" falsevalue="0" checked="false" 
                    label="MS Amanda: Generate Decoys" help="generate decoys" />
                <param name="ms_amanda_max_evalue" type="float" value="100" 
                    label="MS Amanda: Maximal Evalue" help="MS Amanda maximal evalue considered" />
                <param name="ms_amanda_instrument" label="MS Amanda: instrument" type="float" value="100" help="MS Amanda instrument id option. Available enzymes are listed in the GUI. (Note: case sensitive.)." />
                <param name="ms_amanda_max_rank" type="integer" value="5" 
                    label="MS Amanda: Maximum Rank" help="MS Amanda maximum rank" />
                <param name="ms_amanda_mono" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="MS Amanda: Use Monoisotopic Mass Values" help="MS Amanda use monoisotopic mass values" />
            </when>
        </conditional>
        -->


        <!-- TIDE ADVANCED PARAMETERS -->
        <!-- Not working in tests
        <conditional name="tide">
            <param name="tide_advanced" type="select" label="TIDE Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="tide_num_ptms" type="integer" value="100"
                    label="TIDE: Maximum Number of PTMs" help="Set the maximum number of PTMs on peptide to be considered"/>
                <param name="tide_num_ptms_per_type" type="integer" value="2"
                    label="TIDE: Maximum Number of PTMs of each Type" help="Set the maximum number of PTMs of each type to be considered"/>
                <param name="tide_min_pep_length" type="integer" value="6"
                    label="TIDE: Minimum Peptide Length" help="Set the minimum length of peptide to be considered"/>
                <param name="tide_max_pep_length" type="integer" value="30"
                    label="TIDE: Maximum Peptide Length" help="Set the maximum length of peptide to be considered"/>
                <param name="tide_min_prec_mass" type="float" value="200.0"
                    label="TIDE: Minimum Precursor Mass" help="Set the minimum precursor mass to be considered"/>
                <param name="tide_max_prec_mass" type="float" value="7200.0"
                    label="TIDE: Maximum Precursor Mass" help="Set the maximum precursor mass to be considered"/>
                <param name="tide_decoy_format" label="TIDE: Decoy Format" type="select" help="Select the format for generating the decoy sequences">
                    <option value="none" selected="True">none</option>
                    <option value="shuffle" >shuffle</option>
                    <option value="peptide-revers" >peptide-reverse</option>
                    <option value="protein-reverse" >protein-reverse</option>
                </param>
                <param name="tide_keep_terminals" label="TIDE: Keep Terminals" type="select" help="Select to keep the terminal amino acids when creating decoys">
                    <option value="N" >N</option>
                    <option value="C" >C</option>
                    <option value="NC" selected="True">NC</option>
                    <option value="non" >none</option>
                </param>
                <param name="tide_decoy_seed" type="integer" value="1"
                    label="TIDE: Decoy Seed" help="Set the decoy seed"/>
                <param name="tide_output_folder" type="text" value="crux-output"
                    label="TIDE: Output Folder" help="Set the results output folder (relative to the Tide working folder)"/>
                <param name="tide_print_peptides" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Print Peptides" help="If true, the peptides will be printed in the output"/>
                <param name="tide_verbosity" label="TIDE: Progress Display Verbosity" type="select" help="Select the display verbosity level to report the search progress">
                    <option value="0" >0</option>
                    <option value="10" >10</option>
                    <option value="20" >20</option>
                    <option value="30" selected="True">30</option>
                    <option value="40" >40</option>
                    <option value="50" >50</option>
                    <option value="60" >60</option>
                </param>

                <param name="tide_monoisotopic" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="TIDE: Monoisotopic" help="If true, the precursor mass is monoisotopic"/>
                <param name="tide_clip_n_term" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Clip Nterm Methionine" help="If true, the Nterm Methionine will be clipped"/>
                <param name="tide_digestion_type" label="TIDE: Digestion Type" type="select" help="Either both ends (full-digest) or at least one end (partial-digest) of a peptide must conform to enzyme specificity rules">
                    <option value="full-digest" selected="True">full-digest</option>
                    <option value="partial-digest" >partial-digest</option>
                </param>
                <param name="tide_compute_sp" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Compute SP" help="If true, the SP-score is calculated"/>
                <param name="tide_max_psms" type="integer" value="10"
                    label="TIDE: Maximum Number of PSMs" help="Set the maximum number of PSMs to be considered"/>
                <param name="tide_compute_p" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Compute Exact P-value" help="If true, the exact p-values are calculated"/>
                <param name="tide_min_spectrum_mz" type="float" value="0.0"
                    label="TIDE: Minimum Spectrum m/z" help="Set the minimum spectrum m/z value for a spectrum to be considered"/>
                <param name="tide_max_spectrum_mz" type="float" value="100000.0"
                    label="TIDE: Maximum Spectrum m/z" help="Set the maximum spectrum m/z value for a spectrum to be considered"/>
                <param name="tide_min_spectrum_peaks" type="integer" value="20"
                    label="TIDE: Minimum Spectrum Peaks" help="Set the minimum amount of peaks in a spectrum for it to be considered"/>
                <param name="tide_spectrum_charges" label="TIDE: Spectrum Charges" type="select" help="Select what precursor charges should be taken into account for matching">
                    <option value="1" >1</option>
                    <option value="2" >2</option>
                    <option value="3" >3</option>
                    <option value="all" selected="True">all</option>
                </param>
                <param name="tide_remove_prec" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Remove Precursor" help="If true, the peak that corresponds to the precursor mass is excluded"/>
                <param name="tide_remove_prec_tol" type="float" value="1.5"
                    label="TIDE: Remove Precursor Tolerance" help="Choose the threshold for precursor mass searching (for precursor peak removal)"/>
                <param name="tide_progress_indicator" type="integer" value="1000"
                    label="TIDE: Progress Indicator" help="Choose the progress indicator frequency  (in number of fragmentation spectra processed)"/>
                <param name="tide_use_flanking" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Use Flanking" help="Includes two flanking peaks on either side of each b- and y-ion to compute the XCorr"/>
                <param name="tide_use_neutral_losses" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Neutral Losses" help="Includes fragment peaks with neutral losses to perform the matching"/>
                <param name="tide_mz_bin_width" type="float" value="0.02"
                    label="TIDE: mz Bin Width" help="Choose bin size to analyze the fragmentation spectrum"/>
                <param name="tide_mz_bin_offset" type="float" value="0.0"
                    label="TIDE: mz Bin Offset" help="Choose bin offset to analyze the fragmentation spectrum"/>
                <param name="tide_concat" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Concat Target and Decoy" help="If true, the target results are concatenated with the decoy results"/>
                <param name="tide_export_text" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="TIDE: Export Text" help="If true, a text-formatted output file is exported"/>
                <param name="tide_export_sqt" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Export SQT" help="If true, a sqt-formatted output file is exported"/>
                <param name="tide_export_pepxml" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Export Pepxml" help="If true, a pepxml output file is exported"/>
                <param name="tide_export_mzid" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Export Mzid" help="If true, a mzid output file is exported"/>
                <param name="tide_export_pin" type="boolean" truevalue="1" falsevalue="0" checked="false"
                    label="TIDE: Export Percolator Input File" help="If true, a percolator input file is exported"/>
                <param name="tide_remove_temp" type="boolean" truevalue="1" falsevalue="0" checked="true"
                    label="TIDE: Remove Temp Folders" help="If true, the temp folders are removed when the search is done"/>
            </when>
        </conditional>
        -->

        <!-- MyriMatch ADVANCED PARAMETERS -->
        <!-- Not working in tests
        <conditional name="myrimatch">
            <param name="myrimatch_advanced" type="select" label="MyriMatch Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="myrimatch_min_pep_length"  type="integer" value="6"
                    label="MyriMatch: Minimum Peptide Length" help="Minimum length for a peptide to be considered" />
                <param name="myrimatch_max_pep_length"  type="integer" value="30"
                    label="MyriMatch: Maximum Peptide Length" help="Maximum length for a peptide to be considered" />
                <param name="myrimatch_min_prec_mass"  type="float" value="0.0"
                    label="MyriMatch: Minimum Peptide Mass" help="Minimum 1+ mass of parent ion to be considered" />
                <param name="myrimatch_max_prec_mass"  type="float" value="10000.0"
                    label="MyriMatch: Maximum Peptide Mass" help="Maximum 1+ mass of parent ion to be considered" />
                <param name="myrimatch_isotope_low"  type="integer" value="-1"
                    label="MyriMatch: Lower Isotope Error Range" help="Lower isotope error ragne" />
                <param name="myrimatch_isotope_high"  type="integer" value="2"
                    label="MyriMatch: Upper Isotope Error Range" help="Upper isotope error range" />
                <param name="myrimatch_num_matches"  type="integer" value="10"
                    label="MyriMatch: Maximum Number of Spectrum Matches" help="Set the value for the maximum number of spectrum matches" />
                <param name="myrimatch_num_ptms"  type="integer" value="2"
                    label="MyriMatch: Number of PTMs" help="Set the number of PTMS allowed per peptide" />
                <param name="myrimatch_fragmentation" label="MyriMatch: Fragmentation Method" type="select" help="Choose the fragmentation method used (CID: b,y) or (ETD: c, z*)">
                    <option value="CID" selected="True">CID</option>
                    <option value="ETD" >ETD</option>
                </param>
                <param name="myrimatch_termini" label="MyriMatch: Number of Enzymatic Termini" type="select" help="Select the number of enzymatic termini">
                    <option value="0">non-tryptic</option>
                    <option value="1" >semi-tryptic</option>
                    <option value="2"  selected="True" >fully-tryptic</option>
                </param>
                <param name="myrimatch_plus_three"  type="boolean" truevalue="1" falsevalue="0" checked="true" 
                    label="MyriMatch: Smart Plus Three Option" help="Defines what algorithms are used to generate a set of theoretical fragment ions" />
                <param name="myrimatch_xcorr"  type="boolean" truevalue="1" falsevalue="0" checked="false" 
                    label="MyriMatch: Xcorr Option" help="a Sequest-like cross correlation score can be calculated for the top ranking hits" />                        
                <param name="myrimatch_tic_cutoff"  type="float" value="0.98"
                    label="MyriMatch: TIC cutoff percentage" help="Cumulative ion current of picked peaks divided by TIC >= this value for peaks to be retained" />
                <param name="myrimatch_intensity_classes"  type="integer" value="3"
                    label="MyriMatch: Number of Intensity Classes" help="Experimental spectra have their peaks stratified into this number of intensity classed" />
                <param name="myrimatch_class_multiplier"  type="integer" value="2"
                    label="MyriMatch: Class Multiplier" help="Has to do with previous option, this parameter controls the size of each class relative to the class above" />
                <param name="myrimatch_num_batches"  type="integer" value="50"
                    label="MyriMatch: Number of Batches" help="The number of batches per node to strive for when usinge the MPI-based parallelization features" />
                <param name="myrimatch_max_peak"  type="integer" value="100"
                    label="MyriMatch: Maximum Peak Count" help="Maximum number of peaks to be used from a spectrum" />
            </when>
        </conditional>
        -->

        <!-- Andromeda ADVANCED PARAMETERS -->
        <!-- Windows only
        <conditional name="andromeda">
            <param name="andromeda_advanced" type="select" label="Andromeda Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param name="andromeda_max_pep_mass" type="float" value="4600.0" label="Andromeda maximum peptide mass, default is: 4600.0" />
                <param name="andromeda_max_comb" type="integer" value="250" label="Andromeda maximum combinations, default is: 250" />
                <param name="andromeda_top_peaks" type="integer" value="8" label="Andromeda number of top peaks, default is: 8" />
                <param name="andromeda_top_peaks_window" type="integer" value="100" label="Andromeda top peaks window width, default is: 100" />
                <param name="andromeda_incl_water" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Andromeda account for water losses, default is: true" />
                <param name="andromeda_incl_ammonia" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Andromeda account for ammonina losses, default is: true" />
                <param name="andromeda_neutral_losses" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Andromeda neutral losses are sequence dependent, default is: true" />
                <param name="andromeda_fragment_all" type="boolean" truevalue="1" falsevalue="0" checked="false" label="Andromeda fragment all option, default is: false" />
                <param name="andromeda_emp_correction" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Andromeda emperical correction, default is: true" />
                <param name="andromeda_higher_charge" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Andromeda higher charge option, default is: true" />
                <param name="andromeda_equal_il" type="boolean" truevalue="1" falsevalue="0" checked="false" label="Andromeda whether I and L should be considered indistinguishable, default is: false" />
                <param name="andromeda_frag_method" type="select" value="" label="Andromeda fragmentation method, (HCD, CID or EDT), default is: CID." >
                   <option value="CID" selected="true">CID</option>
                   <option value="HCD">HCD</option>
                   <option value="EDT">EDT</option>
                </param>
                <param name="andromeda_max_mods" type="integer" value="5" label="Andromeda maximum number of modifications, default is: 5" />
                <param name="andromeda_min_pep_length" type="integer" value="8" label="Andromeda minimum peptide length when using no enzyme, default is: 8" />
                <param name="andromeda_max_pep_length" type="integer" value="25" label="Andromeda maximum peptide length when using no enzyme, default is: 25" />
                <param name="andromeda_max_psms" type="integer" value="10" label="Andromeda maximum number of spectrum matches spectrum, default is: 10" />
            </when>
        </conditional>
        -->

        <!-- Comet ADVANCED PARAMETERS -->
        <conditional name="comet">
            <param name="comet_advanced" type="select" label="Comet Options">
                <option value="yes">Advanced</option>
                <option value="no" selected="True">Default</option>
            </param>
            <when value="no" />
            <when value="yes">
                <!-- Spectrum Related parameters -->
                <conditional name="comet_spectrum">
                    <param name="comet_spectrum_selector" type="select" label="Comet: Spectrum Related">
                        <option value="yes">Set Spectrum Parameters</option>
                        <option value="no" selected="True">Keep Default Spectrum Parameters</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="comet_min_peaks"  type="integer" value="10"
                            label="Comet: Minimum Number of Peaks per Spectrum" help="The minimum number of peaks per spectrum" />
                        <param name="comet_min_peak_int"  type="float" value="0.0"
                            label="Comet: Minimum Peaks Intensity" help="The minimum intensity for input peaks to be considered" />
                        <param name="comet_remove_prec" label="Comet: Remove Precursor" type="select" help="Select for precursor m/z signal removal">
                            <option value="0"  selected="True" >off</option>
                            <option value="1">on</option>
                            <option value="2">as expected for ETD/ECD spectra</option>
                        </param>
                        <when value="0" />
                        <when value="1">
                            <param name="comet_remove_prec_tol"  type="float" value="1.5"
                                label="Comet: Remove Precursor Tolerance" />
                        </when>
                        <when value="2">
                            <param name="comet_remove_prec_tol"  type="float" value="1.5"
                                label="Comet: Remove Precursor Tolerance" />
                        </when>
                        <param name="comet_clear_mz_range_lower"  type="float" value="0.0"
                            label="Comet: Minimum Peaks Intensity" help="Intended for iTRAQ/TMT type data where one might want to remove the reporter ion signals, lower m/z range" />
                        <param name="comet_clear_mz_range_upper"  type="float" value="0.0"
                            label="Comet: Maximum Peaks Intensity" help="Intended for iTRAQ/TMT type data where one might want to remove the reporter ion signals, upper m/z range" />    
                    </when>
                </conditional>
                  <!-- Search Related parameters -->
                <conditional name="comet_search">
                    <param name="comet_search_selector" type="select" label="Comet: Search Related">
                        <option value="yes">Set Search Parameters</option>
                        <option value="no" selected="True">Keep Default Search Parameters</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="comet_enzyme_type" label="Comet: Enzyme Type" type="select" help="Specifies the number of enzyme termini a peptide must have">
                            <option value="1">semi-specific</option>
                            <option value="2" selected="True">full-enzyme</option>
                            <option value="8">unspecific N-term</option>
                            <option value="9">unspecific C-term</option>
                        </param>
                        <param name="comet_isotope_correction" label="Comet: Isotope Correction" type="select" help="Controls whether the peptide_mass_tolerance takes into account possible isotope errors in the precursor mass measurement">
                            <option value="0" selected="True">off</option>
                            <option value="1">-1,0,+1,+2,+3</option>
                            <option value="2">-8,-4,0,+4,+8</option>
                        </param>
                        <param name="comet_min_prec_mass"  type="float" value="0.0"
                            label="Comet: Minimum Precursor Mass" help="The minimum precursor mass considered" />
                        <param name="comet_max_prec_mass"  type="float" value="10000.0"
                            label="Comet: Maximum Precursor Mass" help="The maximum precursor mass considered" />
                        <param name="comet_num_matches"  type="integer" value="10"
                            label="Comet: Maximum Number of Matches" help="The maximum number of peptide matches per spectrum" />
                        <param name="comet_max_frag_charge"  type="integer" value="3"
                            label="Comet: Maximum Fragment Charge" help="Sets the maximum fragment charge (fill value between 1 and 5)" />
                        <param name="comet_remove_meth"  type="boolean" truevalue="1" falsevalue="0" checked="false" 
                            label="Comet: Remove Methionine" help="Specifies whether the N-terminal methionine is cleaved prior to matching" />
                        <param name="comet_batch_size"  type="integer" value="0"
                            label="Comet: Batch Size" help="0 means load and search all spectra at once, otherwise spectra are loaded and searched in batches of the number specified" />
                        <param name="comet_num_ptms"  type="integer" value="10"
                            label="Comet: Maximum Number of PTMs" help="The maximum number of ptms per peptide" />    
                    </when>
                </conditional>
                <!-- Fragment Ions Related parameters -->
                <conditional name="comet_fragment_ions">
                    <param name="comet_fragment_ions_selector" type="select" label="Comet: Fragment Ions Related">
                        <option value="yes">Set Fragment Ions Parameters</option>
                        <option value="no" selected="True">Keep Default Fragment Ions Parameters</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param name="comet_frag_bin_offset"  type="float" value="0.4"
                            label="Comet: Fragment Bin Offset" help="Controls how each fragment bin is defined in terms of where each bin starts" />
                        <param name="comet_sparse_matrix" type="boolean" truevalue="1" falsevalue="0" checked="true" 
                            label="Comet: Fragment Sparse Matrix" help="Controls whether or not internal sparse matrix data representation is used to lower memory usage" />
                        <param name="comet_theoretical_fragment_ions"  type="integer" value="0"
                            label="Comet: Theoretical Fragment Ions" help="Specifies how theoretical fragment ion peaks are represented (0 or 1 values are allowed)" />                                
                    </when>
                </conditional>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="searchgui_results" format="searchgui_archive" from_work_dir="searchgui_out.zip" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>

        <!-- Test that specifying non-default search engines works -->
        <test>
            <param name="peak_lists" value="searchgui_tinyspectra1.mgf"/>
            <param name="input_database" value="searchgui_tinydb1.fasta" ftype="fasta"/>
            <param name="precursor_ion_tol" value="100"/>
            <param name="fixed_modifications" value="carbamidomethyl c"/>
            <param name="variable_modifications" value="oxidation of m"/>
            <param name="min_charge" value="1"/>
            <param name="max_charge" value="3"/>
            <param name="engines" value="X!Tandem,MSGF,MyriMatch,OMSSA,Comet"/>
            <param name="xtandem.xtandem_advanced" value="yes"/>
            <param name="xtandem_advanced.xtandem_refine_selector" value="yes"/>

            <output name="output" file="tiny_searchgui_result1.zip" ftype="searchgui_archive" compare="sim_size" delta="600" /> 
        </test>

        <!-- Test that search works with MSAmanda -->
        <test>
            <param name="peak_lists" value="searchgui_tinyspectra1.mgf"/>
            <param name="input_database" value="searchgui_tinydb1.fasta" ftype="fasta"/>
            <param name="precursor_ion_tol" value="100"/>
            <param name="fixed_modifications" value="carbamidomethyl c"/>
            <param name="variable_modifications" value="oxidation of m"/>
            <param name="min_charge" value="1"/>
            <param name="max_charge" value="3"/>
            <param name="engines" value="MS_Amanda"/>

            <output name="output" file="tiny_searchgui_result_amandaonly.zip" ftype="searchgui_archive" compare="sim_size" delta="600" /> 
        </test>


    </tests>
    <help>
**What it does**

Runs multiple search engines on any number of MGF peak lists using the SearchGUI.
Default:     X! Tandem, OMSSA and MS-GF+ are executed.
Optional:     MyriMatch, MS-Amanda, Comet and Tide can be executed.

    </help>
    <expand macro="citations" />
</tool>