Skip to content

Add WorkflowHub importer with per-tool workflow ID outputs#52

Open
paulzierep wants to merge 3 commits into
research-software-ecosystem:mainfrom
paulzierep:workflowhub-import
Open

Add WorkflowHub importer with per-tool workflow ID outputs#52
paulzierep wants to merge 3 commits into
research-software-ecosystem:mainfrom
paulzierep:workflowhub-import

Conversation

@paulzierep

@paulzierep paulzierep commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Add WorkflowHub importer with per-tool workflow ID outputs

Creates a new workflowhub-import/ importer that fetches all workflows from the WorkflowHub API and produces per-tool workflow ID files for the RSEc content repo.

What it does:

  • Paginates through all workflows on WorkflowHub (~1500)
  • Fetches detailed metadata for each workflow (title, creators, tags, EDAM annotations, license, DOI)
  • Extracts tool names from two sources: curated bio.tools annotations and Galaxy internals.steps descriptions
  • Maps tool names to data/{biotool_id}/ directories using galaxy_codex Suite ID → bio.tool ID mapping, falling back to raw tool name
  • Writes data/{biotool_id}/{biotool_id}.workflowhub.json containing only a list of workflow IDs
  • Saves full workflow entries to imports/workflowhub/{id}.workflowhub.json
  • Supports --test [N] flag to limit workflows for testing
  • Outputs stats: workflow count, tool distribution, and workflow engine breakdown (Galaxy vs Nextflow vs Snakemake etc.)

Usage:

# Full run (all workflows)
python3 workflowhub-import/workflowhub-import.py
python3 workflowhub-import/workflowhub-import.py --test 100   # Test with 100

# In the RSEc content repo
# The content repo has data/ with per-tool directories; the importer
# creates *.workflowhub.json files alongside existing *.biotools.json etc.

Format of per-tool files (e.g. data/fastp/fastp.workflowhub.json):

["1738", "1739", "1740", "1741"]

Instead of the workflow IDs we could also use links directly, it depends what is easier to add for the Atlas.
Unfortunatly most nextflow / snakemake workflows do not have tools available via workflowHUB api, I made some tests to get it via ro-crate or the associated github, but this is messy. I would opt to fix this rather on the workflow hub side.

@paulzierep

Copy link
Copy Markdown
Contributor Author

linter fails due to other scripts alread merged !

@mihai-sysbio

Copy link
Copy Markdown
Contributor

@rioualen @supernord just want to make sure you are aware of this, it would be great if you could consider reviewing

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants