Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrappers for ppanggolin all and ppanggolin msa #6645

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
11 changes: 11 additions & 0 deletions tools/ppanggolin/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: ppanggolin
owner: iuc
description: Microbial Partitioned PanGenome.
homepage_url: https://github.com/labgem/PPanGGOLiN
long_description: |
Depicting microbial species diversity via a Partitioned PanGenome Graph Of Linked Neighbors.
remote_repository_url: https://github.com/galaxyproject/tools-iuc
type: unrestricted
categories:
- Genome annotation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a good category for the tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so but I am not sure. Roary (a tool with overlapping functionalities) is classified in "Genomics Analysis -> Annotation" in https://usegalaxy.fr/ and in "Genome Analysis Tools -> Genome annotation" in https://galaxy.migale.inrae.fr/. Is there a list of categories and/or a guideline to choose the right category for the tool ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the toolshed categories. You can see all of them here: https://toolshed.g2.bx.psu.edu/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this fits better to metagenomics, or? In my head genome annotation refers to annotating genes on a genome sequence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PPanGGOLiN would best fit in a "pangenomics" category but there is no such category in https://toolshed.g2.bx.psu.edu. I would argue that "pangenomics" is closer to the "genome annotation" category than the "metagenomics" category.
Pangenomics refers to the study of all the genes present in a group of organisms, rather than in a single individual or species. This often involves annotating the genomes of multiple strains or species to identify shared genes and those that are specific to certain strains.
In contrast, metagenomics involves the analysis of genetic material recovered directly from environmental samples, allowing the study of the genetic diversity of microbial communities without the need to culture the organisms.


19 changes: 19 additions & 0 deletions tools/ppanggolin/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<macros>
<token name="@TOOL_VERSION@">2.2.1</token>
<token name="@VERSION_SUFFIX@">0</token>
<xml name="citation">
<citations>
<citation type="doi">10.1371/journal.pcbi.1007732</citation>
</citations>
</xml>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">ppanggolin</requirement>
</requirements>
</xml>
<xml name="xrefs">
<xrefs>
<xref type="bio.tools">ppanggolin</xref>
</xrefs>
</xml>
</macros>
324 changes: 324 additions & 0 deletions tools/ppanggolin/ppanggolin_all.xml

Large diffs are not rendered by default.

155 changes: 155 additions & 0 deletions tools/ppanggolin/ppanggolin_msa.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<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>

<param argument="--pangenome" name="pangenome_h5" type="data" format="h5" label="Input pangenome h5 file"/>

<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">
<param argument="--soft_core" name="choice_soft_core" type="float" value="0.95" min="0" max="1" label="Soft core threshold to use if 'softcore' partition is chosen"/>
</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=""/>

<param argument="--translation_table" type="select" label="Translation table">
<option value="1" selected="true">1 - Standard Code</option>
<option value="2">2 - Vertebrate Mitochondrial</option>
<option value="3">3 - Yeast Mitochondrial</option>
<option value="4">4 - Mold, Protozoan, and Coelenterate Mitochondrial</option>
<option value="5">5 - Invertebrate Mitochondrial</option>
<option value="6">6 - Ciliate Nuclear</option>
<option value="9">9 - Echinoderm Mitochondrial</option>
<option value="10">10 - Euplotid Nuclear</option>
<option value="11">11 - Bacterial and Plant Plastid</option>
<option value="12">12 - Alternative Yeast Nuclear</option>
<option value="13">13 - Ascidian Mitochondrial</option>
<option value="14">14 - Flatworm Mitochondrial</option>
<option value="15">15 - Blepharisma Nuclear</option>
<option value="16">16 - Chlorophycean Mitochondrial</option>
<option value="21">21 - Trematode Mitochondrial</option>
<option value="22">22 - Scenedesmus obliquus Mitochondrial</option>
<option value="23">23 - Thraustochytrium Mitochondrial</option>
<option value="24">24 - Pterobranchia Mitochondrial</option>
<option value="25">25 - Candidate Division SR1 and Gracilibacteria</option>
<option value="26">26 - Pachysolen tannophilus Nuclear</option>
<option value="27">27 - Karyorelict Nuclear</option>
<option value="28">28 - Condylostoma Nuclear</option>
<option value="29">29 - Mesodinium Nuclear</option>
<option value="30">30 - Peritrich Nuclear</option>
<option value="31">31 - Blastocrithidia Nuclear</option>
<option value="32">32 - Balanophoraceae Plastid</option>
<option value="33">33 - Cephalodiscidae Mitochondrial</option>
</param>

</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="aln" 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>

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tools/ppanggolin/test-data/h5/test_data.h5
Binary file not shown.
Loading