diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 93642295..93c184c2 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -8,10 +8,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v2 + - uses: pnpm/action-setup@v4 + with: + version: 10 + - uses: actions/setup-node@v4 with: node-version: 20.12.2 + cache: pnpm + cache-dependency-path: web/src/main/javascript/pnpm-lock.yaml - name: Install node modules - run: npm install + run: pnpm install --frozen-lockfile - name: Run ESLint - run: npm run lint \ No newline at end of file + run: pnpm run lint \ No newline at end of file diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index d448fb9d..1e9a28f5 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -8,12 +8,17 @@ jobs: working-directory: web/src/main/javascript steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v2 + - uses: pnpm/action-setup@v4 + with: + version: 10 + - uses: actions/setup-node@v4 with: node-version: 20.12.2 + cache: pnpm + cache-dependency-path: web/src/main/javascript/pnpm-lock.yaml - name: Install node modules - run: npm install + run: pnpm install --frozen-lockfile - name: Build frontend - run: npm run build + run: pnpm run build - name: Run unit tests - run: npm test \ No newline at end of file + run: pnpm test \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 05e4c124..2353ab6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ FROM node:20.12.2-alpine AS frontend-builder +RUN corepack enable WORKDIR /app/frontend -COPY web/src/main/javascript/package*.json ./ -RUN npm config set fetch-timeout 600000 -RUN npm ci +COPY web/src/main/javascript/package.json web/src/main/javascript/pnpm-lock.yaml ./ +RUN pnpm config set fetch-timeout 600000 +RUN pnpm install --frozen-lockfile COPY web/src/main/javascript/ ./ -RUN npm run build +RUN pnpm run build FROM golang:1.24.5-alpine AS backend-builder RUN apk add --no-cache git openssh-client diff --git a/README.md b/README.md index e5a12eae..8d83a1fd 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,78 @@ Read about our latest developments on our [News page](/docs/News.md). Users may submit their OncoTree related questions to the [OncoTree Users Google Group](https://groups.google.com/forum/#!forum/oncotree-users). +## Annotation overlay + +The tree can be overlaid with custom annotations that map OncoTree codes to +values. Each annotation may be a number, a text label, a gene list, or an +object combining them, e.g.: + +```json +{ + "LUAD": { "label": "1204 samples", "value": 1204 }, + "GB": { "genes": ["EGFR", "PTEN", "TP53"] } +} +``` + +Each annotated node gets a small badge showing its value or gene count; +hovering the node adds the full detail (value, gene list) to the node's +tooltip. Collapsing a node rolls up its hidden descendants — values are summed +and gene lists unioned. + +Annotations can be supplied four ways: + +1. **Paste or upload** JSON/CSV in the *Annotations* panel. +2. **URL parameter** — `?annotations=` where the value is raw + (URL-encoded) JSON or base64-encoded JSON (the panel's "Copy share link" + button produces the base64 form). +3. **Embed via `postMessage`** — add `?embed` to the URL to hide the site + header and footer (leaving just the tree), then drive it from the host. Add + `allow="fullscreen"` to the ` + ``` + + When the app runs in an `