changeset 13:e9ee4d074d5d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken2_database/ commit bb6d9b53b197610c5dbbb40c8ab590761755d91a
author iuc
date Fri, 15 Nov 2024 22:31:29 +0000
parents 90b4d4f0a3a4
children 8c533e19b697
files data_manager/kraken2_build_database.py data_manager/kraken2_build_database.xml
diffstat 2 files changed, 27 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/kraken2_build_database.py	Fri Oct 18 17:08:15 2024 +0000
+++ b/data_manager/kraken2_build_database.py	Fri Nov 15 22:31:29 2024 +0000
@@ -28,6 +28,7 @@
     standard_local_build = 'standard_local_build'
     standard_prebuilt = 'standard_prebuilt'
     minikraken = 'minikraken'
+    special_prebuilt = 'special_prebuilt'
     special = 'special'
     custom = 'custom'
 
@@ -64,6 +65,7 @@
     pluspfp = "pluspfp"
     pluspfp_08gb = "pluspfp_08gb"
     pluspfp_16gb = "pluspfp_16gb"
+    eupathdb48 = "eupathdb48"
 
     def __str__(self):
         return self.value
@@ -144,7 +146,8 @@
         'pluspf_16gb': "PlusPF-16 (PlusPF with DB capped at 16 GB)",
         'pluspfp': "PlusPFP (Standard plus protozoa, fungi and plant)",
         'pluspfp_08gb': "PlusPFP-8 (PlusPFP with DB capped at 8 GB)",
-        'pluspfp_16gb': "PlusPFP-16 (PlusPFP with DB capped at 16 GB)"
+        'pluspfp_16gb': "PlusPFP-16 (PlusPFP with DB capped at 16 GB)",
+        'eupathdb48': "EuPathDB-46",
     }
 
     database_value = "_".join([
@@ -408,7 +411,7 @@
     parser.add_argument('--threads', dest='threads', default=1, help='threads')
     parser.add_argument('--database-type', dest='database_type', type=KrakenDatabaseTypes, choices=list(KrakenDatabaseTypes), required=True, help='type of kraken database to build')
     parser.add_argument('--minikraken2-version', dest='minikraken2_version', type=Minikraken2Versions, choices=list(Minikraken2Versions), help='MiniKraken2 version (only applies to --database-type minikraken)')
-    parser.add_argument('--prebuilt-db', dest='prebuilt_db', type=StandardPrebuiltSizes, choices=list(StandardPrebuiltSizes), help='Prebuilt database to download. Only applies to --database-type standard_prebuilt.')
+    parser.add_argument('--prebuilt-db', dest='prebuilt_db', type=StandardPrebuiltSizes, choices=list(StandardPrebuiltSizes), help='Prebuilt database to download. Only applies to --database-type standard_prebuilt or special_prebuilt.')
     parser.add_argument('--prebuilt-date', dest='prebuilt_date', help='Database build date (YYYY-MM-DD). Only applies to --database-type standard_prebuilt.')
     parser.add_argument('--special-database-type', dest='special_database_type', type=SpecialDatabaseTypes, choices=list(SpecialDatabaseTypes), help='type of special database to build (only applies to --database-type special)')
     parser.add_argument('--custom-fasta', dest='custom_fasta', help='fasta file for custom database (only applies to --database-type custom)')
@@ -446,7 +449,7 @@
             kraken2_args,
             target_directory,
         )
-    elif str(args.database_type) == 'standard_prebuilt':
+    elif str(args.database_type) in ('standard_prebuilt', 'special_prebuilt'):
         data_manager_output = kraken2_build_standard_prebuilt(
             str(args.prebuilt_db),
             str(args.prebuilt_date),
--- a/data_manager/kraken2_build_database.xml	Fri Oct 18 17:08:15 2024 +0000
+++ b/data_manager/kraken2_build_database.xml	Fri Nov 15 22:31:29 2024 +0000
@@ -1,9 +1,8 @@
-<?xml version="1.0"?>
 <tool id="kraken2_build_database" name="Kraken2" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>database builder</description>
     <macros>
         <token name="@TOOL_VERSION@">2.1.3</token>
-        <token name="@VERSION_SUFFIX@">3</token>
+        <token name="@VERSION_SUFFIX@">4</token>
         <token name="@PROFILE@">22.01</token>
         <xml name="common_params">
             <param name="kmer_len" type="integer" value="35" label="K-mer length in BP" />
@@ -70,6 +69,9 @@
     --prebuilt-date '$database_type.prebuild.prebuilt_date'
 #else if $database_type.database_type == "minikraken"
     --minikraken2-version '$database_type.minikraken2_version'
+#else if $database_type.database_type == "special_prebuilt"
+    --prebuilt-db '$database_type.special_prebuild.prebuilt_db'
+    --prebuilt-date '$database_type.special_prebuild.prebuilt_date'
 #else if $database_type.database_type == "special"
     --threads \${GALAXY_SLOTS:-1}
     --special-database-type '$database_type.special_database_type'
@@ -98,6 +100,7 @@
                 <option value="standard_local_build">Standard, Local Build</option>
                 <option value="standard_prebuilt">Pre-Built Refseq indexes</option>
                 <option value="minikraken">MiniKraken</option>
+                <option value="special_prebuilt">Special Pre-Built indexes</option>
                 <option value="special">Special</option>
                 <option value="custom">Custom</option>
             </param>
@@ -223,6 +226,22 @@
                     </when>
                 </conditional>
             </when>
+            <when value="special_prebuilt">
+                <conditional name="special_prebuild">
+                    <param name="special_prebuilt_db" type="select" multiple="false" label="Select pre-built database to download">
+                        <option value="eupathdb48_20230407">EuPathDB-46 (April 7, 2023)</option>
+                        <option value="eupathdb48_20201113">EuPathDB-46 (November 13, 2020)</option>
+                    </param>
+                    <when value="eupathdb48_20230407">
+                        <param name="prebuilt_db" type="hidden" value="eupathdb48"/>
+                        <param name="prebuilt_date" type="hidden" value="2023-04-07"/>
+                    </when>
+                    <when value="eupathdb48_20201113">
+                        <param name="prebuilt_db" type="hidden" value="eupathdb48"/>
+                        <param name="prebuilt_date" type="hidden" value="2020-11-13"/>
+                    </when>
+                </conditional>
+            </when>
             <when value="minikraken">
                 <param name="minikraken2_version" type="select" multiple="false" label="Select MiniKraken2 database version to download">
                     <option value="v2">Version 2</option>