view lofreq_viterbi.xml @ 1:ecd80c7c3886 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/lofreq commit 9e41ac63171c3e3a6fd2b4d018d0c60c9f1fbae1"
author iuc
date Fri, 31 Jan 2020 06:17:30 -0500
parents 33a416e1659e
children af7e416d8176
line wrap: on
line source

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

        samtools sort -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" name="delflags" type="boolean" truevalue="" falsevalue="--keepflags" checked="true"
            label="Delete flags MC, MD, NM, and A?"
            help="These flags are all prone to getting invalidated during realignment. Keep them 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" ftype="fasta" value="pBR322.fa" />
            <output name="realigned" file="viterbi-out1.bam" />
        </test>
        <test>
            <param name="reads" ftype="bam" value="lofreq-in1.bam" />
            <param name="ref_selector" value="history" />
            <section name="adv_options">
                <param name="delflags" value="false" />
            </section>
            <param name="ref" ftype="fasta" value="pBR322.fa" />
            <output name="realigned" file="viterbi-out2.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>