Skip to content

Add ZOOMA Galaxy wrapper for column-based API annotation of tabular inputs#747

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-zooma-api-wrapper
Draft

Add ZOOMA Galaxy wrapper for column-based API annotation of tabular inputs#747
Copilot wants to merge 3 commits intomasterfrom
copilot/add-zooma-api-wrapper

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

This PR introduces a new Galaxy tool wrapper for ZOOMA that annotates values from a user-selected column in a tabular dataset via the ZOOMA web API and emits a tabular result. It adds a minimal, tool-native implementation aligned with existing tools/* layout and metadata conventions in this repository.

  • New Galaxy tool: tools/zooma

    • Added zooma.xml with inputs for:
      • tabular source file
      • selectable query column (data_column, header-aware)
      • header toggle
      • API URL override
      • request timeout
    • Produces a tabular output containing normalized ZOOMA annotation fields.
  • Python API wrapper

    • Added zooma.py that:
      • reads selected column values from TSV/tabular input
      • executes HTTP GET requests to ZOOMA annotate endpoint (propertyValue=<value>)
      • normalizes nested JSON response into flat tabular rows
      • handles no-hit responses deterministically (empty annotation fields per query).
  • Offline/deterministic execution support

    • Added optional mock-response input path in the wrapper/tool contract to map query terms to pre-defined API responses.
    • Enables reproducible behavior for environments where external API access is constrained.
  • Tool packaging metadata and fixtures

    • Added macros.xml and .shed.yml.
    • Added focused test fixtures under tools/zooma/test-data/:
      • input.tsv
      • mock_response.json
      • expected.tsv
python '$__tool_directory__/zooma.py' \
  --input '$input' \
  --output '$output' \
  --column '$query_column' \
  --api-url '$api_url' \
  --timeout '$timeout' \
  --has-header

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • wheels.galaxyproject.org
    • Triggering command: /home/REDACTED/.planemo/gx_venv_3/bin/python python -m pip install -r requirements.txt --extra-index-url REDACTED (dns block)
    • Triggering command: /home/REDACTED/.planemo/gx_venv_3/bin/python /home/REDACTED/.planemo/gx_venv_3/bin/python /home/REDACTED/.planemo/gx_venv_3/lib/python3.12/site-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-8lu_0wz7/overlay --no-warn-script-location --disable-pip-version-check --no-compile --target (dns block)
    • Triggering command: /home/REDACTED/.planemo/gx_venv_3/bin/python /home/REDACTED/.planemo/gx_venv_3/bin/python /home/REDACTED/.planemo/gx_venv_3/lib/python3.12/site-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-j7uyg6mi/overlay --no-warn-script-location --disable-pip-version-check --no-compile --target (dns block)
  • www.ebi.ac.uk
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
    • Triggering command: /usr/bin/python python - (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 17, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add wrapper for ZOOMA tool web API Add ZOOMA Galaxy wrapper for column-based API annotation of tabular inputs Apr 17, 2026
Copilot AI requested a review from hechth April 17, 2026 18:50
Comment thread tools/zooma/zooma.py


def query_zooma(query_value, api_url, timeout):
response = requests.get(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe implement a retry when blocked by rate-limit?

Comment thread tools/zooma/zooma.xml
@@ -0,0 +1,58 @@
<tool id="zooma" name="ZOOMA annotate" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please include a profile version

Comment thread tools/zooma/zooma.xml

<requirements>
<requirement type="package" version="3.12">python</requirement>
<requirement type="package" version="2.32.3">requests</requirement>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request should bring in a python version, so you can drop the explicit python version

Comment thread tools/zooma/zooma.xml
<param name="api_url" type="text" value="https://www.ebi.ac.uk/spot/zooma/v2/api/services/annotate" label="ZOOMA API URL">
<help>Override only if you need a different compatible endpoint.</help>
</param>
<param name="timeout" type="integer" value="30" min="1" label="HTTP request timeout (seconds)" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this should be offered to a user.

Comment thread tools/zooma/zooma.xml
<help>Override only if you need a different compatible endpoint.</help>
</param>
<param name="timeout" type="integer" value="30" min="1" label="HTTP request timeout (seconds)" />
<param name="mock_response" type="data" format="json" optional="true" label="Optional mocked JSON response file" help="Optional test/offline map: query term -> list of ZOOMA annotations." />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uha

Comment thread tools/zooma/zooma.xml
<param name="input" type="data" format="tabular,csv,tsv" label="Input table" />
<param name="has_header" type="boolean" truevalue="--has-header" falsevalue="" checked="true" label="Input file contains a header row" />
<param name="query_column" type="data_column" data_ref="input" numerical="false" use_header_names="true" label="Column used for ZOOMA query" />
<param name="api_url" type="text" value="https://www.ebi.ac.uk/spot/zooma/v2/api/services/annotate" label="ZOOMA API URL">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be hard-coded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Tool Request]: ZOOMA tool

3 participants