{"id":45924833,"url":"https://github.com/kpmp/wsi-worker","last_synced_at":"2026-02-28T09:01:47.414Z","repository":{"id":36073196,"uuid":"204552446","full_name":"KPMP/wsi-worker","owner":"KPMP","description":"A containerized worker to convert WSI slides in SVS format to DZI","archived":false,"fork":false,"pushed_at":"2024-12-16T21:04:37.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-12-16T21:18:41.383Z","etag":null,"topics":["dpr","participant-portal","wsi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KPMP.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-26T20:06:14.000Z","updated_at":"2024-12-16T21:04:40.000Z","dependencies_parsed_at":"2024-09-06T15:43:48.489Z","dependency_job_id":"b7a5fa5d-19ba-4a83-8338-acf706966200","html_url":"https://github.com/KPMP/wsi-worker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/KPMP/wsi-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPMP%2Fwsi-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPMP%2Fwsi-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPMP%2Fwsi-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPMP%2Fwsi-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KPMP","download_url":"https://codeload.github.com/KPMP/wsi-worker/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KPMP%2Fwsi-worker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29929116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dpr","participant-portal","wsi"],"created_at":"2026-02-28T09:01:46.756Z","updated_at":"2026-02-28T09:01:47.389Z","avatar_url":"https://github.com/KPMP.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WSI Worker\n\nThis script converts one SVS to a DZI pyramid, links the converted assets into the DPR's file structure, and updates the DPR database.\n\n## Building the Docker Image\n1. Build the base image in `docker/wsi-worker-base`\n2. Tag with `kingstonduo/wsi-worker-base` (plus version) and push\n3. Build the worker image in `docker/wsi-worker`\n4. Tag with `kingstonduo/wsi-worker` (plus version) and push\n\n### First Time Set-Up\nTo get started quickly, create a `.env` file in `wsi-worker/scripts` and then call `./run-wsi-worker.sh`.\nTo initialize the `.env` file, copy `wsi-worker/scripts/.env.example` and modify it to suit your environment (see \".env File\" below).\n\n### Example Run\n1. Put an SVS file into the host's \"SVS file drop zone\" directory indicated by `ENV_JOB_IN_DIR`\n2. `cd wsi-worker/scripts` to make that your working directory with your `.env` file\n3. Start up your environment's docker-compose under `heavens-docker/delphinus`, otherwise the DB update will fail\n4. Run the below command to convert the SVS to DZI and link it in the file system and to the DPR database\n\n`./run-wsi-worker.sh KPMP-Ex1 KPMP-Ex1_PAS_1of1 abc123 pas`\n\n#### Arguments\n1. KPMP ID\n2. SVS filename without the `.svs` extension\n3. Package File ID from the Data Lake\n4. Slide type. Values are 'LM', 'EM', 'IF'.\n5. [Optional] stain type.  Values are 'he', 'pas', 'silver', 'tri', 'frz', 'tol' and 'cr'.  Defaults to 'pas'\n\n#### .env File\n1. `ENV_IMAGE`: defaults to `kingstonduo/wsi-worker`\n2. `ENV_LINK_SRC_DIR`: container KE data directory, defaults to `/data/knowledgeEnvironment/deepZoom`\n3. `ENV_LINK_DST_DIR`: container DPR data directory, defaults to `/data/deepZoomImages`\n4. `ENV_LINK_SRC_DIR_HOST`: Host KE data directory, maps to `ENV_LINK_SRC_DIR`\n5. `ENV_LINK_DST_DIR_HOST`: Host DPR data directory, maps to `ENV_LINK_DST_DIR`\n6. `ENV_JOB_IN_DIR`: the host directory holding the source files (.jpg/.jpeg, .svs, .tif) to be handled by the job\n7. `ENV_JOB_OUT_DIR`: the host directory to hold `link.sh` and `error.txt` if errors are logged\n\n### Outputs\n1. `ENV_JOB_OUT_DIR` receives byproduct files used in the job\n2. `ENV_LINK_SRC_DIR` receives the DZI assets from the SVS conversion\n3. `ENV_LINK_DST_DIR` gets symlinks to DZI assets stored in the `ENV_LINK_SRC_DIR`\n4. `delphinus-mongodb` container gets updated participant and slide records in the \"patients\" collection\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpmp%2Fwsi-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpmp%2Fwsi-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpmp%2Fwsi-worker/lists"}