changeset 1:6956f0783d77 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicstuff commit c1b3c8d3e6a2f18ae89918e89d8dc8a3a0a6d24c
author iuc
date Fri, 04 Oct 2024 08:48:01 +0000
parents 1efd17d2bfdb
children 7beecdd0976f
files hicstuff_pipeline.xml macros.xml
diffstat 2 files changed, 80 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/hicstuff_pipeline.xml	Fri Nov 25 11:32:55 2022 +0000
+++ b/hicstuff_pipeline.xml	Fri Oct 04 08:48:01 2024 +0000
@@ -2,7 +2,7 @@
     <description>generates a Hi-C contact matrix</description>
     <macros>
         <import>macros.xml</import>
-        <token name="@VERSION_SUFFIX@">0</token>
+        <token name="@VERSION_SUFFIX@">1</token>
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
@@ -18,7 +18,7 @@
     --matfmt $matfmt
     --quality-min $quality_min
     --size $size
-    --threads \${GALAXY_SLOTS:-1}
+    --threads "\${GALAXY_SLOTS:-1}"
     #if $paired_cond.paired_select == "paired"
         '$paired_cond.reads.forward'
         '$paired_cond.reads.reverse'
@@ -65,16 +65,83 @@
         <param argument="--size" type="integer" value="0" label="Minimum size threshold to consider contigs. Keep all contigs by default."/>
     </inputs>
     <outputs>
-        <data name="abs_fragments_contacts_weighted" from_work_dir="./results/abs_fragments_contacts_weighter.txt" format="tabular"/>
-        <data name="fragments_list" from_work_dir="./results/fragments_list.txt" format="tabular"/>
-        <data name="info_contigs" from_work_dir="./results/info_contigs.txt" format="tabular"/>
+        <data name="abs_fragments_contacts_weighted_graal" from_work_dir="./results/abs_fragments_contacts_weighted.txt" format="tabular" label="${tool.name} on ${on_string}: Contact matrix (graal)">
+            <filter>matfmt == "graal"</filter>
+        </data>
+        <data name="abs_fragments_contacts_weighted_bg2" from_work_dir="./results/abs_fragments_contacts_weighted.bg2" format="tabular" label="${tool.name} on ${on_string}: Contact matrix (bg2)">
+            <filter>matfmt == "bg2"</filter>
+        </data>
+        <data name="abs_fragments_contacts_weighted_cool" from_work_dir="./results/abs_fragments_contacts_weighted.cool" format="cool" label="${tool.name} on ${on_string}: Contact matrix (cool)">
+            <filter>matfmt == "cool"</filter>
+        </data>
+        <data name="fragments_list" from_work_dir="./results/fragments_list.txt" format="tabular" label="${tool.name} on ${on_string}: Fragment list"/>
+        <data name="info_contigs" from_work_dir="./results/info_contigs.txt" format="tabular" label="${tool.name} on ${on_string}: Contig info"/>
     </outputs>
     <tests>
-        <test>
+        <test expect_num_outputs="3">
             <param name="genome" value="seq.fa.gz" />
             <param name="paired_cond|paired_select" value="separate"/>
             <param name="paired_cond|forward_reads" value="sample.reads_for.fastq.gz" />
             <param name="paired_cond|reverse_reads" value="sample.reads_rev.fastq.gz" />
+            <output name="abs_fragments_contacts_weighted_graal">
+                <assert_contents>
+                    <has_n_lines n="77"/>
+                    <has_n_columns n="3"/>
+                </assert_contents>
+            </output>
+            <output name="fragments_list">
+                <assert_contents>
+                    <has_n_lines n="17"/>
+                    <has_n_columns n="6"/>
+                </assert_contents>
+            </output>
+            <output name="info_contigs" file="info_contigs.txt"/>
+            <assert_stderr>
+                <has_text text="Contact map generated" />
+            </assert_stderr>
+        </test>
+        <!-- bg2 format -->
+        <test expect_num_outputs="3">
+            <param name="genome" value="seq.fa.gz" />
+            <param name="paired_cond|paired_select" value="separate"/>
+            <param name="paired_cond|forward_reads" value="sample.reads_for.fastq.gz" />
+            <param name="paired_cond|reverse_reads" value="sample.reads_rev.fastq.gz" />
+            <param name="matfmt" value="bg2"/>
+            <output name="abs_fragments_contacts_weighted_bg2">
+                <assert_contents>
+                    <has_n_lines n="76"/>
+                    <has_n_columns n="7"/>
+                </assert_contents>
+            </output>
+            <output name="fragments_list">
+                <assert_contents>
+                    <has_n_lines n="17"/>
+                    <has_n_columns n="6"/>
+                </assert_contents>
+            </output>
+            <output name="info_contigs" file="info_contigs.txt"/>
+            <assert_stderr>
+                <has_text text="Contact map generated" />
+            </assert_stderr>
+        </test>
+        <!-- cool format -->
+        <test expect_num_outputs="3">
+            <param name="genome" value="seq.fa.gz" />
+            <param name="paired_cond|paired_select" value="separate"/>
+            <param name="paired_cond|forward_reads" value="sample.reads_for.fastq.gz" />
+            <param name="paired_cond|reverse_reads" value="sample.reads_rev.fastq.gz" />
+            <param name="matfmt" value="cool"/>
+            <output name="abs_fragments_contacts_weighted_cool">
+                <assert_contents>
+                    <has_h5_keys keys="bins,chroms,indexes,pixels"/>
+                </assert_contents>
+            </output>
+            <output name="fragments_list">
+                <assert_contents>
+                    <has_n_lines n="17"/>
+                    <has_n_columns n="6"/>
+                </assert_contents>
+            </output>
             <output name="info_contigs" file="info_contigs.txt"/>
             <assert_stderr>
                 <has_text text="Contact map generated" />
@@ -98,9 +165,9 @@
 ------------
 Output files
 ------------
-* abs_fragments_contacts_weighter.txt: Sparse matrix file with 3 columns the rows, column and values of nonzero pixels. The first row contains the shape and total number of nonzero pixels in the matrix.
-* fragments_list.txt: Contains genomic coordinates of the matrix bins (row/columns).
-* info_contigs.txt: Contains chromosome names, theirs length and number of bins.
+* Contact matrix: Sparse matrix file with 3 columns the rows, column and values of nonzero pixels. The first row contains the shape and total number of nonzero pixels in the matrix.
+* Fragment ist: Contains genomic coordinates of the matrix bins (row/columns).
+* Contig info.txt: Contains chromosome names, theirs length and number of bins.
 
     ]]></help>
     <expand macro="citations" />
--- a/macros.xml	Fri Nov 25 11:32:55 2022 +0000
+++ b/macros.xml	Fri Oct 04 08:48:01 2024 +0000
@@ -1,9 +1,11 @@
 <macros>
-    <token name="@TOOL_VERSION@">3.1.5</token>
+    <token name="@TOOL_VERSION@">3.1.5</token><!-- TODO remove cooler and biopython requirement on update -->
     <token name="@PROFILE@">21.09</token>
     <xml name="requirements">
         <requirements>
-        <requirement type="package" version="3.1.5">hicstuff</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">hicstuff</requirement>
+            <requirement type="package" version="0.10.2">cooler</requirement>
+            <requirement type="package" version="1.80">biopython</requirement>
             <yield/>
         </requirements>
     </xml>