Skip to content

Commit

Permalink
Merge pull request #5391 from wm75/pangolin-43
Browse files Browse the repository at this point in the history
Update pangolin to version 4.3
  • Loading branch information
bgruening authored Jul 11, 2023
2 parents e0934fc + 790849f commit f93f921
Showing 1 changed file with 66 additions and 56 deletions.
122 changes: 66 additions & 56 deletions tools/pangolin/pangolin.xml
Original file line number Diff line number Diff line change
@@ -1,60 +1,35 @@
<tool id="pangolin" name="Pangolin" version="@TOOL_VERSION@+galaxy0" profile="20.01">
<description>Phylogenetic Assignment of Outbreak Lineages</description>
<macros>
<token name="@TOOL_VERSION@">4.2</token>
<token name="@PANGOLIN_DATA_VERSION@">1.17</token>
<token name="@CONSTELLATIONS_VERSION@">0.1.10</token>
<token name="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@">4</token>
<token name="@TOOL_VERSION@">4.3</token>
<token name="@PANGOLIN_DATA_VERSION@">1.21</token>
<token name="@CONSTELLATIONS_VERSION@">0.1.12</token>
<!-- a regex describing the pangolin-data versions that this wrapper version
is backwards-compatible with; can be used with the min_pangolin_version
column of the pangolin_data and pangolin_assignment data table to offer
only compatible versions of that data. -->
<token name="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@"><![CDATA[^4$|^4\.3$]]></token>
<!-- pangolin-data versions >=1.20 do not contain pangoLEARN models anymore.
This version of pangolin still supports pangolearn analysis mode, but only when using
older versions of pangolin-data. -->
<token name="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT_FOR_PANGOLEARN@">4></token>
<!-- a regex describing the scorpio versions that this wrapper version
is backwards-compatible with; can be used with the min_scorpio_version
column of the constellations data table to offer only compatible
column of the pangolin_constellations data table to offer only compatible
versions of constellations data. -->
<token name="@COMPATIBLE_SCORPIO_DATA_FORMAT@"><![CDATA[(^0\.[1-3]$|^0\.[0-2]\.\d+$|^0\.3\.\d$|^0\.3\.1[0-7]$|^0$)]]></token>
<xml name="usher_download_option">
<when value="download">
<param argument="--use-assignment-cache" type="boolean" truevalue="--use-assignment-cache" falsevalue="" label="Download and use also latest UShER assignment cache?"
help="Get the latest UShER assignment cache from the pangolin-assignment online repository and use it to speed up UShER lineage assignment. Note: Downloading the cached assignments will only pay off for large numbers of input samples." />
</when>
</xml>
<xml name="cached_usher_assignment_cache">
<param name="assignment_cache_release" type="select" optional="true" label="Use corresponding UShER assignment cache?"
help="If the server offers a copy of the UShER assignment cache along with the specified version of pangolin-data, you can select it here to speed up UShER lineage assignment. If no suitable assignment cache is available, it is perfectly fine to proceed without one, and the performance difference will only become obvious with very large numbers of samples.">
<options from_data_table="pangolin_assignment">
<column name="value" index="0" />
<column name="description" index="1" />
<column name="path" index="4" />
<filter type="static_value" column="2" value="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@" />
<filter type="regexp" column="2" value="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@" />
<filter type="param_value" ref="release" column="0" />
</options>
</param>
</xml>
<xml name="cached_pangolin_data">
<when value="cached">
<param name="release" label="Cached release of pangolin-data" type="select">
<options from_data_table="pangolin_data">
<column name="value" index="0" />
<column name="description" index="1" />
<column name="date" index="3" />
<column name="path" index="4" />
<filter type="sort_by" column="3" />
<filter type="static_value" column="2" value="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@" />
<validator type="no_options" message="No cached constellations release available" />
</options>
</param>
<yield />
</when>
</xml>
<xml name="pangolin_data_sources">
<conditional name="pangolin_data">
<param name="source" type="select" label="Version of pangolin-data to use">
<option value="default">Use pangolin-data version (v@PANGOLIN_DATA_VERSION@) shipped with this version of the tool</option>
<option value="cached">Use specific pangolin-data version cached on this Galaxy server</option>
<option value="download">Download latest available pangolin-data version from web</option>
</param>
<when value="default" />
<yield />
</conditional>
</xml>
</macros>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">pangolin</requirement>
Expand All @@ -74,14 +49,14 @@
<requirement type="package" version="@PANGOLIN_DATA_VERSION@">pangolin-data</requirement>
<requirement type="package" version="@CONSTELLATIONS_VERSION@">constellations</requirement>
<requirement type="package" version="0.6.2">usher</requirement>
<requirement type="package" version="1.1.0">gofasta</requirement>
<requirement type="package" version="426">ucsc-fatovcf</requirement>
<requirement type="package" version="2.24">minimap2</requirement>
<requirement type="package" version="1.2.0">gofasta</requirement>
<requirement type="package" version="448">ucsc-fatovcf</requirement>
<requirement type="package" version="2.26">minimap2</requirement>
<!-- wrapper-specific requirements to turn pangolin's native
comma-separated output into tab-separated one and to truncate
pangolin's all-versions output. -->
<requirement type="package" version="0.25.0">csvtk</requirement>
<requirement type="package" version="3.4">grep</requirement>
<requirement type="package" version="0.26.0">csvtk</requirement>
<requirement type="package" version="3.11">grep</requirement>
</requirements>
<version_command><![CDATA[pangolin --version]]></version_command>
<command detect_errors="exit_code"><![CDATA[
Expand Down Expand Up @@ -179,7 +154,7 @@ pangolin
#end if
#end if
#if $alignment:
$alignment --alignment-file '$align1'
$alignment --alignment-file aln.fa
#end if
--outfile report.csv
--max-ambig $max_ambig
Expand All @@ -201,18 +176,53 @@ $query
<option value="pangolearn">pangoLEARN</option>
</param>
<when value="usher">
<expand macro="pangolin_data_sources">
<expand macro="cached_pangolin_data">
<conditional name="pangolin_data">
<param name="source" type="select" label="Version of pangolin-data to use">
<option value="default">Use pangolin-data version (v@PANGOLIN_DATA_VERSION@) shipped with this version of the tool</option>
<option value="cached">Use specific pangolin-data version cached on this Galaxy server</option>
<option value="download">Download latest available pangolin-data version from web</option>
</param>
<when value="default" />
<when value="cached">
<param name="release" label="Cached release of pangolin-data" type="select">
<options from_data_table="pangolin_data">
<column name="value" index="0" />
<column name="description" index="1" />
<column name="date" index="3" />
<column name="path" index="4" />
<filter type="sort_by" column="3" />
<filter type="regexp" column="2" value="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT@" />
<validator type="no_options" message="No compatible cached pangolin-data release available" />
</options>
</param>
<expand macro="cached_usher_assignment_cache" />
</expand>
<expand macro="usher_download_option" />
</expand>
</when>
<when value="download">
<param argument="--use-assignment-cache" type="boolean" truevalue="--use-assignment-cache" falsevalue="" label="Download and use also latest UShER assignment cache?"
help="Get the latest UShER assignment cache from the pangolin-assignment online repository and use it to speed up UShER lineage assignment. Note: Downloading the cached assignments will only pay off for large numbers of input samples." />
</when>
</conditional>
</when>
<when value="pangolearn">
<expand macro="pangolin_data_sources">
<expand macro="cached_pangolin_data" />
<when value="download" />
</expand>
<conditional name="pangolin_data">
<param name="source" type="select" label="Version of pangolin-data to use"
help="Please note: pangoLEARN mode is considered deprecated and the underlying machine learning model has been removed from recent versions of pangolin-data. If you really still want to use this mode, you are restricted to the compatible historic pangolin-data versions cached on this Galaxy server.">
<option value="cached">Use specific pangolin-data version cached on this Galaxy server</option>
</param>
<when value="cached">
<param name="release" label="Cached release of pangolin-data" type="select">
<options from_data_table="pangolin_data">
<column name="value" index="0" />
<column name="description" index="1" />
<column name="date" index="3" />
<column name="path" index="4" />
<filter type="sort_by" column="3" />
<filter type="static_value" column="2" value="@MIN_COMPATIBLE_PANGOLIN_DATA_FORMAT_FOR_PANGOLEARN@" />
<validator type="no_options" message="No compatible cached pangolin-data release available" />
</options>
</param>
</when>
</conditional>
</when>
</conditional>
<conditional name="constellations">
Expand All @@ -231,7 +241,7 @@ $query
<column name="path" index="4" />
<filter type="sort_by" column="3" />
<filter type="regexp" column="2" value="@COMPATIBLE_SCORPIO_DATA_FORMAT@" />
<validator type="no_options" message="No cached constellations release available" />
<validator type="no_options" message="No compatible cached constellations release available" />
</options>
</param>
</when>
Expand All @@ -257,7 +267,7 @@ $query
</conditional>
</actions>
</data>
<data name="align1" format="fasta" label="pangolin alignment on ${on_string}">
<data name="align1" format="fasta" from_work_dir="aln.fa" label="pangolin alignment on ${on_string}">
<filter>alignment</filter>
</data>
</outputs>
Expand Down

0 comments on commit f93f921

Please sign in to comment.