diff cluster_reduce_dimension.xml @ 8:35bc2eb568ed draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 7b8af82cb8a3438d2a6535986e357527e5c6efec"
author iuc
date Tue, 16 Mar 2021 13:03:42 +0000
parents b2df381a6004
children aaa5da8e73a9
line wrap: on
line diff
--- a/cluster_reduce_dimension.xml	Wed May 20 16:11:15 2020 -0400
+++ b/cluster_reduce_dimension.xml	Tue Mar 16 13:03:42 2021 +0000
@@ -3,7 +3,7 @@
     <macros>
         <import>macros.xml</import>
         <xml name="pca_inputs">
-            <param argument="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help=""/>
+            <param argument="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help="If the value is larger than the number of observations the number of observations is used instead"/>
             <param argument="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help="">
                 <expand macro="sanitize_query" />
             </param>
@@ -46,7 +46,7 @@
 ]]></token>
         <token name="@CMD_pca_params@"><![CDATA[
     data=adata,
-    n_comps=$method.n_comps,
+    n_comps=min($method.n_comps, adata.n_vars),
     dtype='$method.dtype',
     copy=False,
     chunked=$method.pca.chunked,
@@ -61,7 +61,7 @@
 ]]></token>
     </macros>
     <expand macro="requirements">
-        <requirement type="package" version="0.6.1">louvain</requirement>
+        <requirement type="package" version="0.7.0">louvain</requirement>
     </expand>
     <expand macro="version_command"/>
     <command detect_errors="exit_code"><![CDATA[
@@ -104,7 +104,7 @@
 #else if $method.method == 'tl.diffmap'
 sc.tl.diffmap(
     adata=adata,
-    n_comps=$method.n_comps,
+    n_comps=min($method.n_comps, adata.n_vars),
     copy =False)
 
 #else if $method.method == 'tl.tsne'
@@ -372,7 +372,6 @@
             <output name="hidden_output">
                 <assert_contents>
                     <has_text_matching expression="sc.pp.pca"/>
-                    <has_text_matching expression="n_comps=50"/>
                     <has_text_matching expression="dtype='float32'"/>
                     <has_text_matching expression="copy=False"/>
                     <has_text_matching expression="chunked=False"/>
@@ -382,7 +381,7 @@
                     <has_text_matching expression="use_highly_variable=False"/>
                 </assert_contents>
             </output>
-            <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
+            <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/>
         </test>
         <!--<test>
             < test 3 >
@@ -431,7 +430,6 @@
             <output name="hidden_output">
                 <assert_contents>
                     <has_text_matching expression="sc.tl.pca"/>
-                    <has_text_matching expression="n_comps=50"/>
                     <has_text_matching expression="dtype='float32'"/>
                     <has_text_matching expression="copy=False"/>
                     <has_text_matching expression="chunked=False"/>
@@ -440,7 +438,7 @@
                     <has_text_matching expression="use_highly_variable=False"/>
                 </assert_contents>
             </output>
-            <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
+            <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/>
         </test>
         <test>
             <!-- test 3 -->
@@ -455,7 +453,6 @@
             <output name="hidden_output">
                 <assert_contents>
                     <has_text_matching expression="sc.tl.diffmap"/>
-                    <has_text_matching expression="n_comps=15"/>
                 </assert_contents>
             </output>
             <output name="anndata_out" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>