diff preprocessing.xml @ 3:4ecdea4cbea1 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:44 +0000
parents 48d9421bf176
children c5c94e01a1b5
line wrap: on
line diff
--- a/preprocessing.xml	Fri Jul 05 11:06:01 2024 +0000
+++ b/preprocessing.xml	Wed Jul 17 05:54:44 2024 +0000
@@ -85,8 +85,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',
     n_jobs = int(os.getenv("GALAXY_SLOTS", 4))
 )
 
@@ -107,8 +106,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 == 'pp.filter_cells'
@@ -285,8 +283,7 @@
                     <expand macro="sanitize_query"/>
                 </param>
                 <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="pp.make_gene_matrix">
                 <expand macro="inputs_anndata"/>
@@ -302,8 +299,7 @@
                 <param argument="gene_name_key" type="text" value="gene_name" label="The key of the gene name in the gene annotation file"/>
                 <param argument="gene_id_key" type="text" value="gene_id" label="The key of the gene id in the gene annotation file"/>
                 <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="pp.filter_cells">
                 <expand macro="inputs_anndata"/>
@@ -446,7 +442,7 @@
                 <param name="transcript_id_key" value="transcript_id"/>
                 <param name="gene_name_key" value="gene_name"/>
                 <param name="gene_id_key" value="gene_id"/>
-                <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" />
@@ -461,7 +457,7 @@
                     <has_text_matching expression="transcript_id_key = 'transcript_id'"/>
                     <has_text_matching expression="gene_name_key = 'gene_name'"/>
                     <has_text_matching expression="gene_id_key = 'gene_id'"/>
-                    <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/12548681/files/pp.make_gene_matrix.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" />
@@ -513,7 +509,7 @@
                 <param name="bin_size" value="5000"/>
                 <param name="chunk_size" value="500"/>
                 <param name="exclude_chroms" value="chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr22, chrX, chrY"/>
-                <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" />
@@ -524,7 +520,31 @@
                     <has_text_matching expression="bin_size = 5000"/>
                     <has_text_matching expression="chunk_size = 500"/>
                     <has_text_matching expression="exclude_chroms = \['chr1', 'chr2', 'chr3', 'chr4', 'chr5', 'chr6', 'chr7', 'chr8', 'chr9', 'chr10', 'chr11', 'chr12', 'chr13', 'chr14', 'chr15', 'chr16', 'chr17', 'chr18', 'chr19', 'chr20', 'chr22', 'chrX', 'chrY'\]"/>
-                    <has_text_matching expression="count_frag_as_reads = True"/>
+                    <has_text_matching expression="counting_strategy = 'insertion'"/>
+                </assert_contents>
+            </output>
+            <output name="anndata_out"  ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.add_tile_matrix.pbmc_500_chr21.h5ad"/>
+        </test>
+        <test expect_num_outputs="2">
+            <!-- pp.add_tile_matrix counting_strategy fragment -->
+            <conditional name="method">
+                <param name="method" value="pp.add_tile_matrix"/>
+                <param name="adata" location="https://zenodo.org/records/11260316/files/pp.filter_cells.pbmc_500_chr21.h5ad"/>
+                <param name="bin_size" value="5000"/>
+                <param name="chunk_size" value="500"/>
+                <param name="exclude_chroms" value="chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr22, chrX, chrY"/>
+                <param name="counting_strategy" value="fragment"/>
+                </conditional>
+            <section name="advanced_common">
+                <param name="show_log" value="true" />
+            </section>
+            <output name="hidden_output">
+                <assert_contents>
+                    <has_text_matching expression="sa.pp.add_tile_matrix"/>
+                    <has_text_matching expression="bin_size = 5000"/>
+                    <has_text_matching expression="chunk_size = 500"/>
+                    <has_text_matching expression="exclude_chroms = \['chr1', 'chr2', 'chr3', 'chr4', 'chr5', 'chr6', 'chr7', 'chr8', 'chr9', 'chr10', 'chr11', 'chr12', 'chr13', 'chr14', 'chr15', 'chr16', 'chr17', 'chr18', 'chr19', 'chr20', 'chr22', 'chrX', 'chrY'\]"/>
+                    <has_text_matching expression="counting_strategy = 'fragment'"/>
                 </assert_contents>
             </output>
             <output name="anndata_out"  ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.add_tile_matrix.pbmc_500_chr21.h5ad"/>