changeset 8:d08c53f6425b draft

planemo upload for repository https://github.com/open2c/pairtools commit 5997d890c2a3fedff3c66d858cb1629b28138dc0
author iuc
date Wed, 13 Aug 2025 20:06:19 +0000
parents cfeb5205eacc
children fa6ff550886a
files macros.xml stats.xml test-data/output_dedup_pairs_markdups.pairsam.gz test-data/output_parsed_pairs_sam.pairs.gz test-data/output_parsed_pairs_sam_assemblyname.pairs.gz test-data/output_sorted_pairs.pairsam.gz test-data/pairs_output2.stats.gz
diffstat 7 files changed, 33 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Fri Jul 25 13:54:39 2025 +0000
+++ b/macros.xml	Wed Aug 13 20:06:19 2025 +0000
@@ -1,6 +1,7 @@
 <macros>
     <token name="@TOOL_VERSION@">1.1.3</token>
-    <token name="@SUFFIX_VERSION@">1</token>
+    <token name="@SUFFIX_VERSION@">3</token>
+    <token name="@PROFILE_VERSION@">25.0</token>
     <xml name="edam_ontology">
         <edam_datas>
             <edam_data>topic_1381</edam_data>
@@ -29,4 +30,4 @@
         <option value="3unique">3unique - Report the 3'-most unique alignment on each side, if present</option>
         <option value="all">all - Report all available unique alignments on each side</option>
     </xml>
-</macros>
\ No newline at end of file
+</macros>
--- a/stats.xml	Fri Jul 25 13:54:39 2025 +0000
+++ b/stats.xml	Wed Aug 13 20:06:19 2025 +0000
@@ -1,10 +1,25 @@
-<tool id="pairtools_stats" name="Pairtools Stats" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="23.2" license="MIT">
+<tool id="pairtools_stats" name="Pairtools Stats" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="@PROFILE_VERSION@" license="MIT">
     <description>Calculates pairs statistics for input pairs and pairsam files.</description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[
+        #if $merge:
+            #set $input_file_links = str($input_file).replace(',', ' ')
+        #else
+            #set $input_file_links = ""
+            #for $i, $f in enumerate($input_file):
+                #if $f.is_of_type('4dn_pairs.gz') or $f.is_of_type('4dn_pairsam.gz'):
+                    ln -s '$f' 'input_file_${i}.gz' &&
+                    #set $input_file_links += ' input_file_%d.gz ' % $i
+                #else:
+                    ln -s '$f' 'input_file_${i}' &&   
+                    #set $input_file_links += ' input_file_%d ' % $i
+                #end if
+            #end for
+        #end if
+
         pairtools stats
             $merge
             $with_chromsizes
@@ -12,12 +27,10 @@
             -o '$pairs_output'
             --nproc-in \${GALAXY_SLOTS:-4}
             --nproc-out \${GALAXY_SLOTS:-4}
-            #if $input_file:
-                ${str($input_file).replace(',', ' ')}
-            #end if
+            $input_file_links
     ]]></command>
     <inputs>
-        <param type="data" name="input_file" format="4dn_pairs,4dn_pairsam" multiple="true" label="Input pairs or pairsam file" help="Input 4dn pairs or pairsam file"></param>
+        <param type="data" name="input_file" format="4dn_pairs,4dn_pairsam,4dn_pairs.gz,4dn_pairsam.gz" multiple="true" label="Input pairs or pairsam file" help="Input 4dn pairs or pairsam file"></param>
         <param type="boolean" argument="--merge" truevalue="--merge" falsevalue="" checked="False" label="Merge input stats files" help="If selected, will merge multiple input stats files instead of calculating statistics of .pairs/.pairsam file"></param>
         <param type="boolean" argument="--with-chromsizes" truevalue="--with-chromsizes" falsevalue="" checked="False" label="Store sizes of chromosomes from the header of the pairs file in the stats file"></param>
         <param type="boolean" argument="--yaml" truevalue="--yaml" falsevalue="" checked="False" label="Output stats in yaml format instead of table"></param>
@@ -44,7 +57,7 @@
         </test>
         <!--Test 03 with pair files as input with additional chromsizes in output-->
         <test expect_num_outputs="1">
-            <param name="input_file" value="output_parsed_pairs_sam.pairs"/>
+            <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs"/>
             <param name="merge" value="false"/>
             <param name="with_chromsizes" value="true"/>
             <param name="yaml" value="false"/>
@@ -52,7 +65,15 @@
         </test>
          <!--Test 04 with pair files as input and yaml output format-->
         <test expect_num_outputs="1">
-            <param name="input_file" value="output_parsed_pairs_sam.pairs"/>
+            <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs"/>
+            <param name="merge" value="false"/>
+            <param name="with_chromsizes" value="false"/>
+            <param name="yaml" value="true"/>
+            <output name="pairs_output" ftype="tabular" file="pairs_output_yaml.stats"/>
+        </test>
+        <!--Test 05 with compressed input pair file as input and default parameters-->
+        <test expect_num_outputs="1">
+            <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs.gz"/>
             <param name="merge" value="false"/>
             <param name="with_chromsizes" value="false"/>
             <param name="yaml" value="true"/>
@@ -63,7 +84,8 @@
 
     Calculate pairs statistics.
     
-    By default, uses 4dn pairs or 4dn pairsam file to calculate statistics.
+    By default, uses 4dn pairs or 4dn pairsam file to calculate statistics. Setting merge to true will
+    merge multiple input stats files instead of calculating statistics of .pairs/.pairsam file.
 
     ]]></help>
     <expand macro="citations"/>
Binary file test-data/output_dedup_pairs_markdups.pairsam.gz has changed
Binary file test-data/output_parsed_pairs_sam.pairs.gz has changed
Binary file test-data/output_parsed_pairs_sam_assemblyname.pairs.gz has changed
Binary file test-data/output_sorted_pairs.pairsam.gz has changed
Binary file test-data/pairs_output2.stats.gz has changed