changeset 3:b5411b5e8259 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/virheat commit 8f495733edea9287f6392a893c9429fd16b1cb1d
author iuc
date Mon, 26 Aug 2024 18:10:25 +0000
parents 927e55d1aa97
children
files macros.xml virheat.xml
diffstat 2 files changed, 20 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Mon Jun 03 11:50:16 2024 +0000
+++ b/macros.xml	Mon Aug 26 18:10:25 2024 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">0.7</token>
+    <token name="@TOOL_VERSION@">0.7.1</token>
     <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">21.01</token>
     <xml name="biotools">
--- a/virheat.xml	Mon Jun 03 11:50:16 2024 +0000
+++ b/virheat.xml	Mon Aug 26 18:10:25 2024 +0000
@@ -11,20 +11,16 @@
     <expand macro="requirements"/>
     <expand macro="version"/>
     <command detect_errors="exit_code"><![CDATA[
-#import re
-#set $vcfs_dir = 'vcfs_dir/'
-mkdir -p $vcfs_dir &&
+
 mkdir -p ./output_dir &&
 #set $outfile = 'tmp_output.' + str($advanced.output_type)
-#for $input_file in $sinputs
-    #set $file_path = $vcfs_dir + re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier))
-    ln -s '$input_file' '$file_path' &&
-#end for
 #set $output_dir = 'output_dir/'
+bash vcfs_to_dir.sh &&
 virheat
-    '$vcfs_dir'
+    'vcfs_dir/'
     '$output_dir'
     --name '$outfile'
+    -r '$ref_id'
     #if $genome_data.choice == 'length'
         -l $genome_data.genome_length
     #else
@@ -55,6 +51,20 @@
         #end if
     #end for
     ]]></command>
+    <configfiles>
+        <configfile filename="vcfs_to_dir.sh"><![CDATA[
+mkdir -p 'vcfs_dir/' &&
+#for $input_file in $sinputs
+#set $sample_id = $input_file.element_identifier.replace("'", '_').replace('/', '_')
+#set $file_path = 'vcfs_dir/' + $sample_id
+#if not $file_path.endswith('.vcf'):
+#set $file_path = $file_path + '.vcf'
+#end if
+ln -s '$input_file' '$file_path' &&
+#end for
+echo "VCF files are placed in vcfs_dir/."
+    ]]></configfile>
+    </configfiles>
     <inputs>
         <param name="sinputs" type="data_collection" format="vcf" label="Variant lists data" help="Select at least two datasets (or a dataset collection) with variant lists. Datasets are expected to represent individual samples and dataset names will be used as sample identifiers." multiple="true" collection_type="list" />
         <conditional name="genome_data">
@@ -73,6 +83,7 @@
                 </repeat>
             </when>
         </conditional>
+        <param name="ref_id" argument="-r" type="text" optional="false" label="Reference identifier" help="Specify the ref id and generate plots for vcf with multiple refs, e.g. segmented viruses."/>
         <param name="varfreq" argument="-t" type="float" min="0" max="1" value="0" optional="true" label="Variant Frequency Threshold" help="Only plot variants with an intrasample frequency above this threshold in at least one sample." />
         <param argument="--delete" type="boolean" truevalue="--delete" falsevalue="--no-delete" checked="true" label="Delete mutations that are present in all samples and their maximum frequency divergence is smaller than 0.5"/>
         <param name="delete_n" argument="-n" type="integer" min="0" value="0" label="Do not show mutations that occur n times or less"/>