Repository 'polypolish'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/polypolish

Changeset 1:bd2a15dbcea1 (2023-10-20)
Previous changeset 0:aaa868913641 (2022-09-22) Next changeset 2:f355085dd2aa (2024-01-11)
Commit message:
planemo upload for repository https://github.com/mesocentre-clermont-auvergne/galaxy-tools/tree/master/tools/polypolish commit afc3449a0b68d43fd1179543815dfe23b951e157
modified:
macro.xml
polypolish.xml
b
diff -r aaa868913641 -r bd2a15dbcea1 macro.xml
--- a/macro.xml Thu Sep 22 07:51:48 2022 +0000
+++ b/macro.xml Fri Oct 20 12:41:27 2023 +0000
[
@@ -1,7 +1,7 @@
 
 <macros>
   <token name="@TOOL_VERSION@">0.5.0</token>
-  <token name="@VERSION_SUFFIX@">0</token>
+  <token name="@VERSION_SUFFIX@">1</token>
   <token name="@PROFILE@">21.05</token>
   <token name="@THREADS@">\${GALAXY_SLOTS:-7}</token>
   <xml name="version_command">
@@ -33,8 +33,8 @@
               <option value="non_filter"> No filtering step</option>
           </param>
           <when value="filter">
-              <param name="low" argument="--low" type="float" min="0" value="0.1" label="Low percentile threshold" help="Select the lower value to remove [default: 0.1]"/>
-              <param name="high" argument="--high" type="float" min="0" value="99.9" label="High percentile threshold" help="Select the lower value to remove [default: 99.9]"/>
+              <param argument="--low" type="float" min="0" value="0.1" label="Low percentile threshold" help="Select the lower value to remove [default: 0.1]"/>
+              <param argument="--high" type="float" min="0" value="99.9" label="High percentile threshold" help="Select the lower value to remove [default: 99.9]"/>
           </when>
           <when value="non_filter">
           </when>
b
diff -r aaa868913641 -r bd2a15dbcea1 polypolish.xml
--- a/polypolish.xml Thu Sep 22 07:51:48 2022 +0000
+++ b/polypolish.xml Fri Oct 20 12:41:27 2023 +0000
[
b'@@ -14,25 +14,31 @@\n                     For single SAM\n         ======================================*#\n         #if $input.sam_data_type.sam_selector == \'single\'\n-            #if $input.sam_data_type.single_sam.ext == \'unsorted.bam\'\n+            #if $input.sam_data_type.single_sam.is_of_type("unsorted.bam")\n                 samtools view -h $input.sam_data_type.single_sam > input_sam &&\n             #elif $input.sam_data_type.single_sam.ext == \'sam\'\n                 ln -s $input.sam_data_type.single_sam input_sam &&\n+            #else\n+                echo "${input.sam_data_type.single_sam} not a sam/bam file"\n             #end if\n             polypolish input_data input_sam > \'$polished_fasta\'\n         #*======================================\n                     For paired SAM\n         ======================================*#\n         #elif $input.sam_data_type.sam_selector == \'paired\'\n-            #if $input.sam_data_type.R1_sam.ext == \'unsorted.bam\'\n+            #if $input.sam_data_type.R1_sam.is_of_type("unsorted.bam")\n                 samtools view -h $input.sam_data_type.R1_sam > sample_R1.sam &&\n             #elif $input.sam_data_type.R1_sam.ext == \'sam\'\n                 ln -s \'$input.sam_data_type.R1_sam\' sample_R1.sam &&\n+            #else\n+                echo "${input.sam_data_type.single_sam} not a sam/bam file"\n             #end if\n-            #if $input.sam_data_type.R2_sam.ext == \'unsorted.bam\'\n+            #if $input.sam_data_type.R2_sam.is_of_type("unsorted.bam")\n                 samtools view -h $input.sam_data_type.R2_sam > sample_R2.sam &&\n             #elif $input.sam_data_type.R2_sam.ext == \'sam\'\n                 ln -s \'$input.sam_data_type.R2_sam\' sample_R2.sam &&\n+            #else\n+                echo "${input.sam_data_type.single_sam} not a sam/bam file"\n             #end if\n             #if $input.sam_data_type.insert_filter.filter_select == \'filter\'\n                 polypolish_insert_filter.py --low \'$input.sam_data_type.insert_filter.low\'\n@@ -51,10 +57,12 @@\n         #elif $input.sam_data_type.sam_selector == \'multiple_single\'\n             mkdir single_collection &&\n             #for $value, $single_sam in enumerate($input.sam_data_type.single_collection):\n-                #if $single_sam.ext == \'unsorted.bam\'\n+                #if $single_sam.is_of_type("unsorted.bam")\n                     samtools view -h $single_sam > \'single_collection/$(single_sam.element_identifier).sam\' &&\n                 #elif $single_sam.ext == \'sam\'\n                     ln -s $single_sam \'single_collection/$(single_sam.element_identifier).$(single_sam.ext)\' &&\n+                #else\n+                    echo "${single_sam} is not a sam/bam file"\n                 #end if\n             #end for\n             polypolish input_data single_collection/*.sam > \'$polished_fasta\'\n@@ -64,12 +72,12 @@\n         #elif $input.sam_data_type.sam_selector == "multiple_paired"\n             mkdir paired_collection &&\n             #for $value, $paired_sam in enumerate($input.sam_data_type.paired_collection):\n-                #if $paired_sam.forward.ext == \'unsorted.bam\'\n+                #if $paired_sam.forward.is_of_type("unsorted.bam")\n                     samtools view -h $paired_sam.forward > \'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam\' &&\n                 #else\n                     ln -s \'$paired_sam.forward\' \'paired_collection/forward_input$(value)$(paired_sam.forward.element_identifier).sam\' &&\n                 #end if\n-                #if $paired_sam.reverse.ext == \'unsorted.bam\'\n+                #if $paired_sam.reverse.is_of_type("unsorted.bam")\n                     samtools view -h $paired_sam.reverse > \'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam\' &&\n                 #else\n                     ln -s \'$paired_sam.reverse\' \'paired_collection/reverse_input$(value)$(paired_sam.reverse.element_identifier).sam\' &&\n@@ -135,16 +143,16 @@\n             </co'..b'rue" falsevalue="false" label="Keep per base information file"/>\n         </section>\n     </inputs>\n     <outputs>\n@@ -343,9 +351,9 @@\n                     <param name="sam_selector" value="multiple_single"/>\n                     <param name="single_collection">\n                         <collection type="list">\n-                            <element name="R1_sam" value="aligned_test_file/alignement_R1.bam" ftype="unsorted.bam"/>\n-                            <element name="R1_bis_sam" value="aligned_test_file/alignement_R1_bis.bam" ftype="unsorted.bam"/>\n-                            <element name="R1_ter_sam" value="aligned_test_file/alignement_R1_ter.bam" ftype="unsorted.bam"/>\n+                            <element name="R1_sam" value="aligned_test_file/alignement_R1.sam" ftype="sam"/>\n+                            <element name="R1_bis_sam" value="aligned_test_file/alignement_R1_bis.sam" ftype="sam"/>\n+                            <element name="R1_ter_sam" value="aligned_test_file/alignement_R1_ter.sam" ftype="sam"/>\n                         </collection>\n                     </param>\n                 </conditional>\n@@ -392,6 +400,34 @@\n             </section>\n             <output name="polished_fasta" value="polished.fasta"/>\n         </test>\n+        <!-- Test_12 Test with bam files -->\n+        <test expect_num_outputs="1">\n+            <section name="input">\n+                <param name="fasta_file" value="contigs.fa"/>\n+                <conditional name="sam_data_type">\n+                    <param name="sam_selector" value="single"/>\n+                    <param name="single_sam" value="aligned_test_file/alignement_R1.bam"/>\n+                </conditional>\n+            </section>\n+            <output name="polished_fasta" value="polished.fasta"/>\n+        </test>\n+        <!-- Test_13 paired bam -->\n+        <test expect_num_outputs="2">\n+            <section name="input">\n+                <param name="fasta_file" value="contigs.fa"/>\n+                <conditional name="sam_data_type">\n+                    <param name="sam_selector" value="paired"/>\n+                    <param name="R1_sam" value="aligned_test_file/alignement_R1.bam"/>\n+                    <param name="R2_sam" value="aligned_test_file/alignement_R2.bam"/>\n+                </conditional>\n+            </section>\n+            <section name="options">\n+                <param name="debug" value="true"/>\n+                <param name="keep_logfile" value="false"/>\n+            </section>\n+            <output name="polished_fasta" value="polished.fasta"/>\n+            <output name="debug_file" value="debug_file_test_2.tsv"/>\n+        </test>\n     </tests>\n   <help><![CDATA[\n     **What it does**\n@@ -401,10 +437,12 @@\n \n     **Polypolish pipeline steps**\n     1. [Optional] Filter aligned reads\n-        - Exclude some alignments based on their insert size\n-        - This should reduce the number of excessive alignments, particularly near the edges of repeat sequences, improving Polypolish\'s ability to fix errors in those regions.\n+    Exclude some alignments based on their insert size\n+    This should reduce the number of excessive alignments,\n+    particularly near the edges of repeat sequences, improving Polypolish\'s ability to fix errors in those regions.\n     2. Clean assembly with filtered reads\n \n+\n     **Inputs**\n     Polypolish need SAM/BAM input format obtain from aligner with option to keep all possible location\n     Polypolish take on or more assembly as input fasta.\n@@ -414,9 +452,7 @@\n     For example using bwa mem to align raw data before use, you need :\n     1. To align each read data independantly (also for paired data)\n     2. Set the option "Output all alignments for single-ends or unpaired paired-ends" in Select analysis mode>Set input/output options\n-      - This allow multiple ailgnemnt output need to use polypolish\n-\n-      \n+    This allow multiple ailgnemnt output need to use polypolish\n   ]]></help>\n     <expand macro="citations"/>\n </tool>\n'