diff extract_fasta_bins.xml @ 3:bcd8d64f82b7 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/concoct commit 1a79c139165648b969d82530784cea3fc8f2d2c0"
author iuc
date Thu, 07 Jul 2022 08:33:11 +0000
parents a04028a8181d
children 8b1b09fcd8b7
line wrap: on
line diff
--- a/extract_fasta_bins.xml	Fri Jul 01 14:16:40 2022 +0000
+++ b/extract_fasta_bins.xml	Thu Jul 07 08:33:11 2022 +0000
@@ -1,45 +1,49 @@
-<tool id="concoct_extract_fasta_bins" name="CONCOCT: extract a fasta file" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+<tool id="concoct_extract_fasta_bins" name="CONCOCT: Extract a fasta file" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>for each cluster</description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[
+## CONCOCT doesn't handle gzipped files.
+#if $fasta_file.ext.endswith(".gz")
+    gunzip -c '$fasta_file' > 'contigs.fa' &&
+#else:
+    ln -s '$fasta_file' 'contigs.fa' &&
+#end if
+
 mkdir outdir &&
-python '$__tool_directory__/extract_fasta_bins.py'
-#if $input_fasta.is_of_type('fasta.gz'):
-    --gzipped
-#end if
---input_fasta '$input_fasta'
---input_cluster '$input_cluster'
---output_path 'outdir'
+extract_fasta_bins.py
+    'contigs.fa'
+    '$cluster_file'
+    --output_path 'outdir'
     ]]></command>
     <inputs>
-        <param argument="--input_fasta" type="data" format="fasta,fasta.gz" label="Fasta file"/>
-        <param argument="--input_cluster" type="data" format="tabular" label="CONCOCT clustering file"/>
+        <param name="fasta_file" type="data" format="fasta,fasta.gz" label="Original contig file"/>
+        <param name="cluster_file" type="data" format="csv" label="CONCOCT clusters"/>
     </inputs>
     <outputs>
-        <collection name="bins" type="list" label="${tool.name} on ${on_string} (bins)">
+        <collection name="bins" type="list" label="${tool.name} on ${on_string} : Bins">
             <discover_datasets pattern="(?P&lt;designation&gt;.*)\.fa" format="fasta" directory="outdir"/>
         </collection>
     </outputs>
     <tests>
         <test expect_num_outputs="1">
-            <param name="input_fasta" value="input1.fa.gz" ftype="fasta.gz"/>
-            <param name="input_cluster" value="inputcluster1.tabular" ftype="tabular"/>
-            <output_collection name="bins" type="list" count="2">
-                <element name="77" ftype="fasta">
+            <param name="fasta_file" value="composition.fa.gz" ftype="fasta.gz"/>
+            <param name="cluster_file" value="clusters.csv" ftype="csv"/>
+            <output_collection name="bins" type="list" count="54">
+                <element name="0" ftype="fasta">
                     <assert_contents>
-                        <has_size value="2194"/>
-                        <has_text text="NODE_1_length_2054_cov_17.474684"/>
-                        <has_n_lines n="37"/>
+                        <has_size value="1194"/>
+                        <has_text text="contig-223000058 1140 nucleotides"/>
+                        <has_n_lines n="20"/>
                     </assert_contents>
                 </element>
-                <element name="93" ftype="fasta">
+                <element name="52" ftype="fasta">
                     <assert_contents>
-                        <has_size value="16531"/>
-                        <has_text text="NODE_2_length_16156_cov_8.219856"/>
-                        <has_n_lines n="272"/>
+                        <has_size value="5356"/>
+                        <has_text text="contig-161000004 1031 nucleotides"/>
+                        <has_n_lines n="90"/>
                     </assert_contents>
                 </element>
             </output_collection>
@@ -48,11 +52,9 @@
     <help><![CDATA[
 **What it does**
 
-Performs metagenomic binning of fasta contigs by extracting a fasta file for each cluster defined in a
-CONCOCT clustering file.
+Performs metagenomic binning of fasta contigs by extracting a fasta file for each cluster defined in a CONCOCT clustering file.
 
-The tool accepts two inputs; the fasta contigs file and the CONCOCT clustering file that was produced using
-the same fasta contigs input.  A collection of fasta files is produced.
+The tool accepts two inputs; the fasta contigs file and the CONCOCT clustering file that was produced using the same fasta contigs input.  A collection of fasta files is produced.
 
 @HELP_OVERVIEW@
     ]]></help>