diff cut_up_fasta.xml @ 0:b9d37d30731e draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/concoct commit 40a09cbfd6052f7b0295946621db1bdf58228b09"
author iuc
date Sun, 13 Mar 2022 08:43:39 +0000
parents
children 0132036a530a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cut_up_fasta.xml	Sun Mar 13 08:43:39 2022 +0000
@@ -0,0 +1,94 @@
+<tool id="concoct_cut_up_fasta" name="CONCOCT: cut fasta contigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>into equal length non-overlapping or overlapping parts</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+python '$__tool_directory__/cut_up_fasta.py'
+--input_fasta '$input_fasta'
+#if $input_fasta.is_of_type('fasta.gz'):
+    --gzipped
+#end if
+--chunk_size $chunk_size
+--overlap_size $overlap_size
+$merge_last
+#if str($output_bed_param) == 'yes':
+    --output_bed '$output_bed'
+#end if
+--output_fasta '$output_fasta'
+    ]]></command>
+    <inputs>
+        <param name="input_fasta" type="data" format="fasta,fasta.gz" label="Fasta contigs file"/>
+        <param argument="--chunk_size" type="integer" value="1999" label="Chunk size"/>
+        <param argument="--overlap_size" type="integer" value="1900" label="Overlap size" help="Zero value produces non-overlapping parts"/>
+        <param argument="--merge_last" type="boolean" truevalue="--merge_last" falsevalue="" checked="false" label="Concatenate final part to last contig?"/>
+        <param name="output_bed_param" type="select" label="Output bed file with exact regions of the original contigs corresponding to the newly created contigs?" help="Can be used as input to the SAMTools bedcov tool">
+            <option value="no" selected="true">No</option>
+            <option value="yes">Yes</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output_bed" format="bed" label="${tool.name} on ${on_string} (bed)">
+            <filter>output_bed_param == 'yes'</filter>
+        </data>
+        <data name="output_fasta" format="fasta" label="${tool.name} on ${on_string} (contigs)"/>
+    </outputs>
+    <tests>
+        <!-- default settings -->
+        <test expect_num_outputs="1">
+            <param name="input_fasta" value="input.fasta.gz" ftype="fasta.gz"/>
+            <output name="output_fasta" ftype="fasta">
+                <assert_contents>
+                    <has_size value="2366"/>
+                    <has_text text="116"/>
+                    <has_n_lines n="100"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!-- merge_last and  output bed file -->
+        <test expect_num_outputs="2">
+            <param name="input_fasta" value="input.fasta.gz" ftype="fasta.gz"/>
+            <param name="merge_last" value="--merge_last"/>
+            <param name="output_bed_param" value="yes"/>
+            <output name="output_bed" ftype="bed">
+                <assert_contents>
+                    <has_size value="1332"/>
+                    <has_text text="116"/>
+                    <has_n_lines n="50"/>
+                </assert_contents>
+            </output>
+            <output name="output_fasta" ftype="fasta">
+                <assert_contents>
+                    <has_size value="2366"/>
+                    <has_text text="116"/>
+                    <has_n_lines n="100"/>
+                </assert_contents>
+            </output>
+        </test>
+        <!-- Change chunk size and overlap size -->
+        <test expect_num_outputs="1">
+            <param name="input_fasta" value="input.fasta.gz" ftype="fasta.gz"/>
+            <param name="chunk_size" value="500"/>
+            <param name="overlap_size" value="499"/>
+            <output name="output_fasta" ftype="fasta">
+                <assert_contents>
+                    <has_size value="2366"/>
+                    <has_text text="116"/>
+                    <has_n_lines n="100"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+**What it does**
+
+Accepts a fasta file containing contigs, cuts them into non-overlapping or overlapping parts of equal length, and produces
+a fasta file containing the cut contigs.  An optional output BED file can be produced, where the cut contigs are specified
+in terms of the original contigs.  Using this file as input to a BED coverage tool (e.g., bedtools Compute both the length
+and depth of coverage) will produce a file that can be used as input to the CONCOCT Create coverage table tool.
+
+@HELP_OVERVIEW@
+    ]]></help>
+    <expand macro="citations"/>
+</tool>