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 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://ppanggolin.readthedocs.io/en/latest/
long_description: |
Depicting microbial species diversity via a Partitioned PanGenome Graph Of Linked Neighbors.
remote_repository_url: https://github.com/labgem/PPanGGOLiN
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should point to the IUC repo. Use this one for homepage_url. The readthedocs URL might be cool to mention in the tool's help section.

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/


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>
336 changes: 336 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="21.05">
<description>computes multiple sequence alignment of the gene / protein families in any partition of the pangenome.</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
Copy link
Contributor

Choose a reason for hiding this comment

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

Add single quotes (always for data and text inputs as well as output files).

--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
#if str($do_phylo) == "true"
--phylo
#end if
#if str($do_single_copy) == "true"
--single_copy
#end if
--translation_table $translation_table

#set base_msa_protein = "msa_" + str($input_choose_partition.choice_partition) + "_protein"
#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_protein}.tar ./tmp_ppanggolin/msa/${base_msa_protein}
&& gzip ./tmp_ppanggolin/msa/archive_${base_msa_protein}.tar
&& mv ./tmp_ppanggolin/msa/archive_${base_msa_protein}.tar.gz '${archive_msa_partition_protein}'

#if str($do_phylo) == "true"
&& 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)"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

truevalue/falsevalue for all booleans?


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

<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_protein" format="tar.gz" label="PPanGGOLiN msa on ${on_string}: archive msa ${choice_partition} protein" />
<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="do_phylo" value="true"/>
<param name="pangenome_h5" value="h5/test_data.h5" ftype="fasta"/>

<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