view swift.xml @ 0:0802a40af216 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/swiftlink/ commit 2d4c604c2e76baaf744748be3d56e5504a0184b7
author iuc
date Sat, 09 Dec 2017 17:37:03 -0500
parents
children
line wrap: on
line source

<tool id="swiftlink" name="Swiftlink" version="@VERSION@.0" >
    <description>Parallel MCMC Linkage Analysis</description>
    <macros>
        <token name="@VERSION@">1.0</token>
        <xml name="test_inputs" >
            <param name="inp_ped" value="pedin.21" />
            <param name="inp_dat" value="datain.21" />
            <param name="inp_map" value="map.21" />
        </xml>
    </macros>
    <requirements>
        <requirement type="package" version="@VERSION@">swiftlink</requirement>
        <requirement type="package" version="2017.3">linkage2allegro</requirement>
    </requirements>
    <!-- <version_command></version_command> Note: a version is never output by the program... -->
    <command detect_errors='exit_code'><![CDATA[
swiftlink
 -p '${inp_ped}'
 -m '${inp_map}'
 -d '${inp_dat}'
 ${misc.X}
 ${misc.a}
 -q ${misc.q}
 -c \${GALAXY_SLOTS:-3}
 -i ${mcmc.i}
 -b ${mcmc.b}
 -s ${mcmc.s}
 -x ${mcmc.x}
 -l ${mcmc.l}
 -n ${mcmc.n}
 -R ${mcmc.R}

#if $misc.r
    -r '${misc.r}'
#end if

#if $elod_opts.e == 'yes':   ## 'true' / 'false' as opt values parse badly
    -e
    -f $elod_opts.f
    -w $elod_opts.w
    -k '$elod_opts.k'
    -u $elod_opts.u 2> ${out_elod}   ## stderr and stdout switched for some reason...
#else
    -o swiftlink.out
    && linkage2allegro '${inp_ped}' '${inp_map}' swiftlink -l swiftlink.out
    && mv linkage.allegro_lod '${out_fparam}'
#end if

    ]]>
    </command>

    <inputs>
        <param name="inp_ped" type="data" format="linkage_pedin" label="Pedigree" />
        <param name="inp_dat" type="data" format="linkage_recomb" label="Recombination Freqs." />
        <param name="inp_map" type="data" format="linkage_map" label="Marker Positions" />

        <conditional name="elod_opts" >
            <param argument="-e" type="select" label="Calculate Expected LOD scores from pedigree only.">
                <option value="yes">Yes</option>
                <option value="no" selected="true">No</option>
            </param>
            <when value="yes" >
                <param name="f" argument="-f" type="float" min="0" max="0.99" value="0.0001" label="Frequency" />
                <param name="w" argument="-w" type="float" min="0" max="1" value="0.5" label="Seperation" />
                <param name="k" argument="-k" type="text" value="0.00,0.00,1.00" label="Penetrance List" />
                <param name="u" argument="-u" type="integer" min="1" value="1000000" label="Replicates" />
            </when>
            <when value="no" ></when>
        </conditional>

        <section name="mcmc" title="Marko Chain Monte Carlo (MCMC) Options" expanded="false" >
            <param argument="-i" type="integer" min="1" value="50000" label="Iterations" />
            <param argument="-b" type="integer" min="1" value="50000" label="Burn-ins" />
            <param argument="-s" type="integer" min="1" value="1000" label="Sequential Imputation" />
            <param argument="-x" type="integer" min="1" value="10" label="Scoring Period" />
            <param argument="-n" type="integer" min="1" value="5" label="Lod Scores" />
            <param argument="-R" type="integer" min="1" value="1" label="Runs" />
            <param argument="-l" type="float" min="0" max="1" value="0.5" label="L-Sampler Probability" />
        </section>

        <section name="misc" title="Miscellaneous" expanded="true" >
            <param argument="-X" type="boolean" truevalue="-X" falsevalue="" value="false" label="X-linked"/>
            <param argument="-a" type="boolean" truevalue="-a" falsevalue="" value="false" label="Affecteds only"/>
            <param argument="-q" type="integer" min="1" value="1000000" label="Peel-sequence Iterator"/>
            <param argument="-r" type="data" format="txt" label="Random seeds (single-column)" optional="true" />
        </section>
    </inputs>

    <outputs>
        <data name="out_fparam" format="allegro_fparam" label="${tool.name} on ${on_string}: MPT Linkage File" >
            <filter>elod_opts['e'] == "no"</filter>
        </data>
        <data name="out_elod" format="txt" label="${tool.name} on ${on_string}: Elod score" >
            <filter>elod_opts['e'] == "yes"</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <expand macro="test_inputs" />

            <param name="b" value="1000" />
            <param name="i" value="2000" />
            <param name="x" value="150" />
            <param name="e" value="yes" />
            <param name="u" value="1000" />

            <output name="out_elod" >
                <assert_contents>
                    <has_text_matching expression='sex-linked = false' />
                    <has_text_matching expression='Total\s+\|\s+\d+\.\d+\s*' />
                </assert_contents>
            </output>
        </test>
        <test>
            <expand macro="test_inputs" />

            <param name="b" value="5000" />
            <param name="i" value="100" />
            <param name="x" value="100" />

            <output name="out_fparam" >
                <assert_contents>
                    <has_text_matching expression="(\s+-?\d+\.\d+){4}\s+rs468601" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
SwiftLink performs multipoint parametric linkage analysis on large consanguineous pedigrees and is primarily targeted at pedigrees that cannot be analysed by a Lander-Green algorithm based program, i.e. many markers, but larger pedigrees. The current version of SwiftLink only supports SNP markers.
    </help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/bts704</citation>
    </citations>
</tool>