view lofreq_viterbi.xml @ 5:aa35ee7f3ab2 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/lofreq commit c1fda24943cf04866d408133ffb6aabf4a90866b"
author iuc
date Mon, 05 Oct 2020 20:15:16 +0000
parents af7e416d8176
children
line wrap: on
line source

<tool id="lofreq_viterbi" name="Realign reads" version="@TOOL_VERSION@+galaxy0" profile="18.01">
    <description>with LoFreq viterbi</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        @PREPARE_REF@
        lofreq viterbi
        --ref '$reference_fasta_fn'
        ${adv_options.keepflags}
        --defqual ${adv_options.bq2_handling.defqual}
        --out tmp.bam '$reads' &&

        samtools sort --no-PG -T "\${TMPDIR:-.}" -@ \${GALAXY_SLOTS:-1} -O BAM -o '$realigned' tmp.bam
    ]]></command>
    <inputs>
        <param name="reads" type="data" format="bam" label="Reads to realign" />
        <expand macro="reference_interface" />
        <section name="adv_options" title="Advanced options" expanded="false">
            <param argument="--keepflags" type="boolean" truevalue="--keepflags" falsevalue="" checked="false"
            label="Keep MC, MD, NM, and A flags?"
            help="Re-alignment resets the MC, MD, NM, and A flags by default. The values of these tags depend on the exact alignment. Use this option only if you know what you are doing." />
            <conditional name="bq2_handling">
                <param name="replace_bq2" type="select"
                label="How to handle base qualities of 2?"
                help="In sequenced reads obtained with Illumina sequencing pipelines before version 1.8, base quality 2 is special in that it serves as a general indicator of low quality of the corresponding bases. For such reads, the tool can make an optimistic guess of the real quality of such bases by replacing base qualities of 2 with the median of all other base qualities observed in the read. Alternatively, you can provide a fixed replacement value. For recently obtained sequencing data, just keep BQ2 values unchanged (the default) since they have no special meaning.">
                    <option value="keep">Keep unchanged</option>
                    <option value="dynamic">Adjust dynamically</option>
                    <option value="fixed">Replace with fixed base quality</option>
                </param>
                <when value="keep">
                    <param name="defqual" type="hidden" value="2" />
                </when>
                <when value="dynamic">
                    <param name="defqual" type="hidden" value="-1" />
                </when>
                <when value="fixed">
                    <param argument="--defqual" name="defqual" type="integer" value="2" min="0"
                    label="Quality to assume for all bases with BQ2" />
                </when>
            </conditional>
        </section>
    </inputs>
    <outputs>
        <data name="realigned" format="bam" label="${tool.name} on ${on_string}: Realigned reads" />
    </outputs>
    <tests>
        <test>
            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
            <param name="ref_selector" value="history" />
            <param name="ref_selector" value="history" />
            <param name="ref" ftype="fasta" value="pBR322.fa" />
            <output name="realigned" file="viterbi-out1.bam" ftype="bam" />
        </test>
        <test>
            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
            <param name="ref_selector" value="history" />
            <section name="adv_options">
                <param name="keepflags" value="true" />
            </section>
            <param name="ref" ftype="fasta" value="pBR322.fa" />
            <output name="realigned" file="viterbi-out2.bam" ftype="bam" />
        </test>
    </tests>
    <help><![CDATA[
lofreq viterbi: Probabilistic realignment of mapped reads to correct mapping errors.

.. class:: Warning mark

   Not recommended for non-Illumina data.

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