view maf-convert.xml @ 7:eca7ac1eb423 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/last commit ddb5e058a7877e627ed24ef8cb9a046ccb450cb4
author iuc
date Mon, 23 Oct 2023 20:45:02 +0000
parents 19c265784f35
children
line wrap: on
line source

<tool id="last_maf_convert" name="MAF-convert" version="@TOOL_VERSION@+galaxy1" profile="20.01">
    <description>read MAF-format alignments and write them in another format.</description>
    <macros>
        <import>macros_last.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        maf-convert

        $maf_convert.output_type.output_format 

        $maf_convert.noheader

        #if $maf_convert.output_type.output_format == 'psl'
            $maf_convert.output_type.protein 
            -j $maf_convert.output_type.j
        #end if

        #if $maf_convert.output_type.output_format == 'sam'
            $maf_convert.output_type.sam_file.dictionary
            #if $maf_convert.output_type.sam_file.dictionary == '-d'
                -f $maf_convert.output_type.sam_file.f
            #end if
            #if $maf_convert.output_type.readfile != ''
                -r $maf_convert.output_type.r
            #end if
        #end if

        #if $maf_convert.output_type.output_format == 'blast' or $maf_convert.output_type.output_format == 'html'
            -l $maf_convert.output_type.l
        #end if

        '$maf_file'

        > '$outfile'

    ]]></command>
    <inputs>
        <param name="maf_file" type="data" format="maf" label="MAF file to convert" />

        <section name="maf_convert" title="MAF-convert arguments" expanded="true">

            <param name="noheader" argument="-n" type="boolean" truevalue="-n" falsevalue="" checked="false" label="No header." help="Omit any header lines from the output"/>

            <conditional name="output_type">
                <param name="output_format" type="select" multiple="false" label="Output format">
                    <option value="axt">axt</option>
                    <option value="blast">blast</option>
                    <option value="blasttab">blasttab</option>
                    <option value="chain">chain</option>
                    <option value="html">html</option>
                    <option value="psl" selected="true">psl</option>
                    <option value="sam">sam</option>
                    <option value="tab">tab</option>
                </param>
                <when value="axt"/>
                <when value="blast">
                    <param argument="-l" type="integer" value="60" label="Line length"/>
                </when>
                <when value="blasttab"/>
                <when value="chain"/>
                <when value="html">
                    <param argument="-l" type="integer" value="60" label="Line length"/>
                </when>
                <when value="psl">
                    <param name="protein" argument="-p" type="boolean" truevalue="-p" falsevalue="" checked="false" label="Protein alignments." />
                    <param argument="-j" type="integer" value="1" label="Join neighboring alignments" help="Join neighboring alignments if they are co-linear and separated by at most N letters."/>
                </when>
                <when value="sam">
                    <conditional name="sam_file">
                        <param name="dictionary" argument="-d" type="select" label="Include dictionary of sequence lengths in sam format">
                            <option value="-d">Yes</option>
                            <option value="" selected="true">No</option>
                        </param>
                        <when value=""/>
                        <when value="-d">
                            <param argument="-f" type="data" format="dict" label="Get a sequence dictionary from DICTFILE" />
                        </when>
                    </conditional>			    
                    <param argument="-r" type="text" value="" label="Specify read group information" help="Example: 'ID:1 PL:ILLUMINA SM:mysample'"/>
                </when>
                <when value="tab"/>
            </conditional>
        </section>
    </inputs>

    <outputs>
        <data format="maf" name="outfile" label="${on_string} to ${maf_convert.output_type.output_format}">
            <change_format>
                <when input="maf_convert.output_type.output_format" value="axt" format="axt" />
                <when input="maf_convert.output_type.output_format" value="blast" format="blastxml" />
                <when input="maf_convert.output_type.output_format" value="blasttab" format="blastxml" />
                <when input="maf_convert.output_type.output_format" value="chain" format="txt" />
                <when input="maf_convert.output_type.output_format" value="html" format="html" />
                <when input="maf_convert.output_type.output_format" value="psl" format="tabular" />
                <when input="maf_convert.output_type.output_format" value="sam" format="sam" />
                <when input="maf_convert.output_type.output_format" value="tab" format="tabular" />
            </change_format>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="maf_file" value="last_align_train_gen.maf" ftype="maf"/>
            <section name="maf_convert">
                <conditional name="output_type">
                    <param name="output_format" value="axt"/>
                </conditional>
            </section>
            <output name="outfile" file="outfile_convert.axt"/>
        </test>
        <test>
            <param name="maf_file" value="last_align_train_gen.maf" ftype="maf"/>
            <section name="maf_convert">
                <conditional name="output_type">
                    <param name="output_format" value="blast"/>
                </conditional>
            </section>
            <output name="outfile" file="outfile_convert.blast"/>
        </test>
        <test>
            <param name="maf_file" value="last_align_train_gen.maf" ftype="maf"/>
            <section name="maf_convert">
                <conditional name="output_type">
                    <param name="output_format" value="html"/>
                </conditional>
            </section>
            <output name="outfile" file="outfile_convert.html"/>
        </test>
        <test>
            <param name="maf_file" value="last_align_train_gen.maf" ftype="maf"/>
            <section name="maf_convert">
                <conditional name="output_type">
                    <param name="output_format" value="tab"/>
                </conditional>
            </section>
            <output name="outfile" file="outfile_convert.tab"/>
        </test>
    </tests>

    <help><![CDATA[
        This script reads alignments in maf format, and writes them in another format. It can write them in these formats: axt, blast, blasttab, chain, html, psl, sam, tab.
    ]]></help>
    <citations><expand macro="citations"/></citations>
</tool>