changeset 2:b9013e0e2b00 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snapatac2 commit b37248ea9b492c096b143272aebc79d8f04c2984
author iuc
date Wed, 17 Jul 2024 05:54:41 +0000
parents f9647da40db3
children 88192fe25375
files macros.xml peaks_and_motif_analysis.xml
diffstat 2 files changed, 26 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Fri Jul 05 11:06:04 2024 +0000
+++ b/macros.xml	Wed Jul 17 05:54:41 2024 +0000
@@ -1,16 +1,16 @@
 <macros>
-    <token name="@TOOL_VERSION@">2.5.3</token>
-    <token name="@VERSION_SUFFIX@">2</token>
+    <token name="@TOOL_VERSION@">2.6.4</token>
+    <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">23.0</token>
     <xml name="requirements">
         <requirement type="package" version="@TOOL_VERSION@">snapatac2</requirement>
-        <requirement type="package" version="5.18.0">plotly</requirement>
+        <requirement type="package" version="5.22.0">plotly</requirement>
         <requirement type="package" version="0.2.1">python-kaleido</requirement>
-        <requirement type="package" version="0.19.19">polars</requirement>
-        <requirement type="package" version="14.0.1">pyarrow</requirement>
-        <requirement type="package" version="0.11.3">python-igraph</requirement>
-        <requirement type="package" version="0.8.33">hdbscan</requirement>
-        <requirement type="package" version="0.0.9">harmonypy</requirement>
+        <requirement type="package" version="1.1.0">polars</requirement>
+        <requirement type="package" version="16.1.0">pyarrow</requirement>
+        <requirement type="package" version="0.11.6">python-igraph</requirement>
+        <requirement type="package" version="0.8.37">hdbscan</requirement>
+        <requirement type="package" version="0.0.10">harmonypy</requirement>
         <requirement type="package" version="1.7.4">scanorama</requirement>
         <requirement type="package" version="3.0.1">macs3</requirement>
         <requirement type="package" version="0.70.16">multiprocess</requirement>
@@ -158,10 +158,10 @@
         <has_text_matching expression="height = 450"/>
     </xml>
     <xml name="param_counting_strategy">
-        <param argument="counting_strategy" type="select" label="he strategy to compute feature counts">
-            <option value="fragment">fragment</option>
-            <option value="insertion" selected="true">insertion</option>
-            <option value="paired-insertion">paired-insertion</option>
+        <param argument="counting_strategy" type="select" label="The strategy to compute feature counts">
+            <option value="fragment">"fragment": based on the number of fragments that overlap with a region of interest</option>
+            <option value="insertion" selected="true">"insertion": based on the number of insertions that overlap with a region of interest</option>
+            <option value="paired-insertion">"paired-insertion": similar to "insertion", but it only counts the insertions once if the pair of insertions of a fragment are both within the same region of interest</option>
         </param>
     </xml>
 
--- a/peaks_and_motif_analysis.xml	Fri Jul 05 11:06:04 2024 +0000
+++ b/peaks_and_motif_analysis.xml	Wed Jul 17 05:54:41 2024 +0000
@@ -36,6 +36,9 @@
         nolambda = $method.nolambda,
         shift = $method.shift,
         extsize = $method.extsize,
+        #if $method.min_len
+        min_len = $method.min_len,
+        #end if
         #if $method.blacklist
         blacklist = '$method.blacklist',
         #end if
@@ -62,7 +65,7 @@
 #else if $method.method == 'pp.make_peak_matrix'
 import polars
 peaks = polars.read_csv('$method.merged_peaks', separator='\t')
-sa.pp.make_peak_matrix(
+adata = sa.pp.make_peak_matrix(
     adata,
     use_rep = peaks['Peaks'],
     chunk_size = $method.chunk_size,
@@ -73,8 +76,7 @@
     #if $method.max_frag_size
     max_frag_size = $method.max_frag_size,
     #end if
-    ##counting_strategy = '$method.counting_strategy'
-    count_frag_as_reads = $method.count_frag_as_reads
+    counting_strategy = '$method.counting_strategy'
 )
 
 #else if $method.method == 'tl.marker_regions'
@@ -150,7 +152,9 @@
 )
 
 #end if
+#if $method.method != 'pp.make_peak_matrix'
 @CMD_anndata_write_outputs@
+#end if
     ]]></configfile>
     </configfiles>
     <inputs>
@@ -173,6 +177,7 @@
                 <param argument="nolambda" type="boolean" checked="false" truevalue="True" falsevalue="False" label="If True, macs3 will use the background lambda as local lambda"/>
                 <param argument="shift" type="integer" value="-100" label="The shift size in MACS"/>
                 <param argument="extsize" type="integer" value="200" label="The extension size in MACS"/>
+                <param argument="min_len" type="integer" optional="true" value="" label="The minimum length of a called peak" help="If not set, it is set to the extension size."/>
                 <param argument="blacklist" type="data" format="bed" optional="true" label="Blacklist file in BED format"
                     help="If provided, regions in the blacklist will be removed."/>
                 <param argument="key_added" type="text" value="macs3"  label="`.uns` key under which to add peak information"/>
@@ -192,8 +197,7 @@
                 <expand macro="param_chunk_size" size="500"/>
                 <param argument="use_x" type="boolean" truevalue="True" falsevalue="False" checked="false" label="If True, use the matrix stored in .X as raw counts"/>
                 <expand macro="min_max_frag_size"/>
-                <!--expand macro="param_counting_strategy"/-->
-                <param argument="count_frag_as_reads" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Whether to count fragments as reads"/>
+                <expand macro="param_counting_strategy"/>
             </when>
             <when value="tl.marker_regions">
                 <expand macro="inputs_anndata"/>
@@ -264,6 +268,7 @@
                 <param name="qvalue" value="0.1"/>
                 <param name="shift" value="-100"/>
                 <param name="extsize" value="200"/>
+                <param name="min_len" value="50"/>
                 <param name="key_added" value="macs3"/>
                 </conditional>
             <section name="advanced_common">
@@ -276,6 +281,7 @@
                     <has_text_matching expression="qvalue = 0.1"/>
                     <has_text_matching expression="shift = -100"/>
                     <has_text_matching expression="extsize = 200"/>
+                    <has_text_matching expression="min_len = 50"/>
                     <has_text_matching expression="key_added = 'macs3'"/>
                 </assert_contents>
             </output>
@@ -317,7 +323,7 @@
                 <param name="merged_peaks" location="https://zenodo.org/records/11260316/files/merged_peaks.tabular"/>
                 <param name="chunk_size" value="500"/>
                 <param name="use_x" value="False"/>
-                <param name="count_frag_as_reads" value="True"/>
+                <param name="counting_strategy" value="insertion"/>
                 </conditional>
             <section name="advanced_common">
                 <param name="show_log" value="true" />
@@ -327,10 +333,10 @@
                     <has_text_matching expression="sa.pp.make_peak_matrix"/>
                     <has_text_matching expression="chunk_size = 500"/>
                     <has_text_matching expression="use_x = False"/>
-                    <has_text_matching expression="count_frag_as_reads = True"/>
+                    <has_text_matching expression="counting_strategy = 'insertion'"/>
                 </assert_contents>
             </output>
-            <output name="anndata_out" location="https://zenodo.org/records/11260316/files/pp.make_peak_matrix.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" />
+            <output name="anndata_out" location="https://zenodo.org/records/12751925/files/pp.make_peak_matrix.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" />
         </test>
         <test expect_num_outputs="3">
             <!-- tl.marker_regions -->