crc-mets-vis: CRC metastasis explorer
A Streamlit app with a custom D3 component, organized as overview → explore → details:
- Who has metastases? A matrix of any two attributes (default: primary site group × race/ethnicity). Each bar shows the share of the cell's patients with metastasis, split into at diagnosis (first metastasis within N days, set in the sidebar) and found later. The whisker is the 95% CI and the dashed tick is the rate for all patients.
- Which organs, and how do patients fare? A transposed UpSet plot for the selected cell. Each row is one organ combination with its patient count (at diagnosis / later) and a survival curve measured from the first metastasis, drawn against all metastatic patients. The bars above the organ columns show 1-year survival by organ involved.
- Patients. A swimmer plot for the clicked combination: one lane per patient, with organ markers at the time of each metastasis and follow-up ending in death (×) or alive (›).
Groups smaller than Hide counts below (sidebar; default 11, the SEER-Medicare rule) are hidden in every view. Lower it only for exploring; anything shared must use at least 11.
Which data file is used
--data <folder>/--file <csv>given tocrc-mets-vis run(the launcher does this)- otherwise
DATA_FILEat the top ofsrc/crc_mets_vis/app.py(defaultNone)
There is no fallback: without a defined file the app shows nothing. The sidebar always shows which file is loaded.
Layout
crc-mets-vis/ (same layout as the project folder in the secure environment)
├── final_CRC_mets_full.csv (the app reads this file)
└── vis-app/
├── app.py dev entry: streamlit run app.py
├── make_synthetic_data.py writes fake CSVs to ../
├── pyproject.toml package metadata (name on PyPI: crc-mets-vis)
└── src/crc_mets_vis/
├── app.py the Streamlit page
├── analysis.py loading, summaries, small-cell rule, Kaplan-Meier
├── attributes.py attribute bins / labels / order <- edit here
├── cli.py crc-mets-vis run | make-launcher | demo-data
├── synth.py synthetic data generator
└── component/frontend/ index.html, main.js, style.css, d3.v7.min.js
Develop locally
cd vis-app
conda create -y -n crcvis python=3.12 && conda activate crcvis
python -m pip install -e .
python make_synthetic_data.py # fake data in ../ (no real patients)
python -m streamlit run app.py
After editing analysis.py or attributes.py, press C in the app (clear cache) or restart.
Publish to PyPI (no file transfer needed)
python -m pip install build twine
# bump __version__ in src/crc_mets_vis/__init__.py first
python -m build # -> dist/*.whl, dist/*.tar.gz
python -m twine upload dist/* # username: __token__, password: your PyPI API token
The package contains code only, never data. It's public once uploaded.
Install in a secure environment (once)
In Anaconda Prompt inside the secure environment (set DATA to the folder that holds
final_CRC_mets_full.csv):
set DATA=<project folder>
C:\ProgramData\anaconda3\python.exe -m venv "%DATA%\crcvis-env"
"%DATA%\crcvis-env\Scripts\python.exe" -m pip install crc-mets-vis
"%DATA%\crcvis-env\Scripts\python.exe" -m crc_mets_vis make-launcher --data "%DATA%"
This writes two files next to the data:
- Open CRC metastasis explorer.bat: double-click to start the app. A browser tab opens, and closing the black window stops the app.
- Update CRC metastasis explorer.bat: double-click to install the newest version from PyPI.
The launcher calls the environment's Python by its full path, so users never activate anything.
Each user gets their own free port, so several people can use it at once on the shared desktop.
If pip can't reach PyPI, set your environment's proxy first (set HTTPS_PROXY=... and HTTP_PROXY).
Metadata
Release files for crc-mets-vis 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crc_mets_vis-0.1.4.tar.gz | 124.2 kB | Without provenance | Details for crc_mets_vis-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crc_mets_vis-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for crc_mets_vis-0.1.4-py3-none-any.whl |
Total release size: 249.9 kB
Release files / crc_mets_vis-0.1.4.tar.gz
| Download URL | crc_mets_vis-0.1.4.tar.gz |
|---|---|
| Size | 124.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9b6ffe88bc75e5a3da1065f8fbb56c5a2e65ce4fb885d3e89424a2f4121dd8a
|
|
BLAKE2b-256 checksum How to use checksums |
e1049810be06187aaa7ee8a88f8a7aa7ee5648f79ea88dcf673961f621406b5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|
Release files / crc_mets_vis-0.1.4-py3-none-any.whl
| Download URL | crc_mets_vis-0.1.4-py3-none-any.whl |
|---|---|
| Size | 125.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75f5c12d59207491404234c60d983deef0160abd2865039db6425c435181ebea
|
|
BLAKE2b-256 checksum How to use checksums |
be6d2ee694e2e9e132af83dd437902b3a1ec7ddb429f20f236b1c98e83a1441d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|
Security for crc-mets-vis 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.