diff fastspar_reduce.xml @ 0:e18c802858bb draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/fastspar commit 0e305d21d0634a1788b9105ec4d0ab1c2da62359
author iuc
date Thu, 19 Jun 2025 21:51:44 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fastspar_reduce.xml	Thu Jun 19 21:51:44 2025 +0000
@@ -0,0 +1,82 @@
+<tool id="fastspar_reduce" name="FastSpar: Reduce correlation table" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>
+         Filter correlation and p-value table into sparse matrices
+    </description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="biotools"/>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+        fastspar_reduce
+            --correlation_table '$correlation_table'
+            --pvalue_table '$pvalue_table'
+            --correlation $correlation
+            --pvalue $pvalue
+            --output_prefix sparse
+    ]]></command>
+    <inputs>
+        <param argument="--correlation_table" type="data" format="tabular" label="Correlation table"/>
+        <param argument="--pvalue_table" type="data" format="tabular" label="P-value table"/>
+        <param argument="--correlation" type="float" min="0.0" max="1.0" value="0.10" label="Absolute correlation threshold"/>
+        <param argument="--pvalue" type="float" min="0.0" max="1.0" value="0.05" label="P-value threshold"/>
+    </inputs>
+    <outputs>
+        <data name="correlations" format="tabular" from_work_dir="sparse_filtered_correlation.tsv" label="${tool.name} on ${on_string}: filtered_correlations.tsv">
+            <actions>
+                <action type="metadata" name="column_names" default="column,row,value" />
+            </actions>
+        </data>
+        <data name="pvalues" format="tabular" from_work_dir="sparse_filtered_pvalue.tsv" label="${tool.name} on ${on_string}: filtered_pvalues.tsv">
+            <actions>
+                <action type="metadata" name="column_names" default="column,row,value" />
+            </actions>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="2">
+            <param name="correlation_table" ftype="tabular" value="fake_data_cor.tsv"/>
+            <param name="pvalue_table" ftype="tabular" value="pvalues.tsv"/>
+            <output name="correlations" file="filtered_correlations.tsv" compare="diff"/>
+            <output name="pvalues" file="filtered_pvalues.tsv" compare="diff"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+What it does
+============
+
+This tool filters pairwise correlations and p-values from FastSpar outputs to generate sparse matrices suitable for network construction or visualization. It is typically used as the final step in a FastSpar pipeline.
+
+Filtering Criteria
+==================
+
+- **Absolute correlation threshold**: Only retain OTU pairs whose absolute correlation exceeds this value.
+- **P-value threshold**: Only retain OTU pairs whose empirical p-value is below this cutoff.
+
+Both conditions must be satisfied (logical AND).
+
+Required Inputs
+===============
+
+- **Correlation table**: A symmetric matrix from FastSpar.
+- **P-value table**: A matching symmetric matrix from FastSpar p-value estimation.
+
+Generated Outputs
+=================
+
+- `filtered_correlations.tsv`: Correlation values that passed both thresholds.
+- `filtered_pvalues.tsv`: Matching p-values for retained entries.
+
+Notes
+=====
+
+- Both input matrices must have identical dimensions and OTU order.
+- The output tables are still symmetric and retain all diagonal values (e.g., self-correlations).
+
+Additional Resources
+====================
+
+- FastSpar GitHub: https://github.com/scwatts/fastspar
+    ]]></help>
+    <expand macro="citations"/>
+</tool>
\ No newline at end of file