Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
994bac4
feat(qc-metrics): add common single cell quality control metrics
abombin Jun 20, 2025
59675ca
style(qc-metrics): fix spelling typo in nFeature metric
abombin Jun 20, 2025
7bf4043
Update src/spac/transformations.py
abombin Jun 20, 2025
0cf530b
fix(check_layer): use check_table spac function to evaluate if adata.…
abombin Jun 23, 2025
6727226
Merge pull request #352 from FNLCR-DMAP/add-sc-qc-metrics
georgezakinih Jun 24, 2025
a228e5e
feat(qc_summary_statistics): add summary statistics table for sc/spat…
abombin Jul 3, 2025
5e03dc2
refactor(get_qc_summary_table): adjust code style to adhere to spac g…
abombin Jul 11, 2025
239f981
Update src/spac/utils.py
abombin Jul 11, 2025
df46aca
make sure that compute_summary_qc_stats has a default input for stat_…
abombin Jul 11, 2025
d5061c4
refactor(get_qc_summary_table): refactor quality control summary stat…
abombin Jul 15, 2025
39a3b45
Merge pull request #353 from FNLCR-DMAP/add_sc_qc_summary
fangliu117 Jul 16, 2025
b960684
feat(template_utils): add template_utils and unit tests
fangliu117 Jul 24, 2025
c889259
feat(ripley_l_template): add ripley_l_template and unit tests
fangliu117 Jul 24, 2025
48608e2
feat(visualize_ripley_template): add visualize_ripley_template and un…
fangliu117 Jul 24, 2025
d291385
Merge branch 'refactor/ripley-l-template' into refactor/visualize-rip…
fangliu117 Jul 24, 2025
ff9238c
fix(visualize_ripley): add missing __init__.py for templates module
fangliu117 Jul 24, 2025
0e2747e
fix(visualize_ripley): make plt.show() conditional based on show_plot…
fangliu117 Jul 24, 2025
cf61b8d
Merge pull request #358 from FNLCR-DMAP/refactor/visualize-ripley-tem…
fangliu117 Jul 24, 2025
7b7e6cb
fix: add missing __init__.py in tests/templates
fangliu117 Jul 24, 2025
e9f0883
fix(template_utils): address review comments
fangliu117 Jul 24, 2025
c94b219
fix(template_utils): address review comments again
fangliu117 Jul 24, 2025
bc9c105
Merge pull request #359 from FNLCR-DMAP/refactor/template-utils
fangliu117 Jul 24, 2025
9914716
fix(ripley_template): address review comments - replace debug prints …
fangliu117 Jul 24, 2025
3086ce2
Merge remote-tracking branch 'origin/dev' into refactor/ripley-l-temp…
fangliu117 Jul 25, 2025
415df89
fix(ripley_template): address review comments - merge dev into the br…
fangliu117 Jul 25, 2025
2e83f0c
Merge pull request #360 from FNLCR-DMAP/refactor/ripley-l-template
fangliu117 Jul 25, 2025
5456658
feat(load_csv): Add load_csv template function with configuration sup…
fangliu117 Jul 27, 2025
bbfa2f6
fix(template_utils): Use applymap instead of map for pandas compatibi…
fangliu117 Jul 28, 2025
1cfb39e
feat(setup_analysis_template): add setup_analysis_template function a…
fangliu117 Jul 28, 2025
dddc33a
fix(setup_analysis_template): fix setup_analysis_template function
fangliu117 Jul 28, 2025
10dc7c7
Merge pull request #362 from FNLCR-DMAP/template_setup_analysis
fangliu117 Jul 28, 2025
28dc23f
Merge pull request #361 from FNLCR-DMAP/template_load_csv
fangliu117 Jul 28, 2025
eb810ab
feat(boxplot_template): add boxplot_template function and unit tests
fangliu117 Jul 28, 2025
cd5abd0
fix(boxplot_template): address minor comments from copilot
fangliu117 Jul 29, 2025
f0d5e29
Merge pull request #363 from FNLCR-DMAP/template_boxplot
fangliu117 Jul 29, 2025
3380427
feat(histogram_template): add histogram_template and unit tests
fangliu117 Jul 31, 2025
51ba1c4
fix(histogram_template): fix odd number of cells in test
fangliu117 Jul 31, 2025
a336044
Merge pull request #364 from FNLCR-DMAP/template_histogram
fangliu117 Jul 31, 2025
0f26c08
feat(spatial_plot_temp): add spatial_plot_template.py and unit tests
fangliu117 Aug 2, 2025
028a049
fix(spatial_plot_temp): addrss copilot comments spatial_plot_template.py
fangliu117 Aug 2, 2025
09362ac
Merge pull request #365 from FNLCR-DMAP/template_spatial_plot
fangliu117 Aug 2, 2025
ff6cce4
feat(arcsinh_normalization_template): add arcsinh_normalization_templ…
fangliu117 Aug 2, 2025
afca7ff
fix(test_arcsinh_normalization_template): Handle odd numbers with bet…
fangliu117 Aug 2, 2025
78cc5a9
Merge pull request #366 from FNLCR-DMAP/template_arcsinh_normalization
fangliu117 Aug 2, 2025
b2d68c5
feat(zscore_normalization_template): add zscore_normalization_templat…
fangliu117 Aug 2, 2025
8d134c8
Merge pull request #367 from FNLCR-DMAP/template_zscore_normalization
fangliu117 Aug 2, 2025
06d8feb
feat(summarize_dataframe_template): add summarize_dataframe_template …
fangliu117 Aug 2, 2025
30118f9
fix(summarize_dataframe_template): address comments from copilot
fangliu117 Aug 2, 2025
d542f1a
Merge pull request #368 from FNLCR-DMAP/template_summarize_dataframe
fangliu117 Aug 2, 2025
829a4bd
feat(combine_annotations_template): add combine_annotations_template …
fangliu117 Aug 2, 2025
9d8582a
fix(combine_annotations_template): address comments from copilot CR f…
fangliu117 Aug 2, 2025
709ceed
Merge pull request #369 from FNLCR-DMAP/template_combine_annotations
fangliu117 Aug 2, 2025
941d641
feat(manual_phenotyping_template): add manual_phenotyping_template fu…
fangliu117 Aug 2, 2025
e4d61cf
fix(test_manual_phenotyping_temp): address comments of copilot review…
fangliu117 Aug 2, 2025
6f19ae2
Merge pull request #370 from FNLCR-DMAP/template_manual_phenotyping
fangliu117 Aug 2, 2025
67e5a80
feat(hierarchical_heatmap_template): add hierarchical_heatmap_templat…
fangliu117 Aug 2, 2025
6466e2f
feat(hierarchical_heatmap_template): add hierarchical_heatmap_templat…
fangliu117 Aug 2, 2025
2ad5a86
Merge pull request #371 from FNLCR-DMAP/template_hierarchical_heatmap
fangliu117 Aug 2, 2025
743fb10
feat(utag_clustering_template): add utag_clustering_template and unit…
fangliu117 Aug 2, 2025
6da3985
feat(utag_clustering_template): add utag_clustering_template and unit…
fangliu117 Aug 2, 2025
c616fdb
Merge pull request #372 from FNLCR-DMAP/template_utag_clustering
fangliu117 Aug 2, 2025
e79fd78
feat(umap_transformation_template): add umap_transformation_template …
fangliu117 Aug 2, 2025
9d24638
fix(umap_transformation_template): return adata in place and fix comm…
fangliu117 Aug 2, 2025
6906ec0
Merge pull request #373 from FNLCR-DMAP/template_umap_transformation
fangliu117 Aug 2, 2025
ca29330
feat(phenograph_clustering_template): add phenograph_clustering_templ…
fangliu117 Aug 3, 2025
92d77a5
Merge pull request #374 from FNLCR-DMAP/template_phenograph_clustering
fangliu117 Aug 3, 2025
d67f6c7
feat(umap_tsne_pca_template): add umap_tsne_pca_template function and…
fangliu117 Aug 3, 2025
7fb9b2c
fix(umap_tsne_pca_template): address the comments from copilot
fangliu117 Aug 3, 2025
6d25262
Merge pull request #375 from FNLCR-DMAP/template_umap_tsne_pca
fangliu117 Aug 3, 2025
96446d7
feat(rename_labels_template): add rename_labels_template function and…
fangliu117 Aug 3, 2025
47f028d
Merge pull request #376 from FNLCR-DMAP/template_rename_labels
fangliu117 Aug 3, 2025
c57075d
feat(relational_heatmap_template): add relational_heatmap_template fu…
fangliu117 Aug 3, 2025
5662bdb
fix(relational_heatmap_template): address the issue of insecure tempo…
fangliu117 Aug 3, 2025
369c6ee
Merge pull request #377 from FNLCR-DMAP/template_relational_heatmap
fangliu117 Aug 3, 2025
34b4eee
feat(sankey_plot_template): add sankey_plot_template function and uni…
fangliu117 Aug 3, 2025
07baeb9
fix(sankey_plot_template): address the comments from copilot
fangliu117 Aug 3, 2025
f3e5864
Merge pull request #378 from FNLCR-DMAP/template_sankey_plot
fangliu117 Aug 3, 2025
824d131
feat(neighborhood_profile_template): add neighborhood_profile_templat…
fangliu117 Aug 3, 2025
5e9d65c
Merge pull request #379 from FNLCR-DMAP/template_neighborhood_profile
fangliu117 Aug 3, 2025
448a980
feat(analysis_to_csv_template): add analysis_to_csv_template function…
fangliu117 Aug 3, 2025
d1c33ba
Merge pull request #380 from FNLCR-DMAP/template_analysis_to_csv
fangliu117 Aug 3, 2025
34961bd
feat(summarize_annotation_statistics): add summarize_annotation_stati…
fangliu117 Aug 3, 2025
fdeba79
Merge pull request #381 from FNLCR-DMAP/template_summarize_annotation…
fangliu117 Aug 3, 2025
3f4336b
feat(interactive_spatial_plot_template): add interactive_spatial_plot…
fangliu117 Aug 3, 2025
64ff302
fix(interactive_spatial_plot_template): remove nidap comments
fangliu117 Aug 3, 2025
704700a
Merge pull request #382 from FNLCR-DMAP/template_interactive_spatial_…
fangliu117 Aug 3, 2025
a7b1349
feat(spatial_interaction_template): add spatial_interaction_template …
fangliu117 Aug 4, 2025
1a3d03d
fix(spatial_interaction_template): fix typo
fangliu117 Aug 4, 2025
7354b98
Merge pull request #383 from FNLCR-DMAP/template_spatial_interaction
fangliu117 Aug 4, 2025
19cd477
feat(nearest_neighbor_calculation_template): add nearest_neighbor_cal…
fangliu117 Aug 4, 2025
81393d9
Merge pull request #384 from FNLCR-DMAP/template_nearest_neighbor_cal…
fangliu117 Aug 4, 2025
07ecdfa
feat(visualize_nearest_neighbor_template): add visualize_nearest_neig…
fangliu117 Aug 4, 2025
52a4ee6
fix(visualize_nearest_neighbor_template): fix typo
fangliu117 Aug 4, 2025
f1c7eaf
Merge pull request #385 from FNLCR-DMAP/template_visualize_nearest_ne…
fangliu117 Aug 4, 2025
6ab7a9d
feat(template_utils): add string_list_to_dictionary to template utils
fangliu117 Aug 4, 2025
d70bb9d
Merge pull request #386 from FNLCR-DMAP/template_utils
fangliu117 Aug 4, 2025
2477266
feat(add_pin_color_rule_template): add add_pin_color_rule_template fn…
fangliu117 Aug 4, 2025
1fc839e
Merge pull request #387 from FNLCR-DMAP/template_add_pin_color_rule
fangliu117 Aug 4, 2025
5e68e02
feat(append_annotation_template): add append_annotation_template func…
fangliu117 Aug 4, 2025
19543a7
Merge pull request #388 from FNLCR-DMAP/template_append_annotation
fangliu117 Aug 4, 2025
8e500ec
feat(binary_to_categorical_annotation_template): add binary_to_catego…
fangliu117 Aug 4, 2025
db94a32
Merge pull request #389 from FNLCR-DMAP/template_binary_to_categorica…
fangliu117 Aug 4, 2025
4fea9c3
feat(calculate_centroid_template): add calculate_centroid_template fu…
fangliu117 Aug 4, 2025
13d42ec
Merge pull request #390 from FNLCR-DMAP/template_calculate_centroid
fangliu117 Aug 4, 2025
e59c994
feat(select_values_template): add select_values_template function and…
fangliu117 Aug 4, 2025
74ea36f
Merge pull request #391 from FNLCR-DMAP/template_select_values
fangliu117 Aug 4, 2025
cedb6d1
fix(select_values_template): fix pandas/numpy version compatibility i…
fangliu117 Aug 4, 2025
c11f641
Merge pull request #392 from FNLCR-DMAP/template_select_values
fangliu117 Aug 4, 2025
47adf3e
feat(downsample_cells_template): add downsample_cells_template functi…
fangliu117 Aug 4, 2025
71dc3d6
Merge pull request #393 from FNLCR-DMAP/template_downsample_cells
fangliu117 Aug 4, 2025
3e24237
feat(combine_dataframes_template): add combine_dataframes_template fu…
fangliu117 Aug 4, 2025
85805e1
Merge pull request #394 from FNLCR-DMAP/template_combine_dataframes
fangliu117 Aug 4, 2025
1db00a8
feat(subset_analysis_template): add subset_analysis_template function…
fangliu117 Aug 4, 2025
aefcb29
fix(subset_analysis_template): fix typo and enhance function
fangliu117 Aug 4, 2025
8509999
Merge pull request #395 from FNLCR-DMAP/template_subset_analysis
fangliu117 Aug 4, 2025
542f985
feat(quantile_scaling_template): refactor nidap code, add quantile_sc…
fangliu117 Aug 4, 2025
de6ee91
fix(quantile_scaling_template): fix typo in both function and unit tests
fangliu117 Aug 4, 2025
1a3a563
Merge pull request #396 from FNLCR-DMAP/template_quantile_scaling
fangliu117 Aug 4, 2025
a71e865
feat(normalize_batch_template): add normalize_batch_template function…
fangliu117 Aug 4, 2025
9edf8ce
fix(normalize_batch_template): fix typo and unused import
fangliu117 Aug 4, 2025
525d749
Merge pull request #397 from FNLCR-DMAP/template_normalize_batch
fangliu117 Aug 4, 2025
abda610
feat(tsne_analysis_template): add tsne_analysis_template function and…
fangliu117 Aug 4, 2025
7ae8e57
fix(tsne_analysis_template): fixed typo
fangliu117 Aug 4, 2025
45dbd24
Merge pull request #398 from FNLCR-DMAP/template_tSNE_analysis
fangliu117 Aug 4, 2025
bbb53f7
feat(posit_it_python_template): add posit_it_python_template function…
fangliu117 Aug 4, 2025
e70f547
fix(posit_it_python_template): fixed typo
fangliu117 Aug 4, 2025
06cfc59
Merge pull request #399 from FNLCR-DMAP/template_posit_it_python
fangliu117 Aug 4, 2025
9e3bea0
feat: Add SPAC boxplot Galaxy tool for Docker deployment
fangliu117 Oct 1, 2025
fc641b4
Merge pull request #400 from FNLCR-DMAP/galaxy_tools
fangliu117 Oct 1, 2025
67e3ec4
feat: add spac arcsinh_norm interactive_spatial_plot galaxy tools
fangliu117 Oct 2, 2025
d2526a7
feat: add spac_load_csv_files galaxy tools
fangliu117 Oct 2, 2025
4717bca
Merge pull request #401 from FNLCR-DMAP/galaxy_tools
fangliu117 Oct 2, 2025
bb6834b
feat: add spac_setup_analysis galaxy tools
fangliu117 Oct 2, 2025
c87e782
fix: spac_boxplot outputs in json and validated ha5d
fangliu117 Oct 2, 2025
b4c1856
Merge pull request #402 from FNLCR-DMAP/galaxy_tools
fangliu117 Oct 2, 2025
cbbcd9e
feat: add spac_zscore_normalization galaxy tools
fangliu117 Oct 3, 2025
6e51811
Merge pull request #403 from FNLCR-DMAP/galaxy_tools
fangliu117 Oct 3, 2025
009d010
refactor: streamline galaxy tools implementation
fangliu117 Oct 8, 2025
49a6479
Merge pull request #405 from FNLCR-DMAP/galaxy_tools_v2
fangliu117 Oct 8, 2025
196f511
init benchmark script
Ahmad8864 Oct 16, 2025
4d2e3d7
feat: add refactored galaxy tools
fangliu117 Oct 17, 2025
4906439
fix(boxplot): replace deprecated append call with concat
Ahmad8864 Oct 19, 2025
862e523
feat(test_performance): add performance tests for boxplot/histogram
Ahmad8864 Oct 19, 2025
c0762c3
fix(scripts): remove old performance testing script
Ahmad8864 Oct 19, 2025
c31c3ff
fix(performance_test): fix the speedup calculation logic
Ahmad8864 Oct 20, 2025
284c596
Merge pull request #407 from FNLCR-DMAP/galaxy_tools_v3
fangliu117 Oct 21, 2025
179482e
fix(histogram_performance): add clarifying comment for old hist imple…
Ahmad8864 Oct 21, 2025
9187e8d
Merge pull request #408 from Ahmad8864/benchmark-script
georgezakinih Oct 21, 2025
4e083fb
fix(nearest_neighbor_template): Break the title in two lines
georgezakinih Oct 30, 2025
fc664ad
test(perforamnce): skip performance tests by default
georgezakinih Oct 30, 2025
9c4d606
fix(test_performance): set the path to include spac
georgezakinih Oct 30, 2025
c2a2488
Merge pull request #409 from FNLCR-DMAP/nearest_neighbor_title
georgezakinih Nov 3, 2025
fda7302
Merge main into dev: restore Docker setup, paper resources, and main …
fangliu117 Jan 13, 2026
8005111
feat: refactor all templates and unit tests
fangliu117 Feb 27, 2026
7a5ec6d
fix: add missing 'import os' in performance tests
fangliu117 Feb 27, 2026
99f2de1
Merge pull request #415 from FNLCR-DMAP/templates-to-dev to dev
fangliu117 Feb 27, 2026
d0bbc5e
fix: Remove 6 deprecated templates (sync with tools_refactor)
fangliu117 Feb 27, 2026
93bfc70
Merge pull request #416 from FNLCR-DMAP/cleanup/remove-deprecated-tem…
fangliu117 Feb 27, 2026
c3a416c
Merge pull request #417 from FNLCR-DMAP/dev to release_dev
fangliu117 Feb 27, 2026
8c7badc
ci(version): Automatic development release
Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 339 additions & 5 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions galaxy_tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPAC Galaxy Tools

## Requirements
- Galaxy instance with Docker enabled
- Docker image: nciccbr/spac:v1

## Installation
1. Pull Docker image: `docker pull nciccbr/spac:v1`
2. Copy tool directory to Galaxy's tools folder
3. Add to tool_conf.xml:
```xml
<tool file="spac_boxplot/spac_boxplot.xml"/>
569 changes: 569 additions & 0 deletions galaxy_tools/refactor_tools/nidap_to_galaxy_synthesizer.py

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions galaxy_tools/refactor_tools/run_spac_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# run_spac_template.sh - Universal wrapper for SPAC Galaxy tools
set -eu

PARAMS_JSON="${1:?Missing params.json path}"
TEMPLATE_NAME="${2:?Missing template name}"

# Get the directory where this script is located (the tool directory)
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Look for spac_galaxy_runner.py in multiple locations
if [ -f "$SCRIPT_DIR/spac_galaxy_runner.py" ]; then
# If it's in the same directory as this script
RUNNER_PATH="$SCRIPT_DIR/spac_galaxy_runner.py"
elif [ -f "$__tool_directory__/spac_galaxy_runner.py" ]; then
# If Galaxy provides tool directory
RUNNER_PATH="$__tool_directory__/spac_galaxy_runner.py"
else
# Fallback to trying the module approach
echo "Warning: spac_galaxy_runner.py not found locally, trying as module" >&2
python3 -m spac_galaxy_runner "$PARAMS_JSON" "$TEMPLATE_NAME"
exit $?
fi

# Run the runner script directly
echo "Running: python3 $RUNNER_PATH $PARAMS_JSON $TEMPLATE_NAME" >&2
python3 "$RUNNER_PATH" "$PARAMS_JSON" "$TEMPLATE_NAME"
69 changes: 69 additions & 0 deletions galaxy_tools/refactor_tools/spac_arcsinh_normalization.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<tool id="spac_arcsinh_normalization" name="Arcsinh Normalization [SPAC] [DMAP]" version="1.0.0" profile="24.2">
<description>Normalize features either by a user-defined co-factor or a determined percentile, allowing for ef...</description>

<requirements>
<container type="docker">nciccbr/spac:v1</container>
</requirements>

<environment_variables>
<variable name="SPAC_PYTHON">python3</variable>
</environment_variables>

<command detect_errors="exit_code"><![CDATA[
set -eu &&
export GALAXY_OUTPUTS_SPEC='{"analysis": "transform_output.pickle"}' &&

## Debug: Show params.json
echo "=== params.json ===" >&2 &&
cat "$params_json" >&2 &&
echo "==================" >&2 &&

## Save snapshot
cp "$params_json" params_snapshot.json &&

## Run wrapper
bash $__tool_directory__/run_spac_template.sh "$params_json" "arcsinh_normalization"
]]></command>

<configfiles>
<inputs name="params_json" filename="params.json" data_style="paths"/>
</configfiles>

<inputs>
<param name="Upstream_Analysis" type="data" format="h5ad,binary" label="Upstream Analysis" help="Link to prior processed dataset in the analysis."/>
<param name="Table_to_Process" type="text" value="Original" label="Table to Process" help="Source table to perform the computation. Original refers to the raw dataset."/>
<param name="Co_Factor" type="text" value="5.0" label="Co-Factor" help="A fixed positive number to use as a co-factor for the transformation. If provided, it takes precedence over the percentile argument. If &quot;None&quot;, the Percentile method will be used. Default is &quot;5.0&quot;."/>
<param name="Percentile" type="text" value="None" label="Percentile" help="The percentile to determine the co-factor if the co-factor is not provided. The percentile is computed for each feature (column) individually. Default is &quot;None&quot;."/>
<param name="Output_Table_Name" type="text" value="arcsinh" label="Output Table Name" help="Name of the table to be added to the analysis."/>
<param name="Per_Batch" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Per Batch" help="Whether to apply the transformation per batch. If &quot;True&quot;, the transformation is applied per batch."/>
<param name="Annotation" type="text" value="None" label="Annotation" help="The name of the annotation to define batches. Required if Per Batch is &quot;True&quot;."/>
</inputs>

<outputs>
<data name="analysis" format="binary" from_work_dir="transform_output.pickle" label="${tool.name} on ${on_string}: Analysis"/>
<data name="params_snapshot" format="json" from_work_dir="params_snapshot.json" label="${tool.name} on ${on_string}: Params Snapshot"/>
<data name="config_used" format="json" from_work_dir="config_used.json" label="${tool.name} on ${on_string}: Config Used"/>
<data name="execution_log" format="txt" from_work_dir="tool_stdout.txt" label="${tool.name} on ${on_string}: Execution Log"/>
</outputs>

<help><![CDATA[
**Arcsinh Normalization [SPAC] [DMAP]**

Normalize features either by a user-defined co-factor or a determined percentile, allowing for effective normalization of high-range values in single-cell datasets. This transformation can also be applied per batch if specified.
[GitHub Documentation](https://fnlcr-dmap.github.io/SCSAWorkflow/spac.html#spac.transformations.arcsinh_transformation) for further information.

This tool is part of the SPAC (SPAtial single-Cell analysis) toolkit.

]]></help>

<citations>
<citation type="bibtex">
@misc{spac_toolkit,
author = {FNLCR DMAP Team},
title = {SPAC: SPAtial single-Cell analysis},
year = {2024},
url = {https://github.com/FNLCR-DMAP/SCSAWorkflow}
}
</citation>
</citations>
</tool>
85 changes: 85 additions & 0 deletions galaxy_tools/refactor_tools/spac_boxplot.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<tool id="spac_boxplot" name="Boxplot [SPAC] [DMAP]" version="1.0.0" profile="24.2">
<description>Create a boxplot visualization of the features in the analysis dataset.</description>

<requirements>
<container type="docker">nciccbr/spac:v1</container>
</requirements>

<environment_variables>
<variable name="SPAC_PYTHON">python3</variable>
</environment_variables>

<command detect_errors="exit_code"><![CDATA[
set -eu &&
export GALAXY_OUTPUTS_SPEC='{"DataFrames": "dataframe_folder", "figures": "figure_folder"}' &&

## Debug: Show params.json
echo "=== params.json ===" >&2 &&
cat "$params_json" >&2 &&
echo "==================" >&2 &&

## Save snapshot
cp "$params_json" params_snapshot.json &&

## Run wrapper
bash $__tool_directory__/run_spac_template.sh "$params_json" "boxplot"
]]></command>

<configfiles>
<inputs name="params_json" filename="params.json" data_style="paths"/>
</configfiles>

<inputs>
<param name="Upstream_Analysis" type="data" format="h5ad,binary" label="Upstream Analysis" help="Link to prior processed dataset in the analysis."/>
<param name="Table_to_Visualize" type="text" value="Original" label="Table to Visualize" help="Source table to perform the visualization. Default is Original, referring to the raw dataset."/>
<param name="Feature_s_to_Plot" type="text" area="true" value="All" label="Feature(s) to Plot" help="The feature(s) to plot in the box plot. Default &quot;All&quot; will plot all features. (Enter as comma-separated list or one per line)"/>
<param name="Primary_Annotation" type="text" value="None" label="Primary Annotation" help="The annotation to group the visualizations. Use &quot;None&quot; to disable."/>
<param name="Secondary_Annotation" type="text" value="None" label="Secondary Annotation" help="Secondary annotation to create subdivisions within each category defined by the primary annotation, offering a deeper level of analysis, such as comparing time points within each treatment condition. Default is &quot;None&quot;."/>
<param name="Value_Axis_Log_Scale" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Value Axis Log Scale" help="Make the Y-axis (or X-axis if the plot is horizontal) in log scale. Negative values in the data disable the log scale."/>
<param name="Figure_Title" type="text" value="BoxPlot" label="Figure Title" help="Title of the figure"/>
<param name="Horizontal_Plot" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Horizontal Plot" help="To plot the boxplot in horizontal orientation. Default is vertical."/>
<param name="Figure_Width" type="float" value="12" label="Figure Width" help="Width of the figure, inch."/>
<param name="Figure_Height" type="float" value="8" label="Figure Height" help="Height of the figure, inch."/>
<param name="Figure_DPI" type="float" value="300" label="Figure DPI" help="Higher the DPI, clearer the image."/>
<param name="Font_Size" type="float" value="10" label="Font Size" help="Figure font size."/>
<param name="Keep_Outliers" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Keep Outliers" help="True to keep the outliers for every feature, False to remove them"/>
</inputs>

<outputs>
<collection name="dataframes" type="list" label="${tool.name} on ${on_string}: DataFrames">
<discover_datasets pattern="(?P&lt;name&gt;.+)\.csv" directory="dataframe_folder" format="csv"/>
<discover_datasets pattern="(?P&lt;name&gt;.+)\.tsv" directory="dataframe_folder" format="tabular"/>
</collection>
<collection name="figures" type="list" label="${tool.name} on ${on_string}: Figures">
<discover_datasets pattern="(?P&lt;name&gt;.+)\.png" directory="figure_folder" format="png"/>
<discover_datasets pattern="(?P&lt;name&gt;.+)\.pdf" directory="figure_folder" format="pdf"/>
<discover_datasets pattern="(?P&lt;name&gt;.+)\.svg" directory="figure_folder" format="svg"/>
</collection>
<data name="params_snapshot" format="json" from_work_dir="params_snapshot.json" label="${tool.name} on ${on_string}: Params Snapshot"/>
<data name="config_used" format="json" from_work_dir="config_used.json" label="${tool.name} on ${on_string}: Config Used"/>
<data name="execution_log" format="txt" from_work_dir="tool_stdout.txt" label="${tool.name} on ${on_string}: Execution Log"/>
</outputs>

<help><![CDATA[
**Boxplot [SPAC] [DMAP]**

Create a boxplot visualization of the features in the analysis dataset.
Please refer to , [GitHub Documentation](https://fnlcr-dmap.github.io/SCSAWorkflow/spac.html#spac.visualization.boxplot)

This tool is part of the SPAC (SPAtial single-Cell analysis) toolkit.

**List Parameters:** Use comma-separated values or one per line.
**Special Values:** Enter "All" to select all items.
]]></help>

<citations>
<citation type="bibtex">
@misc{spac_toolkit,
author = {FNLCR DMAP Team},
title = {SPAC: SPAtial single-Cell analysis},
year = {2024},
url = {https://github.com/FNLCR-DMAP/SCSAWorkflow}
}
</citation>
</citations>
</tool>
Loading