diff filter.xml @ 11:2d02d9702d3a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit aba2a85f5da6e1094f382d1f0d94c4b8f2544a7d
author iuc
date Wed, 08 Nov 2023 14:44:39 +0000
parents b409c2486353
children a03ff8633507
line wrap: on
line diff
--- a/filter.xml	Wed Sep 22 21:11:51 2021 +0000
+++ b/filter.xml	Wed Nov 08 14:44:39 2023 +0000
@@ -1,9 +1,9 @@
 <tool id="scanpy_filter" name="Filter" version="@galaxy_version@" profile="@profile@">
     <description>with scanpy</description>
-    <expand macro="bio_tools"/>
     <macros>
         <import>macros.xml</import>
     </macros>
+    <expand macro="bio_tools"/>
     <expand macro="requirements"/>
     <expand macro="version_command"/>
     <command detect_errors="exit_code"><![CDATA[
@@ -52,7 +52,6 @@
     groupby='$method.groupby',
     #end if
     use_raw=$method.use_raw,
-    log=$method.log,
     key_added='$method.key_added',
     min_in_group_fraction=$method.min_in_group_fraction,
     max_out_group_fraction=$method.max_out_group_fraction,
@@ -173,7 +172,6 @@
                     <expand macro="sanitize_query" />
                 </param>
                 <expand macro="param_use_raw"/>
-                <expand macro="param_log"/>
                 <param argument="key_added" type="text" value="rank_genes_groups_filtered" label="Key that will contain new values">
                     <expand macro="sanitize_query" />
                 </param>
@@ -228,8 +226,8 @@
         <expand macro="anndata_outputs"/>
     </outputs>
     <tests>
-        <test>
-            <!-- test 0 -->
+        <test expect_num_outputs="2">
+            <!-- test 1 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.filter_cells"/>
@@ -252,8 +250,8 @@
             </output>
             <output name="anndata_out" file="pp.filter_cells.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test>
-            <!-- test 1 -->
+        <test expect_num_outputs="2">
+            <!-- test 2 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.filter_cells"/>
@@ -274,8 +272,8 @@
             </output>
             <output name="anndata_out" file="pp.filter_cells.krumsiek11-max_genes.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test>
-            <!-- test 2 -->
+        <test expect_num_outputs="2">
+            <!-- test 3 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.filter_genes"/>
@@ -295,36 +293,41 @@
             </output>
             <output name="anndata_out" file="pp.filter_genes.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <!-- <test> -->
-        <!--     <!-\- test 3 -\-> -->
-        <!--     <!-\- Input dataset appears to be missing rank_genes_groups key... -\-> -->
-        <!--     <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" /> -->
-        <!--     <conditional name="method"> -->
-        <!--         <param name="method" value="tl.filter_rank_genes_groups"/> -->
-        <!--         <param name="key" value="rank_genes_groups"/> -->
-        <!--         <param name="use_raw" value="False"/> -->
-        <!--         <param name="log" value="False"/> -->
-        <!--         <param name="key_added" value="rank_genes_groups_filtered"/> -->
-        <!--         <param name="min_in_group_fraction" value="0.25"/> -->
-        <!--         <param name="max_out_group_fraction" value="0.5"/> -->
-        <!--         <param name="min_fold_change" value="3"/> -->
-        <!--     </conditional> -->
-        <!--     <output name="hidden_output"> -->
-        <!--         <assert_contents> -->
-        <!--             <has_text_matching expression="tl.filter_rank_genes_groups"/> -->
-        <!--             <has_text_matching expression="key='rank_genes_groups'"/> -->
-        <!--             <has_text_matching expression="use_raw=False"/> -->
-        <!--             <has_text_matching expression="log=False"/> -->
-        <!--             <has_text_matching expression="key_added='rank_genes_groups_filtered'"/> -->
-        <!--             <has_text_matching expression="min_in_group_fraction=0.25"/> -->
-        <!--             <has_text_matching expression="max_out_group_fraction=0.5"/> -->
-        <!--             <has_text_matching expression="min_fold_change=3"/> -->
-        <!--         </assert_contents> -->
-        <!--     </output> -->
-        <!--     <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/> -->
-        <!-- </test> -->
-        <test>
-            <!-- test 4 -->
+
+        <!--  test 4 -->
+        <!-- Fails to write to anndata after tl.filter_rank_genes_groups
+             Issue has been reported here: https://github.com/scverse/anndata/issues/726
+             The current fix is: del adata.uns['rank_genes_groups_filtered']  -->
+        <!--<test expect_num_outputs="2">
+            <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" />
+            <conditional name="method">
+                <param name="method" value="tl.filter_rank_genes_groups"/>
+                <param name="key" value="rank_genes_groups"/>
+                <param name="use_raw" value="False"/>
+                <param name="key_added" value="rank_genes_groups_filtered"/>
+                <param name="min_in_group_fraction" value="0.25"/>
+                <param name="max_out_group_fraction" value="0.5"/>
+                <param name="min_fold_change" value="3"/>
+            </conditional>
+            <section name="advanced_common">
+                <param name="show_log" value="true" />
+            </section>
+            <output name="hidden_output">
+                <assert_contents>
+                    <has_text_matching expression="tl.filter_rank_genes_groups"/>
+                    <has_text_matching expression="key='rank_genes_groups'"/>
+                    <has_text_matching expression="use_raw=False"/>
+                    <has_text_matching expression="log=False"/>
+                    <has_text_matching expression="key_added='rank_genes_groups_filtered'"/>
+                    <has_text_matching expression="min_in_group_fraction=0.25"/>
+                    <has_text_matching expression="max_out_group_fraction=0.5"/>
+                    <has_text_matching expression="min_fold_change=3"/>
+                </assert_contents>
+            </output>
+            <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/>
+        </test>-->
+        <test expect_num_outputs="2">
+            <!-- test 5 -->
             <param name="adata" value="blobs.h5ad"/>
             <conditional name="method">
                 <param name="method" value="pp.highly_variable_genes"/>
@@ -353,8 +356,8 @@
             </output>
             <output name="anndata_out" file="pp.highly_variable_genes.seurat.blobs.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.2"/>
         </test>
-        <test>
-            <!-- test 5 -->
+        <test expect_num_outputs="2">
+            <!-- test 6 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.highly_variable_genes"/>
@@ -379,8 +382,8 @@
             </output>
             <output name="anndata_out" file="pp.highly_variable_genes.krumsiek11-cell_ranger.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.9"/>
         </test>
-        <test>
-            <!-- test 6 -->
+        <test expect_num_outputs="2">
+            <!-- test 7 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.subsample"/>
@@ -402,8 +405,8 @@
             </output>
             <output name="anndata_out" file="pp.subsample.krumsiek11_fraction.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test>
-            <!-- test 7 -->
+        <test expect_num_outputs="2">
+            <!-- test 8 -->
             <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.subsample"/>
@@ -425,8 +428,8 @@
             </output>
             <output name="anndata_out" file="pp.subsample.krumsiek11_n_obs.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test>
-            <!-- test 8 -->
+        <test expect_num_outputs="2">
+            <!-- test 9 -->
             <param name="adata" value="random-randint.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.downsample_counts"/>
@@ -461,7 +464,7 @@
 `max_counts`, `max_genes` per call.
 
 More details on the `scanpy documentation
-<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_cells.html>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_cells.html>`__
 
 
 Filter genes based on number of cells or counts (`pp.filter_genes`)
@@ -475,14 +478,14 @@
 `max_counts`, `max_cells` per call.
 
 More details on the `scanpy documentation
-<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_genes.html>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_genes.html>`__
 
 
 Filters out genes based on fold change and fraction of genes expressing the gene within and outside the groupby categories (`tl.filter_rank_genes_groups`)
 ==========================================================================================================================================================
 
 More details on the `scanpy documentation
-<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.filter_rank_genes_groups.html>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.filter_rank_genes_groups.html>`__
 
 
 Annotate highly variable genes (`pp.highly_variable_genes`)
@@ -497,7 +500,7 @@
 ======================================================================
 
 More details on the `scanpy documentation
-<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.subsample.html>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.subsample.html>`__
 
 Downsample counts (`pp.downsample_counts`)
 ==========================================
@@ -506,7 +509,7 @@
 has been implemented by M. D. Luecken.
 
 More details on the `scanpy documentation
-<https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.downsample_counts.html>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.downsample_counts.html>`__
 
 
     ]]></help>