changeset 1:29151e779524 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/purge_dups commit 6b395e598c4a02bb193895da5a2d9dd4240b1848"
author iuc
date Tue, 09 Mar 2021 18:25:07 +0000
parents 8ec117da1796
children 17b378303f2d
files purge_dups.xml test-data/test.paf.gz
diffstat 2 files changed, 56 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/purge_dups.xml	Fri Feb 05 17:52:51 2021 +0000
+++ b/purge_dups.xml	Tue Mar 09 18:25:07 2021 +0000
@@ -1,14 +1,17 @@
-<tool id="purge_dups" name="Purge haplotigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
-    <description>and overlaps in an assembly based on read depth</description>
+<tool id="purge_dups" name="Purge overlaps" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
+    <description>and haplotigs in an assembly based on read depth (purge_dups)</description>
     <macros>
         <token name="@TOOL_VERSION@">1.2.5</token>
-        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@VERSION_SUFFIX@">1</token>
     </macros>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">purge_dups</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
         #if $function_select.functions == "purge_dups":
+            #if $function_select.input.is_of_type("paf"):
+                gzip -c '$function_select.input' > ./input.paf.gz &&
+            #end if
             purge_dups
             #if $function_select.coverage:
                 -c '$function_select.coverage'
@@ -43,7 +46,11 @@
             #if $function_select.max_extend:
                 -E $function_select.max_extend
             #end if
-            '$function_select.input' > dups.bed 2> purge_dups.log
+            #if $function_select.input.is_of_type("paf"):
+                'input.paf.gz' > dups.bed 2> purge_dups.log
+            #else:
+                '${function_select.input}' > dups.bed 2> purge_dups.log
+            #end if
         #else if $function_select.functions == "split_fa":
             split_fa
             #if $function_select.split:
@@ -51,6 +58,9 @@
             #end if
             '$function_select.input' > split.fasta
         #else if $function_select.functions == "pbcstat":
+            #if $function_select.input.is_of_type("paf"):
+                gzip -c '$function_select.input' > ./input.paf.gz &&
+            #end if
             pbcstat
             #if $function_select.max_cov:
                 -M $function_select.max_cov
@@ -65,7 +75,11 @@
                 -l $function_select.flank
             #end if
             $function_select.primary_alignments
-            '$function_select.input'
+            #if $function_select.input.is_of_type("paf"):
+                'input.paf.gz'
+            #else:
+                '${function_select.input}'
+            #end if
         #else if $function_select.functions == "ngscstat":
             ngscstat
             #if $function_select.min_align_qual:
@@ -123,7 +137,7 @@
                 <option value="get_seqs">obtain seqeuences after purging</option>
             </param>
             <when value="purge_dups">
-                <param name="input" type="data" format="paf" label="PAF input file"/>
+                <param name="input" type="data" format="paf,paf.gz" label="PAF input file"/>
                 <param name="coverage" type="data" format="tabular" optional="true" argument="-c" label="Base-level coverage file" />
                 <param name="cutoffs" type="data" format="tabular" label ="Cutoffs file" optional="true" argument="-T"/>
                 <param name="min_bad" type="float" min="0" max="1" argument="-f" optional="true" label="Minimum fraction of haploid/diploid/bad/repetitive bases in a sequence" help="Default = 0.8"/>
@@ -149,7 +163,7 @@
                 <param name="split" type="boolean" truevalue="-n" falsevalue="" checked="false" label="Base-level coverage file" />
             </when>
             <when value="pbcstat">
-                <param name="input" type="data" format="paf" label="PAF input file"/>
+                <param name="input" type="data" format="paf,paf.gz" label="PAF input file"/>
                 <param name="max_cov" type="integer" label="Maximum coverage" argument="-M" optional="true"/>
                 <param name="min_map_ratio" argument="-f" type="float" min="0" max="1" value="0" label="Minimum mapping length ratio"/>
                 <param name="min_map_qual" type="integer"  argument="-q" optional="true" label="Minimum mapping quality"/>
@@ -253,6 +267,27 @@
             </conditional>
             <output name="purge_dups_bed" value="purge_dups_out.bed"/>
         </test>
+        <!-- Purge dups gzip -->
+        <test expect_num_outputs="2">
+            <conditional name="function_select">
+                <param name="functions" value="purge_dups"/>
+                <param name="input" value="test.paf.gz" ftype="paf.gz"/>
+                <param name="coverage" value="test.cov" ftype="tabular"/>
+                <param name="cutoffs" value="cutoffs.tsv" ftype="tabular"/>
+                <param name="min_bad" value="0.01"/>
+                <param name="min_align" value="10"/>
+                <param name="min_match" value="100"/>
+                <param name="min_chain" value="1"/>
+                <param name="max_gap" value="1000"/>
+                <conditional name="double_chain">
+                    <param name="chaining_rounds" value="two"/>
+                    <param name="max_gap_2" value="1001"/>
+                </conditional>
+                <param name="min_chain_score" value="1"/>
+                <param name="max_extend" value="100"/>
+            </conditional>
+            <output name="purge_dups_bed" value="purge_dups_out.bed"/>
+        </test>
         <!-- Split fa -->
         <test expect_num_outputs="1">
             <conditional name="function_select">
@@ -276,6 +311,20 @@
             <output name="pbcstat_cov" value="out.cov"/>
             <output name="pbcstat_wig" value="out.wig"/>
         </test>
+        <!-- pbcstat gzip -->
+        <test expect_num_outputs="3">
+            <conditional name="function_select">
+                <param name="functions" value="pbcstat"/>
+                <param name="input" value="test.paf.gz" ftype="paf.gz"/>
+                <param name="max_cov" value="1000"/>
+                <param name="min_map_ratio" value="0.01"/>
+                <param name="min_map_qual" value="1"/>
+                <param name="flank" value="1"/>
+                <param name="primary_alignments" value="-p"/>
+            </conditional>
+            <output name="pbcstat_cov" value="out.cov"/>
+            <output name="pbcstat_wig" value="out.wig"/>
+        </test>
         <!-- ngscstat -->
         <test expect_num_outputs="2">
             <conditional name="function_select">
Binary file test-data/test.paf.gz has changed