view compleasm.xml @ 4:8f20a5b9b282 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/compleasm/ commit 025282d56217bb501fcae8500546dec4ddf63949
author iuc
date Wed, 24 Jul 2024 17:43:14 +0000
parents cfec9601b25d
children
line wrap: on
line source

<tool id="compleasm" name="compleasm" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description>completeness of genome assemblies</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">compleasm</xref>
    </xrefs>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">compleasm</requirement>
    </requirements>
    <version_command>compleasm --version</version_command>
    <command><![CDATA[
    
    mkdir -p galaxy_db &&
    cp -r '${busco_database.fields.path}/lineages/${lineage_dataset}/' 'galaxy_db/' &&

    compleasm run
    -a '$input'
    -o galaxy_output
    --mode $mode
    -L 'galaxy_db'
    -l '$lineage_dataset'
    -t "\${GALAXY_SLOTS:-1}" 

    #if str($specified_contigs) != '':
        --specified_contigs '$specified_contigs'
    #end if

    ]]></command>
    <inputs>
        <param argument="-a" name="input" type="data" format="fasta" label="Input genome file"/>
        <param name="mode" type="select" label="The mode of evaluation" help="If you want to use hmmsearch, select BUSCO mode. Otherwise, select lite mode">
            <option value="busco" selected="true">BUSCO</option>
            <option value="lite">Lite</option>
        </param>

        <param argument="--specified_contigs" type="text" label="Specify the contigs to be evaluated" optional="true" help="e.g. chr1 chr2 chr3. If not specified, all contigs will be evaluated">
            <sanitizer invalid_char="">
                <valid initial="string.letters,string.digits">
                    <add value="_" />
                </valid>
            </sanitizer>
            <validator type="regex">[0-9a-zA-Z_ ]+</validator>
        </param>
        
        <param name="outputs" type="select" multiple="true" label="Which outputs should be generated">
            <option value="full_table_busco" selected="true">full busco table</option>
            <option value="full_table">full table</option>
            <option value="miniprot">miniprot</option>
            <option value="translated_protein">translated proteins</option>
        </param>

        <param name="busco_database" label="Choose the BUSCO database to be used" type="select" multiple="false">
            <options from_data_table="busco_database"/>
        </param>

        <param name="lineage_dataset" type="select" label="Lineage">
            <expand macro="lineages"/>
        </param>
    </inputs>

    <outputs>
        <data name='full_table_busco' format='tsv' label="${tool.name} on ${on_string}: full table BUSCO" from_work_dir="galaxy_output/*_odb10/full_table_busco_format.tsv">
            <filter>outputs and 'full_table_busco' in outputs</filter>
        </data>
        <data name='full_table' format='tsv' label="${tool.name} on ${on_string}: full table" from_work_dir="galaxy_output/*_odb10/full_table.tsv">
            <filter>outputs and 'full_table' in outputs</filter>
        </data>
        <data name='miniprot' format='gff3' label="${tool.name} on ${on_string}: Miniprot" from_work_dir="galaxy_output/*_odb10/miniprot_output.gff">
            <filter>outputs and 'miniprot' in outputs</filter>
        </data>
        <data name='translated_protein' format='fasta' label="${tool.name} on ${on_string}: Translated protein" from_work_dir="galaxy_output/*_odb10/translated_protein.fasta">
            <filter>outputs and 'translated_protein' in outputs</filter>
        </data>             
    </outputs>

    <tests>
        <test expect_num_outputs="4">
            <param name="input" value="small_genome.fasta"/>
            <param name="mode" value="busco"/>
            <param name="outputs" value="full_table_busco,full_table,miniprot,translated_protein"/>
            <param name="busco_database" value="eukaryota_odb10"/>
            <param name="lineage_dataset" value="eukaryota_odb10"/>
            <output name="full_table_busco">
                <assert_contents>
                    <has_text text="Busco id"/>
                    <has_text text="Missing"/>
                </assert_contents>
            </output>
            <output name="full_table">
                <assert_contents>
                    <has_text text="Gene"/>
                    <has_text text="Missing"/>
                </assert_contents>
            </output>
            <output name="miniprot">
                <assert_contents>
                    <has_text text="##gff-version 3"/>
                </assert_contents>
            </output>
            <output name="translated_protein">
                <assert_contents>
                    <has_text text="GGWLIGNGGAGGSGAAGVNGGAGGNGGAGGNGGAGG"/>
                    <has_text text="AAVFADRGAHVVLAVRNLEKGNAARARIMAARPGAHVTLQQLDLCSLDSVRAAADALRTAYPRIDVLINNAGVMW"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

    compleasm_ assesses genome completeness based on genome assembly. 

    .. _compleasm: https://github.com/huangnengCSU/compleasm

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