view varvamp.xml @ 1:80e18c0836e5 draft

planemo upload for repository https://github.com/jonas-fuchs/varVAMP commit 1626c59de1e3aa8a9ccb8674b38a4654a03ab44b
author iuc
date Fri, 05 Apr 2024 20:15:39 +0000
parents 462e62be07e1
children 33fac436dd54
line wrap: on
line source

<tool id="varvamp" name="varVAMP" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
    <description>design primers for highly diverse viruses</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">varvamp</xref>
    </xrefs>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">varvamp</requirement>
        <requirement type="package" version="2.0.1">primer3-py</requirement>
        <requirement type="package" version="0.7.17">seqfold</requirement>
    </requirements>
    <version_command>varvamp --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
VARVAMP_CONFIG=custom_config varvamp

$mode.m_select
#if $mode.main_params.specify_how in ("set_threshold", "set_both"):
  --threshold $mode.main_params.threshold
#end if
#if $mode.main_params.specify_how in ("set_n_ambig", "set_both"):
  --n-ambig $mode.main_params.n_ambig
  #if $mode.m_select == "qpcr":
    --pn-ambig $mode.main_params.pn_ambig
  #end if
#end if
#if str( $mode.m_select ) == "single":
  --opt-length $mode.opt_length
  --max-length $mode.max_length
  #if $mode.limit_report.choice == "yes":
    --report-n $mode.limit_report.report_n
  #end if
#elif str( $mode.m_select ) == "tiled":
  --opt-length $mode.opt_length
  --max-length $mode.max_length
  --overlap $mode.overlap
#elif str( $mode.m_select ) == "qpcr":
  --test-n $mode.test_n
  --deltaG $mode.deltaG
#end if
#if $mode.filter_blast_hits.choice == "yes":
  --database '${mode.filter_blast_hits.database.extra_files_path}/blastdb'
#end if
--threads \${GALAXY_SLOTS:-1}

'$alignment'
results/

#if $mode.m_select == 'qpcr' and $mode.scheme_outputs and 'primer_seqs' in $mode.scheme_outputs:
  ## make the primer sequences fasta discoverable under the same name that is used in "single" mode
  && mv results/oligos.fasta results/primers.fasta
#end if
#if $mode.m_select == 'tiled' and $mode.scheme_outputs and 'primer_dimers' in $mode.scheme_outputs:
  ## ensure the unsolvable_primer_dimers.tsv file, which varVAMP creates only conditionally, exists in all cases, in which we try to discover it as an output
  && cp -n dimers_fallback.tsv results/unsolvable_primer_dimers.tsv
#end if
    ]]></command>
    <configfiles>
        <configfile filename="custom_config"><![CDATA[#if $mode.advanced_config.customize == "yes":
PRIMER_TMP = ($mode.advanced_config.basic_primer_params.PRIMER_TMP_min, $mode.advanced_config.basic_primer_params.PRIMER_TMP_max, $mode.advanced_config.basic_primer_params.PRIMER_TMP_opt)
PRIMER_GC_RANGE = ($mode.advanced_config.basic_primer_params.PRIMER_GC_RANGE_min, $mode.advanced_config.basic_primer_params.PRIMER_GC_RANGE_max, $mode.advanced_config.basic_primer_params.PRIMER_GC_RANGE_opt)
PRIMER_SIZES = ($mode.advanced_config.basic_primer_params.PRIMER_SIZES_min, $mode.advanced_config.basic_primer_params.PRIMER_SIZES_max, $mode.advanced_config.basic_primer_params.PRIMER_SIZES_opt)
PRIMER_MAX_POLYX = $mode.advanced_config.basic_primer_params.PRIMER_MAX_POLYX
PRIMER_MAX_DINUC_REPEATS = $mode.advanced_config.basic_primer_params.PRIMER_MAX_DINUC_REPEATS
PRIMER_HAIRPIN = $mode.advanced_config.basic_primer_params.PRIMER_HAIRPIN
PRIMER_GC_END = ($mode.advanced_config.basic_primer_params.PRIMER_GC_END_min, $mode.advanced_config.basic_primer_params.PRIMER_GC_END_max)
PRIMER_MIN_3_WITHOUT_AMB = $mode.advanced_config.basic_primer_params.PRIMER_MIN_3_WITHOUT_AMB
PRIMER_MAX_DIMER_TMP = $mode.advanced_config.basic_primer_params.PRIMER_MAX_DIMER_TMP
    #if str($mode.m_select) == "qpcr":
QPROBE_TMP = ($mode.advanced_config.qpcr_params.QPROBE_TMP_min, $mode.advanced_config.qpcr_params.QPROBE_TMP_max, $mode.advanced_config.qpcr_params.QPROBE_TMP_opt)
QPROBE_SIZES = ($mode.advanced_config.qpcr_params.QPROBE_SIZES_min, $mode.advanced_config.qpcr_params.QPROBE_SIZES_max, $mode.advanced_config.qpcr_params.QPROBE_SIZES_opt)
QPROBE_GC_RANGE = ($mode.advanced_config.qpcr_params.QPROBE_GC_RANGE_min, $mode.advanced_config.qpcr_params.QPROBE_GC_RANGE_max, $mode.advanced_config.qpcr_params.QPROBE_GC_RANGE_opt)
QPROBE_GC_END = ($mode.advanced_config.qpcr_params.QPROBE_GC_END_min, $mode.advanced_config.qpcr_params.QPROBE_GC_END_max)
QPRIMER_DIFF = $mode.advanced_config.qpcr_params.QPRIMER_DIFF
QPROBE_TEMP_DIFF = ($mode.advanced_config.qpcr_params.QPROBE_TEMP_DIFF_min, $mode.advanced_config.qpcr_params.QPROBE_TEMP_DIFF_max)
QPROBE_DISTANCE = ($mode.advanced_config.qpcr_params.QPROBE_DISTANCE_min, $mode.advanced_config.qpcr_params.QPROBE_DISTANCE_max)
END_OVERLAP = $mode.advanced_config.qpcr_params.END_OVERLAP
QAMPLICON_LENGTH = ($mode.advanced_config.qpcr_params.QAMPLICON_LENGTH_min, $mode.advanced_config.qpcr_params.QAMPLICON_LENGTH_max)
QAMPLICON_GC = ($mode.advanced_config.qpcr_params.QAMPLICON_GC_min, $mode.advanced_config.qpcr_params.QAMPLICON_GC_max)
QAMPLICON_DEL_CUTOFF =  $mode.advanced_config.qpcr_params.QAMPLICON_DEL_CUTOFF
    #end if
PCR_MV_CONC = $mode.advanced_config.pcr_params.PCR_MV_CONC
PCR_DV_CONC = $mode.advanced_config.pcr_params.PCR_DV_CONC
PCR_DNTP_CONC = $mode.advanced_config.pcr_params.PCR_DNTP_CONC
PCR_DNA_CONC = $mode.advanced_config.pcr_params.PCR_DNA_CONC
PRIMER_TM_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_TM_PENALTY
PRIMER_GC_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_GC_PENALTY
PRIMER_SIZE_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_SIZE_PENALTY
PRIMER_MAX_BASE_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_MAX_BASE_PENALTY
PRIMER_3_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_3_PENALTY
PRIMER_PERMUTATION_PENALTY = $mode.advanced_config.penalty_multipliers.PRIMER_PERMUTATION_PENALTY
  #end if
  #if $mode.filter_blast_hits.choice == "yes":
    #if $mode.filter_blast_hits.blast_advanced_cond.blast_advanced == "yes":
BLAST_SETTINGS = {
    "outfmt": "6 qseqid sseqid qlen length mismatch gapopen sstart send sstrand",
    "evalue": $mode.filter_blast_hits.blast_advanced_cond.blast_params.evalue,
    "reward": $mode.filter_blast_hits.blast_advanced_cond.blast_params.reward,
    "penalty": $mode.filter_blast_hits.blast_advanced_cond.blast_params.penalty,
    "gapopen": $mode.filter_blast_hits.blast_advanced_cond.blast_params.gapopen,
    "gapextend": $mode.filter_blast_hits.blast_advanced_cond.blast_params.gapextend
}
BLAST_MAX_DIFF = $mode.filter_blast_hits.blast_advanced_cond.blast_hits_usage.BLAST_MAX_DIFF
BLAST_SIZE_MULTI = $mode.filter_blast_hits.blast_advanced_cond.blast_hits_usage.BLAST_SIZE_MULTI
BLAST_PENALTY = $mode.filter_blast_hits.blast_advanced_cond.blast_hits_usage.BLAST_PENALTY
    #end if
  #end if
        ]]></configfile>
        <configfile filename="dimers_fallback.tsv"><![CDATA[#set $line = '\t'.join(['pool', 'primer_name_1', 'primer_name_2', 'dimer melting temp'])
$line]]></configfile>
    </configfiles>
    <inputs>
        <param name="alignment" type="data" format="fasta" label="Multiple alignment of viral sequences" />
        <conditional name="mode">
            <param name="m_select" type="select" label="What kind of primers would you like to design? (varvamp mode)">
                <option value="single">Primers for single amplicons (single)</option>
                <option value="tiled">Tiled primer scheme for whole-genome sequencing (tiled)</option>
                <option value="qpcr">qPCR primers (qpcr)</option>
            </param>
            <when value="single">
                <expand macro="main_parameters" />
                <expand macro="amplicon_length_restrictions" />
                <expand macro="blast_options" />
                <conditional name="limit_report">
                    <param name="choice" type="select" label="Limit the number of amplicons to report?">
                        <option value="no">No, report all qualifying amplicons</option>
                        <option value="yes">Yes, set an upper limit on amplicons to be reported</option>
                    </param>
                    <when value="no" />
                    <when value="yes">
                        <param argument="--report-n" type="integer" min="1" value="20" label="Report only the n highest scoring amplicons" />
                    </when>
                </conditional>
                <expand macro="customize_advanced" />
                <expand macro="primer_scheme_outputs">
                    <option value="amplicon_assignment">Primer-to-amplicon assignment in tabular format; lists primers belonging to the same amplicon on one line for simpler automated parsing</option>
                </expand>
                <expand macro="consensus_outputs" />
                <expand macro="graphical_outputs" />
                <expand macro="miscellaneous_outputs">
                    <option value="all_primers">Binding sites of ALL high-scoring primers that were considered in BED format; includes primer penalties (lower is better) as the score column</option>
                </expand>
            </when>
            <when value="tiled">
                <expand macro="main_parameters" />
                <expand macro="amplicon_length_restrictions" />
                <param argument="--overlap" type="integer" min="1" value="100" label="Minimal required overlap between tiled amplicons" help="default: 100" />
                <expand macro="blast_options" />
                <expand macro="customize_advanced" />
                <expand macro="primer_scheme_outputs">
                    <option value="amplicon_assignment" selected="true">Primer-to-amplicon assignment in tabular format; lists primers belonging to the same amplicon on one line; required input for automated primer trimming in some downstream analysis workflows</option>
                    <option value="primer_dimers" selected="true">If any primers in the tiling scheme are predicted to form primer dimers, details about these will be found in this tabular output.</option>
                </expand>
                <expand macro="consensus_outputs" />
                <expand macro="graphical_outputs" />
                <expand macro="miscellaneous_outputs">
                    <option value="all_primers">Binding sites of ALL high-scoring primers that were considered in BED format; includes primer penalties (lower is better) as the score column</option>
                </expand>
            </when>
            <when value="qpcr">
                <expand macro="main_parameters">
                    <param argument="--pn-ambig" type="integer" min="0" value="1" label="Maximum number of ambiguous nucleotides per qPCR probe to be tolerated" help="To enforce specificity of detection, varVAMP will refuse to work if you set this value higher than for the amplicon primers above, and you may actually want to set it slightly lower than that value." />
                </expand>
                <param argument="--test-n" type="integer" min="1" value="50" label="Top n qPCR amplicons to test" help="test the top n qPCR amplicons for secondary structures at the minimal primer temperature. (default: 50)" />
                <param argument="--deltaG" type="integer" value="-3" label="Minimum free energy (kcal/mol/K) cutoff" help="Minimum free energy (kcal/mol/K) cutoff at the lowest primer melting temperature. (default: -3." />
                <expand macro="blast_options" />
                <expand macro="customize_advanced">
                    <section name="qpcr_params" title="Constraints on qPCR probes and amplicons" expanded="false">
                        <!--basic probe parameters-->
                        <param name="QPROBE_TMP_min" type="integer" min="0" value="64" label="Minimal qPCR probe melting temperature" help="With varVAMP default settings, the probe melting temperatures are 7°C higher than those of amplicon primers." />
                        <param name="QPROBE_TMP_max" type="integer" min="0" value="70" label="Maximal qPCR probe melting temperature" help="With varVAMP default settings, the probe melting temperatures are 7°C higher than those of amplicon primers." />
                        <param name="QPROBE_TMP_opt" type="integer" min="0" value="67" label="Optimal qPCR probe melting temperature" help="With varVAMP default settings, the probe melting temperatures are 7°C higher than those of amplicon primers." />
                        <param name="QPROBE_SIZES_min" type="integer" min="0" value="20" label="Minimal qPCR probe size" />
                        <param name="QPROBE_SIZES_max" type="integer" min="0" value="30" label="Maximal qPCR probe size" />
                        <param name="QPROBE_SIZES_opt" type="integer" min="0" value="25" label="Optimal qPCR probe size" />
                        <param name="QPROBE_GC_RANGE_min" type="integer" min="0" max="100" value="40" label="Minimal qPCR probe GC-content" />
                        <param name="QPROBE_GC_RANGE_max" type="integer" min="0" max="100" value="80" label="Maximal qPCR probe GC-content" />
                        <param name="QPROBE_GC_RANGE_opt" type="integer" min="0" max="100" value="60" label="Optimal qPCR probe GC-content" />
                        <param name="QPROBE_GC_END_min" type="integer" min="0" max="5" value="0" label="Minimal number of GCs among the 3'-terminal 5 bases of the probe" />
                        <param name="QPROBE_GC_END_max" type="integer" min="0" max="5" value="4" label="Maximal number of GCs among the 3'-terminal 5 bases of the probe" />
                        <!--constraints for amplicon design-->
                        <param name="QPRIMER_DIFF" type="integer" min="0" max="10" value="2" label="Maximal melting temperature difference among qPCR primers" />
                        <param name="QPROBE_TEMP_DIFF_min" type="integer" min="0" max="20" value="5" label="Minimal melting temperature difference between qPCR probe and primers" />
                        <param name="QPROBE_TEMP_DIFF_max" type="integer" min="0" max="20" value="10" label="Maximal melting temperature difference between qPCR probe and primers" />
                        <param name="QPROBE_DISTANCE_min" type="integer" min="0" max="20" value="4" label="Minimal distance of the qPCR probe from the primer on the same strand" />
                        <param name="QPROBE_DISTANCE_max" type="integer" min="0" max="20" value="15" label="Maximal distance of the qPCR probe from the primer on the same strand" />
                        <param name="END_OVERLAP" type="integer" min="0" max="10" value="5" label="End Overlap" help="Maximal overlap in bases between the ends of the qPCR probe and the primer on the opposite strand" />
                        <param name="QAMPLICON_LENGTH_min" type="integer" min="0" max="300" value="70" label="Minimal length of qPCR amplicons" />
                        <param name="QAMPLICON_LENGTH_max" type="integer" min="0" max="300" value="200" label="Maximal length of qPCR amplicons" />
                        <param name="QAMPLICON_GC_min" type="integer" min="0" max="100" value="40" label="Minimal GC-content of qPCR amplicons" />
                        <param name="QAMPLICON_GC_max" type="integer" min="0" max="100" value="60" label="Maximal GC-content of qPCR amplicons" />
                        <param name="QAMPLICON_DEL_CUTOFF" type="integer" min="0" max="10" value="4" label="Cutoff for deletions allowed in aligned regions under qPCR amplicons" help ="qPCR amplicon candidates are not considered further if they span regions of the alignment that contain deletions as long as this cutoff in bases, or longer."/>
                    </section>
                </expand>
                <expand macro="primer_scheme_outputs">
                    <option value="qpcr_design" selected="true">qPCR amplicon details in tabular format</option>
                </expand>
                <expand macro="consensus_outputs" />
                <expand macro="graphical_outputs" />
                <expand macro="miscellaneous_outputs">
                    <option value="probe_regions">List of all candidate regions of the consensus sequence that were evaluated for qPCR probes in BED format</option>
                </expand>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="varvamp_log" format="txt" from_work_dir="results/varvamp_log.txt" label="${tool.name} on ${on_string}: Analysis Log" />
        <data name="primer_seqs" format="fasta" from_work_dir="results/primers.fasta" label="${tool.name} on ${on_string}: Sequences of designed oligos">
            <filter>mode['m_select'] in ('single', 'qpcr') and mode['scheme_outputs'] and 'primer_seqs' in mode['scheme_outputs']</filter>
        </data>
        <collection name="primer_seqs_collection" type="list" label="${tool.name} on ${on_string}: per-pool primer sequences">
            <filter>mode['m_select'] == 'tiled' and mode['scheme_outputs'] and 'primer_seqs' in mode['scheme_outputs']</filter>
            <data name="pool1_sequences" format="fasta" from_work_dir="results/primers_pool_0.fasta" label="${tool.name} on ${on_string}: Sequences of designed pool 1 primers" />
            <data name="pool2_sequences" format="fasta" from_work_dir="results/primers_pool_1.fasta" label="${tool.name} on ${on_string}: Sequences of designed pool 2 primers" />
        </collection>
        <data name="primers_bed" format="bed" from_work_dir="results/primers.bed" label="${tool.name} on ${on_string}: Primer binding sites">
            <filter>mode['scheme_outputs'] and 'primer_binding_sites' in mode['scheme_outputs']</filter>
        </data>
        <data name="amplicons_bed" format="bed" from_work_dir="results/amplicons.bed" label="${tool.name} on ${on_string}: Amplicon locations">
            <filter>mode['scheme_outputs'] and 'amplicon_sites' in mode['scheme_outputs']</filter>
        </data>
        <data name="primers_details" format="tabular" from_work_dir="results/*primers.tsv" label="${tool.name} on ${on_string}: Primer details">
            <filter>mode['scheme_outputs'] and 'primer_details' in mode['scheme_outputs']</filter>
        </data>
        <data name="qpcr_details" format="tabular" from_work_dir="results/qpcr_design.tsv" label="${tool.name} on ${on_string}: qPCR amplicon details" >
            <filter>mode['scheme_outputs'] and 'qpcr_design' in mode['scheme_outputs']</filter>
        </data>
        <data name="primer_amplicon_assignments" format="tabular" from_work_dir="results/primer_to_amplicon_assignment.tabular" label="${tool.name} on ${on_string}: Primer to amplicon assignments">
            <filter>mode['scheme_outputs'] and 'amplicon_assignment' in mode['scheme_outputs']</filter>
        </data>
        <data name="unresolved_primer_dimers" format="tabular" from_work_dir="results/unsolvable_primer_dimers.tsv" label="${tool.name} on ${on_string}: Unresolved primer dimers">
            <filter>mode['scheme_outputs'] and 'primer_dimers' in mode['scheme_outputs']</filter>
        </data>
        <data name="ambiguous_consensus" format="fasta" from_work_dir="results/ambiguous_consensus.fasta" label="${tool.name} on ${on_string}: Ambiguous consensus sequence">
            <filter>mode['aln_cons_outputs'] and 'ambiguous_consensus' in mode['aln_cons_outputs']</filter>
        </data>
        <data name="majority_consensus" format="fasta" from_work_dir="results/data/majority_consensus.fasta" label="${tool.name} on ${on_string}: Majority consensus sequence (no ambiguity codes)">
            <filter>mode['aln_cons_outputs'] and 'majority_consensus' in mode['aln_cons_outputs']</filter>
        </data>
        <data name="alignment_cleaned" format="fasta" from_work_dir="results/data/alignment_cleaned.fasta" label="${tool.name} on ${on_string}: Alignment cleaned">
            <filter>mode['aln_cons_outputs'] and 'alignment_cleaned' in mode['aln_cons_outputs']</filter>
        </data>
        <data name="amplicon_plot" format="pdf" from_work_dir="results/amplicon_plot.pdf" label="${tool.name} on ${on_string}: Amplicon design overview plot">
            <filter>mode['plot_outputs'] and 'amplicon_plot' in mode['plot_outputs']</filter>
        </data>
        <data name="per_base_mismatches" format="pdf" from_work_dir="results/per_base_mismatches.pdf" label="${tool.name} on ${on_string}: Per-base mismatches barplots">
            <filter>mode['plot_outputs'] and 'per_base_mismatches' in mode['plot_outputs']</filter>
        </data>
        <data name="primer_regions" format="bed" from_work_dir="results/data/primer_regions.bed" label="${tool.name} on ${on_string}: All candidate primer regions">
            <filter>mode['misc_outputs'] and 'primer_regions' in mode['misc_outputs']</filter>
        </data>
        <data name="probe_regions" format="bed" from_work_dir="results/data/probe_regions.bed" label="${tool.name} on ${on_string}: All candidate qPCR probe regions">
            <filter>mode['misc_outputs'] and 'probe_regions' in mode['misc_outputs']</filter>
        </data>
        <data name="all_primers" format="bed" from_work_dir="results/data/all_primers.bed" label="${tool.name} on ${on_string}: All primer sites">
            <filter>mode['misc_outputs'] and 'all_primers' in mode['misc_outputs']</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="8">
            <param name="alignment" value="hepatitis_e_aln_shrunk.fasta"/>
            <conditional name="mode">
                <param name='m_select' value="single"/>
                <conditional name="main_params">
                    <param name="specify_how" value="set_both"/>
                    <param name="threshold" value="0.8"/>
                    <param name="n_ambig" value="3"/>
                </conditional>
                <param name="opt_length" value="300"/>
                <param name="max_length" value="400"/>
                <conditional name="limit_report">
                    <param name="choice" value="yes" />
                    <param name="report_n" value="5"/>
                </conditional>
            </conditional>
            <output name="varvamp_log" ftype="txt" compare="contains" file="test1.log" />
            <output name="ambiguous_consensus" ftype="fasta" file="ambiguous_consensus.fasta" />
            <output name="amplicon_plot" ftype="pdf">
                <assert_contents>
                    <has_text text="%PDF"/>
                    <has_text text="%%EOF"/>
                </assert_contents>
            </output>
            <output name="primers_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="2" />
                </assert_contents>
            </output>
            <output name="amplicons_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="1"/>
                </assert_contents>
            </output>
            <output name="per_base_mismatches" ftype="pdf">
                <assert_contents>
                    <has_text text="%PDF"/>
                    <has_text text="%%EOF"/>
                </assert_contents>
            </output>
            <output name="primer_seqs" ftype="fasta">
                <assert_contents>
                    <has_line line=">AMPLICON_0_LEFT"/>
                    <has_line line=">AMPLICON_0_RIGHT"/>
                    <has_n_lines n="4"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="12">
            <param name="alignment" value="hepatitis_e_aln_shrunk.fasta"/>
            <conditional name="mode">
                <param name='m_select' value="tiled"/>
                <conditional name="main_params">
                    <param name="specify_how" value="set_both"/>
                    <param name="threshold" value="0.6"/>
                    <param name="n_ambig" value="2"/>
                </conditional>
                <param name="opt_length" value="150"/>
                <param name="max_length" value="300"/>
                <param name="overlap" value="100"/>
            </conditional>
            <output name="varvamp_log" ftype="txt" compare="contains" file="test2.log" />
            <output name="primers_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="4" />
                </assert_contents>
            </output>
            <output name="amplicons_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="2"/>
                </assert_contents>
            </output>
            <output name="primer_amplicon_assignments" ftype="tabular">
                <assert_contents>
                    <has_n_lines n="2"/>
                    <has_n_columns n="2"/>
                </assert_contents>
            </output>
            <output name="unresolved_primer_dimers" ftype="tabular">
                <assert_contents>
                    <has_n_lines n="1"/>
                </assert_contents>
            </output>
            <output_collection name="primer_seqs_collection" type="list" count="2">
                <element name="pool1_sequences" ftype="fasta">
                    <assert_contents>
                        <has_n_lines n="4"/>
                        <has_line line=">AMPLICON_0_LEFT"/>
                    </assert_contents>
                </element>
                <element name="pool2_sequences" ftype="fasta">
                    <assert_contents>
                        <has_n_lines n="4"/>
                        <has_line line=">AMPLICON_1_LEFT"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="9">
            <param name="alignment" value="hepatitis_e_aln_shrunk.fasta"/>
            <conditional name="mode">
                <param name='m_select' value="qpcr"/>
                <conditional name="main_params">
                    <param name="specify_how" value="set_both"/>
                    <param name="threshold" value="0.7"/>
                    <param name="n_ambig" value="1"/>
                    <param name="pn_ambig" value="1"/>
                </conditional>
                <param name="test_n" value="180"/>
                <param name="deltaG" value="-15"/>
            </conditional>
            <output name="varvamp_log" ftype="txt" compare="contains" file="test3.log" />
            <output name="primers_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="3" />
                </assert_contents>
            </output>
            <output name="amplicons_bed" ftype="bed">
                <assert_contents>
                    <has_n_lines n="1"/>
                </assert_contents>
            </output>
            <output name="primer_seqs" ftype="fasta">
                <assert_contents>
                    <has_line line=">QPCR_SCHEME_0_PROBE"/>
                    <has_line line=">QPCR_SCHEME_0_LEFT"/>
                    <has_line line=">QPCR_SCHEME_0_RIGHT"/>
                    <has_n_lines n="6"/>
                </assert_contents>
            </output>
            <output name="qpcr_details" ftype="tabular">
                <assert_contents>
                    <has_n_lines n="2"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="1">
            <!-- Similar to test 1, but try to modify some of varVAMP's
            advanced params, and see whether that gets reflected in the log file.
            -->
            <param name="alignment" value="hepatitis_e_aln_shrunk.fasta"/>
            <conditional name="mode">
                <param name='m_select' value="single"/>
                <conditional name="main_params">
                    <param name="specify_how" value="set_both"/>
                    <param name="threshold" value="0.8"/>
                    <param name="n_ambig" value="3"/>
                </conditional>
                <param name="opt_length" value="300"/>
                <param name="max_length" value="400"/>
                <conditional name="limit_report">
                    <param name="choice" value="yes" />
                    <param name="report_n" value="5"/>
                </conditional>
                <conditional name="advanced_config">
                    <param name="customize" value="yes"/>
                    <section name="basic_primer_params">
                        <param name="PRIMER_GC_RANGE_min" value="20"/>
                        <param name="PRIMER_GC_RANGE_max" value="80"/>
                    </section>
                </conditional>
                <param name="scheme_outputs" value=""/>
                <param name="aln_cons_outputs" value=""/>
                <param name="plot_outputs" value=""/>
                <param name="misc_outputs" value=""/>
            </conditional>
            <output name="varvamp_log" ftype="txt" compare="contains" file="test4.log" />
        </test>
    </tests>
    <help><![CDATA[

.. class:: infomark

**What it does**

variable VirusAMPlicons (varVAMP) is a tool to design primers for highly diverse viruses. The input is an alignment of your viral (full-genome) sequences.

For a lot of virus genera it is difficult to design pan-specific primers. varVAMP solves this by introducing ambiguous characters into primers and minimizes mismatches at the 3' end. Primers might not work for some sequences of your input alignment but should recognize the large majority.

varVAMP can be run in three different **modes**:

* SINGLE: varVAMP searches for the very best primers and reports back non-overlapping amplicons which can be used for PCR-based screening approaches.
* TILED: varVAMP uses a graph based approach to design overlapping (tiled) amplicons that together cover the entire viral genome. This designs amplicons that are suitable for Oxford Nanopore or Illumina based full-genome sequencing.
* QPCR: varVAMP searches for small amplicons with an optimized internal probe (TaqMan). It minimizes temperature differences between the primers and checks for amplicon secondary structures.

Algorithmic parameters:

These are explained very well on the `How varVAMP works <https://github.com/jonas-fuchs/varVAMP/blob/master/docs/how_varvamp_works.md>`__ page of the varVAMP documentation.

Outputs:

This tool can produce lots of informative output and the different modes come with what we hope are reasonable default choices.

The most important output, however, is the **Analysis Log**, which will always be generated and contains essential information about what parameters where used by varVAMP during the run and about intermediate results. You should always check this file. Together with the tool's standard output and error streams, it is the place to spot issues with your analysis and to start debugging them.

.. class:: infomark

Testing with a new alignment/analysis:

As a first check whether a new alignment of viral sequences can be used with specific settings of the tool, it may help to disable all configurable outputs, which will leave you with only the Analysis Log. This will be enough to see if there are any errors with the combination of alignment and settings, and whether you are on a roughly correct track (varVAMP reports some primers, for example). This way, you're not flooding your analysis history with lots of likely useless datasets, and once you've fixed potential issues you can add back more outputs and rerun the analysis.
    ]]></help>
    <citations>
        <citation type="doi">10.5281/zenodo.10908223</citation>
    </citations>
</tool>