changeset 15:58006290e654 draft

planemo upload commit 07e8ec488fa1fb8323b5e90bfc9842aa7337b950
author galaxytrakr
date Thu, 30 Apr 2026 19:20:50 +0000
parents 9a84b8511fc2
children 706b2bbc64ed
files plasmidtrakr.xml
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/plasmidtrakr.xml	Thu Apr 30 13:04:42 2026 +0000
+++ b/plasmidtrakr.xml	Thu Apr 30 19:20:50 2026 +0000
@@ -1,4 +1,4 @@
-<tool id="plasmidtrakr" name="PlasmidTrakr" version="0.2.0">
+<tool id="plasmidtrakr" name="PlasmidTrakr" version="0.2.1">
     <description>Screens assemblies against a Mash database and predicts isolate source using a trained machine learning model</description>
     
     <requirements>
@@ -8,26 +8,32 @@
     </requirements>
 
     <command detect_errors="exit_code"><![CDATA[
-        ## 1. Symlink the Mash database from the tool data table
+        ## 1. Create a sanitized variable for the input name (removes spaces/special chars for the shell)
+        #set $input_name = $assembly_input.element_identifier.replace(" ", "_")
+
+        ## 2. Symlink the Mash database
         ln -s '$mash_database.fields.path' queries.msh &&
-        
-        ## 2. Run Mash Screen internally
+
+        ## 3. Run Mash Screen
+        ## We redirect the output to a file named after the original input
         mash screen
             -w
             -i $threshold
             queries.msh
             '$assembly_input'
-            > mash_results.tabular
+         > '${input_name}.tabular'
         &&
-        
-        ## 3. Run PlasmidTrakr prediction
+
+        ## 4. Run PlasmidTrakr prediction
+        ## We pass the newly named file to the python script
         python $__tool_directory__/predict_source.py
-            -i mash_results.tabular
+            -i '${input_name}.tabular'
             -b '$model_selection.fields.path'
             -t $threshold
             -o '$prediction_output'
     ]]></command>
 
+
     <inputs>
         <param name="assembly_input" type="data" format="fasta,fasta.gz,fastq,fastq.gz" label="Genome Assembly / Reads" help="The FASTA/FASTQ file containing the isolate sequence."/>