view ppanggolin_msa.xml @ 5:579d7907524d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/ppanggolin commit 29098ae57dcc42db8f9adf321d31ed37fb999d17
author iuc
date Mon, 24 Nov 2025 12:55:16 +0000
parents 2da61c5e8aac
children
line wrap: on
line source

<tool id="ppanggolin_msa" name="PPanGGOLiN MSA" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0">
    <description>computes MSA of pangenome's gene families</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="requirements"/>
    
    <command detect_errors="exit_code"><![CDATA[
        
        mkdir -p ./tmp_ppanggolin/msa &&
        mkdir -p ./tmp_ppanggolin/tmpdir_msa &&
        
        ppanggolin msa
        --pangenome '$pangenome_h5'
        --output ./tmp_ppanggolin/msa
        --tmpdir ./tmp_ppanggolin/tmpdir_msa
        --force
        --cpu "\${GALAXY_SLOTS:-4}"
        --disable_prog_bar
        --partition $choice_partition
        #if str($input_choose_partition.choice_partition) == "softcore"
            --soft_core $choice_soft_core
        #end if
        
        --source $choice_source
        $do_phylo
        $do_single_copy
        --translation_table $translation_table
        
        #set base_msa_source = "msa_" + str($input_choose_partition.choice_partition) + "_" + str($choice_source)
        #set base_genome_alignment = str($input_choose_partition.choice_partition) + "_genome_alignment.aln"
        #if str($input_choose_partition.choice_partition) == "softcore"
            #set base_genome_alignment = str($input_choose_partition.choice_partition) + "_" + str($choice_soft_core) + "_genome_alignment.aln"
        #end if
        
        && tar -cvf ./tmp_ppanggolin/msa/archive_${base_msa_source}.tar ./tmp_ppanggolin/msa/${base_msa_source}
        && gzip ./tmp_ppanggolin/msa/archive_${base_msa_source}.tar
        && mv ./tmp_ppanggolin/msa/archive_${base_msa_source}.tar.gz '${archive_msa_partition_source}'
        
        #if str($do_phylo) == "--phylo"
            && mv ./tmp_ppanggolin/msa/${base_genome_alignment} '${partition_genome_alignment}'
        #end if     
        
    ]]></command>

    <inputs>
    
        <expand macro="inputs_pangenome"/>

        <conditional name="input_choose_partition">
            <param argument="--partition" name="choice_partition" type="select" label="Partition">
                <option value="core" selected="true">Core</option>
                <option value="persistent">Persistent</option>
                <option value="shell">Shell</option>
                <option value="cloud">Cloud</option>
                <option value="softcore">Softcore</option>
                <option value="accessory">Accessory</option>
                <option value="all">All</option>
            </param>
            <when value="core"/>
            <when value="persistent"/>
            <when value="shell"/>
            <when value="cloud"/>
            <when value="softcore">
                <expand macro="inputs_soft_core"/>
            </when>
            <when value="accessory"/>
            <when value="all"/>
        </conditional>

        <param argument="--source" name="choice_source" type="select" label="Source">
            <option value="protein" selected="true">Protein</option>
            <option value="dna">DNA</option>
        </param>
        
        <param argument="--phylo" name="do_phylo" type="boolean" checked="true" label="Writes a whole genome msa file for additional phylogenetic analysis (recommended)" truevalue="--phylo" falsevalue=""/>

        <param argument="--single_copy" name="do_single_copy" type="boolean" checked="false" label="Report gene families that are considered 'single copy'" truevalue="--single_copy" falsevalue=""/>

        <expand macro="inputs_translation_table"/>
        
    </inputs>

    <outputs>
        <data name="archive_msa_partition_source" format="tar.gz" label="PPanGGOLiN msa on ${on_string}: archive msa ${choice_partition} ${choice_source}" />
        <data name="partition_genome_alignment" format="maf" label="PPanGGOLiN msa on ${on_string}: ${choice_partition} genome alignment" >
          <filter>do_phylo is True</filter>
        </data>
    </outputs>

    <tests>
        <test expect_num_outputs="2">
            <param name="choice_partition" value="core"/>
            <param name="choice_source" value="protein"/>
            <param name="do_phylo" value="true"/>
            <param name="do_single_copy" value="false"/>
            <param name="pangenome_h5" value="h5/test_data.h5" ftype="h5"/>
            <param name="translation_table" value="1"/>
            
            <output name="partition_genome_alignment" >
                <assert_contents>
                    <has_text text=">" />
                </assert_contents>
            </output>
            
        </test>
    </tests>
        
    <help><![CDATA[
    
        PPanGGOLiN_ (Gautreau et al. 2020) is a software suite used to create and manipulate prokaryotic pangenomes from a set of either assembled 
        genomic DNA sequences or provided genome annotations. PPanGGOLiN builds pangenomes through a graphical model and a statistical method to partition gene 
        families in persistent, shell and cloud genomes. It integrates both information on protein-coding genes and their genomic neighborhood to build a graph 
        of gene families where each node is a gene family, and each edge is a relation of genetic contiguity. 

	The `ppanggolin msa` command computes multiple sequence alignment of any partition of the pangenome. The command uses mafft with default options to perform the alignment. Please see the documentation_ on how parameters can be tuned for this command.

        .. _PPanGGOLiN: https://github.com/labgem/PPanGGOLiN
        .. _documentation: https://ppanggolin.readthedocs.io/en/latest/user/MSA.html
        
    ]]></help>

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