diff scimap_spatial.xml @ 3:472780baf150 draft

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/scimap commit 49210b00535415865694ddbec16238d8cf5e6bb0
author goeckslab
date Wed, 26 Jun 2024 15:26:49 +0000
parents d19c068c2490
children
line wrap: on
line diff
--- a/scimap_spatial.xml	Mon Jun 10 18:44:35 2024 +0000
+++ b/scimap_spatial.xml	Wed Jun 26 15:26:49 2024 +0000
@@ -144,6 +144,7 @@
                     <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
                     <param argument="num_motifs" type="integer" value="10" optional="true" label="The number of requested latent motifs to be extracted from the training corpus" />
                     <param argument="random_state" type="integer" value="0" optional="true" label="The seed number for random state" />
+                    <param argument="max_weight_assignment" type="boolean" checked="false" optional="true" label="Assign cells to motifs based on maximum LDA weight" />
                 </expand>
             </when>
             <when value="spatial_pscore">
@@ -163,9 +164,14 @@
     </inputs>
     <outputs>
         <data format="h5ad" name="output" label="Scimap.tools.${analyses.selected_tool} on ${on_string}" />
+        <collection name="tabular_outputs" type="list" label="Tabular outputs from Scimap.tools.${analyses.selected_tool} on ${on_string}">
+            <data format="tabular" name="lda_weights" from_work_dir="lda_weights.txt" label="LDA weights from Scimap.tools.${analyses.selected_tool} on ${on_string}" />
+            <data format="tabular" name="lda_probabilities" from_work_dir="lda_probabilities.txt" label="LDA probabilites from Scimap.tools.${analyses.selected_tool} on ${on_string}" />
+            <filter>analyses['selected_tool'] == 'spatial_lda'</filter>
+        </collection>
     </outputs>
     <tests>
-        <test>
+        <test expect_num_outputs="1">
             <param name="anndata" value="tutorial_data_pheno.h5ad" />
             <conditional name="analyses">
                 <param name="selected_tool" value="cluster" />
@@ -177,7 +183,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="1">
             <param name="anndata" value="tutorial_data_pheno.h5ad" />
             <conditional name="analyses">
                 <param name="selected_tool" value="spatial_aggregate" />
@@ -188,6 +194,34 @@
                 </assert_contents>
             </output>
         </test>
+        <test expect_num_outputs="4">
+            <param name="anndata" value="tutorial_data_pheno.h5ad" />
+            <conditional name="analyses">
+                <param name="selected_tool" value="spatial_lda" />
+                <section name="options">
+                    <param name="max_weight_assignment" value="True" />
+                </section>
+            </conditional>
+            <output name="output">
+                <assert_contents>
+                    <has_h5_keys keys="obs/neighborhood_motif" />
+                </assert_contents>
+            </output>
+            <output_collection name="tabular_outputs" type="list">
+                <element name="lda_weights">
+                    <assert_contents>
+                        <has_n_lines n="500" />
+                        <has_n_columns n="12" />
+                    </assert_contents>
+                </element>
+                <element name="lda_probabilities">
+                    <assert_contents>
+                        <has_n_lines n="11" />
+                        <has_n_columns n="15" />
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
     </tests>
     <help>
         <![CDATA[