Skip to content

Commit

Permalink
Merge pull request #53 from kostrykin/biohackeu23
Browse files Browse the repository at this point in the history
applies the new conventions for imaging tools agreed at BioHackEU23
  • Loading branch information
CameronFRWatson authored Feb 28, 2024
2 parents 384bcb7 + f1a88b2 commit 130ef7e
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 38 deletions.
8 changes: 6 additions & 2 deletions tools/mesmer/mesmer.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<tool id="mesmer" name="Mesmer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="19.01">
<description>Mesmer for whole-cell segmentation of multiplexed tissue imaging data</description>
<tool id="mesmer" name="Perform segmentation of multiplexed tissue data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="19.01">
<description>with Mesmer</description>

<macros>
<import>macros.xml</import>
</macros>

<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>

<expand macro="requirements"/>
<expand macro="stdio"/>

Expand Down
6 changes: 6 additions & 0 deletions tools/mti-utils/.shed.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
owner: goeckslab
remote_repository_url: https://github.com/goeckslab/tools-mti/tree/main/tools/mti-utils
homepage_url: https://github.com/goeckslab/tools-mti/tree/main/tools/mti-utils
long_description: |
A suite of tool wrapper for Multiplex Tissue Imaging (MTI) utilities.
These include simple custom scripts for renaming channels in OME-TIFF metadata,
and singal-processing for tabular intensity data. More utilities may be added in
the future.
categories:
- Imaging
exclude:
Expand Down
3 changes: 2 additions & 1 deletion tools/mti-utils/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
</xml>
<xml name="citations">
<citations>
<citation type="doi">10.1101/2022.08.18.504436</citation>
</citations>
</xml>

<token name="@TOOL_VERSION@">0.0.1</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">3</token>
<token name="@PROFILE@">19.01</token>
</macros>
10 changes: 6 additions & 4 deletions tools/mti-utils/process_intensities.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<tool id="cell_intensity_processing" name="Process single-cell intensities" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>Options to correct for exposure time, autofluorescence subtraction, or compute signal-to-background ratio.</description>
<description></description>
<macros>
<import>macros.xml</import>
</macros>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<expand macro="requirements" />
<command detect_errors="aggressive"><![CDATA[
Expand Down Expand Up @@ -109,8 +112,7 @@ tissue imaging data.
3. Signal-to-background ratio - Divide single-cell mmean marker intensities by respective AF/bg channel mean intensity specified in channel metadata
**Outputs**
1. Feature observation matrix with processed intensities for all markers in channel metadata file.
CellIDs, centroids, and morphological data remain unchanged.
1. Feature observation matrix with processed intensities for all markers in channel metadata file. CellIDs, centroids, and morphological data remain unchanged.
]]></help>
<expand macro="citations" />
</tool>
</tool>
16 changes: 12 additions & 4 deletions tools/mti-utils/rename_tiff_channels.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<tool id="rename_tiff_channels" name="Rename OME-TIFF Channels" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>Change the channel names in the XML metadata of OME-TIFF images</description>
<tool id="rename_tiff_channels" name="Rename OME-TIFF channels" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>with ome-types</description>
<macros>
<import>macros.xml</import>
</macros>


<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>

<expand macro="requirements"/>
<expand macro="version_cmd"/>

<stdio>
<regex match=".*XMLSyntaxError.*"
Expand All @@ -14,6 +17,8 @@
description="XML metadata does not adhere to OME format. Considering converting image to OME-TIFF" />
</stdio>

<expand macro="version_cmd"/>

<command detect_errors="aggressive"><![CDATA[
cp '$image' ./renamed_image.ome.tiff &&
Expand Down Expand Up @@ -81,6 +86,9 @@ print(tiffcomment(os.path.join(cwd, 'renamed_image.ome.tiff')))
</test>
</tests>
<help><![CDATA[
Given an OME.TIFF image and channel metadata CSV file, rename the image channels in the
OME XML metadata. CSV file must contain column 'marker_name' which will populate the XML
metadata with channel names in the order provided in the CSV file.
]]></help>
<expand macro="citations" />
</tool>
5 changes: 5 additions & 0 deletions tools/squidpy/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ owner: goeckslab
homepage_url: https://squidpy.readthedocs.io/en/stable/
remote_repository_url: https://github.com/goeckslab/tools-mti/tree/main/tools/squidpy
description: Squidpy is a tool for the analysis and visualization of spatial molecular data.
long_description: |
Squidpy is a tool for the analysis and visualization of spatial molecular data.
It builds on top of scanpy and anndata, from which it inherits modularity and scalability.
It provides analysis tools that leverages the spatial coordinates of the data,
as well as tissue images if available.
categories:
- Imaging
- Proteomics
Expand Down
2 changes: 1 addition & 1 deletion tools/squidpy/main_macros.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<macros>
<token name="@TOOL_VERSION@">1.1.2</token>
<token name="@PROFILE@">20.01</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">2</token>

<xml name="macro_stdio">
<stdio>
Expand Down
22 changes: 12 additions & 10 deletions tools/squidpy/squidpy_spatial.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<tool id="squidpy_spatial" name="Squidpy Graph and Plotting" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>for spatial analysis </description>
<tool id="squidpy_spatial" name="Analyze and visualize spatial multi-omics data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>with Squidpy</description>
<macros>
<import>main_macros.xml</import>
</macros>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<expand macro="squidpy_requirements"/>
<expand macro="macro_stdio" />
<version_command>echo "@TOOL_VERSION@"</version_command>
Expand Down Expand Up @@ -257,7 +260,7 @@
</data>
</outputs>
<tests>
<test>
<test expect_num_outputs="1">
<param name="anndata" value="imc.h5ad" ftype="h5ad" />
<param name="selected_tool" value="spatial_neighbors" />
<output name="output">
Expand All @@ -266,7 +269,7 @@
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="2">
<param name="anndata" value="imc_sn.h5ad" ftype="h5ad" />
<param name="selected_tool" value="nhood_enrichment" />
<param name="cluster_key" value="cell type" />
Expand All @@ -277,7 +280,7 @@
</output>
<output name="output_plot" file="imc_nhood_enrichment.png" compare="sim_size" delta="2000" />
</test>
<test>
<test expect_num_outputs="2">
<param name="anndata" value="imc_sn.h5ad" ftype="h5ad" />
<param name="selected_tool" value="co_occurrence" />
<param name="cluster_key" value="cell type" />
Expand All @@ -288,7 +291,7 @@
</output>
<output name="output_plot" file="imc_co_occurrence.png" compare="sim_size" delta="2000" />
</test>
<test>
<test expect_num_outputs="2">
<param name="anndata" value="imc_sn.h5ad" ftype="h5ad" />
<param name="selected_tool" value="centrality_scores" />
<param name="cluster_key" value="cell type" />
Expand All @@ -299,7 +302,7 @@
</output>
<output name="output_plot" file="imc_centrality_scores.png" compare="sim_size" delta="2000" />
</test>
<test>
<test expect_num_outputs="2">
<param name="anndata" value="imc_sn.h5ad" ftype="h5ad" />
<param name="selected_tool" value="interaction_matrix" />
<param name="cluster_key" value="cell type" />
Expand All @@ -310,7 +313,7 @@
</output>
<output name="output_plot" file="imc_interaction_matrix.png" compare="sim_size" delta="2000" />
</test>
<test>
<test expect_num_outputs="2">
<param name="anndata" value="imc_sn.h5ad" ftype="h5ad" />
<param name="selected_tool" value="ripley" />
<param name="cluster_key" value="cell type" />
Expand Down Expand Up @@ -341,6 +344,5 @@ This tool includes various of single cell spatial analysis utils provided by Squ
]]>
</help>
<citations>
</citations>
<expand macro="citations" />
</tool>
6 changes: 6 additions & 0 deletions tools/vitessce/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ exclude:
- dependencies
remote_repository_url: https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce
homepage_url: https://github.com/vitessce/vitessce
long_description: |
Vitessce enables visual analysis of multi-modal assay types which probe biological systems
through techniques such as microscopy, genomics, and transcriptomics.
auto_tool_repositories:
name_template: "{{ tool_id }}"
description_template: "Wrapper for vitessce tool: {{ tool_name }}"
suite:
name: suite_vitessce
description: Vitessce is a visual integration tool for exploration of spatial single-cell experiments.
long_description: |
Vitessce enables visual analysis of multi-modal assay types which probe biological systems
through techniques such as microscopy, genomics, and transcriptomics.
9 changes: 6 additions & 3 deletions tools/vitessce/gate_finder.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<tool id="gate_finder" name="Gate Finder" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>displays a series of gating outcomes using Vitessce</description>
<tool id="gate_finder" name="Perform gating" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>with Vitessce</description>
<macros>
<import>main_macros.xml</import>
</macros>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<expand macro="vitessce_requirements"/>
<expand macro="macro_stdio" />
<version_command>echo "@VERSION@"</version_command>
Expand All @@ -14,7 +17,7 @@
<param name="image" type="data" format="ome.tiff" label="Select the image (OME-TIFF)" />
<param name="masks" type="data" format="tiff,ome.tiff" optional="true" label="Select masks for the OME Tiff image (Optional)" />
<section name="do_phenotyping" title=" ">
<param name="phenotyping_choice" type="hidden" value="true"/>
<param name="phenotyping_choice" type="hidden" value="add_h5ad"/>
</section>
<param name="phenotyping_choice" type="hidden" value="yes" />
<param name="anndata" type="data" format="h5ad" label="Select the anndata containing marker intensities" />
Expand Down
4 changes: 2 additions & 2 deletions tools/vitessce/main_macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">1.0.4</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@VERSION_SUFFIX@">3</token>
<token name="@PROFILE@">20.01</token>

<xml name="vitessce_requirements">
Expand Down Expand Up @@ -70,7 +70,7 @@
#if $masks
--masks '${output.files_path}/A/0/masks01.ome.tiff'
#end if
#if $do_phenotyping.phenotyping_choice
#if $do_phenotyping.phenotyping_choice == 'add_h5ad'
--anndata '$anndata'
#end if
&&
Expand Down
28 changes: 17 additions & 11 deletions tools/vitessce/vitessce_spatial.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<tool id="vitessce_spatial" name="Vitessce Visualization" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>integrative visualization of multi-modal, spatial single-cell data</description>
<tool id="vitessce_spatial" name="Run multi-modal single-cell visualization" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>with Vitessce</description>

<macros>
<import>main_macros.xml</import>
</macros>

<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>

<expand macro="vitessce_requirements"/>
<expand macro="macro_stdio" />
<version_command> "@VERSION@"</version_command>
Expand All @@ -18,10 +22,14 @@
<param name="image" type="data" format="ome.tiff" label="Select the OME Tiff image" />
<param name="masks" type="data" format="tiff,ome.tiff" optional="true" label="Select masks for the OME Tiff image (Optional)" />
<conditional name="do_phenotyping">
<param name="phenotyping_choice" type="boolean" checked="true" label="Whether to do phenotyping">
<param name="phenotyping_choice" type="select" label="Add annotations or visualizations from Anndata file">
<option value="no_h5ad" selected="true">Do not add elements from Anndata file</option>
<option value="add_h5ad">Add elements from Anndata file</option>
</param>
<when value="true">
<param name="anndata" type="data" format="h5ad" label="Select the anndata contaning phenotyping info" />
<when value="no_h5ad">
</when>
<when value="add_h5ad">
<param name="anndata" type="data" format="h5ad" label="Select the anndata file" />
<conditional name="scatterplot_embeddings">
<param name="embedding" type="select" label="Select an embedding algorithm for scatterplot">
<option value="umap" selected="true">UMAP</option>
Expand Down Expand Up @@ -58,7 +66,7 @@
</when>
</conditional>
<conditional name="phenotype_factory">
<param name="phenotype_mode" type="select" label="Input phenotyping keys">
<param name="phenotype_mode" type="select" label="Input the anndata key to display">
<option value="choices" selected="true">Multiple choices</option>
<option value="type_in">Type in</option>
</param>
Expand All @@ -76,8 +84,6 @@
</when>
</conditional>
</when>
<when value="false">
</when>
</conditional>
</inputs>
<outputs>
Expand All @@ -87,7 +93,7 @@
<test>
<param name="image" value="cropped_reactive_core.ome.tiff" ftype="ome.tiff" />
<conditional name="do_phenotyping">
<param name="phenotyping_choice" value="yes" />
<param name="phenotyping_choice" value="add_h5ad" />
<param name="anndata" value="cropped_tutorial_data_pheno.h5ad" ftype="h5ad" />
<conditional name="phenotype_factory">
<param name="phenotype_mode" value="type_in" />
Expand All @@ -99,7 +105,7 @@
<test>
<param name="image" value="cropped_reactive_core.ome.tiff" ftype="ome.tiff" />
<conditional name="do_phenotyping">
<param name="phenotyping_choice" value="yes" />
<param name="phenotyping_choice" value="add_h5ad" />
<param name="anndata" value="cropped_tutorial_data_pheno.h5ad" ftype="h5ad" />
<conditional name="scatterplot_embeddings">
<param name="embedding" value="pca" />
Expand All @@ -114,7 +120,7 @@
<test>
<param name="image" value="cropped_reactive_core.ome.tiff" ftype="ome.tiff" />
<conditional name="do_phenotyping">
<param name="phenotyping_choice" value="no" />
<param name="phenotyping_choice" value="no_h5ad" />
</conditional>
<output name="output" file="tutorial_vitessce.html" compare="sim_size" delta="20" />
</test>
Expand Down

0 comments on commit 130ef7e

Please sign in to comment.