Skip to content

Add profile-level generic assay aggregation#12181

Merged
dippindots merged 16 commits into
cBioPortal:masterfrom
dippindots:issue-131-generic-assay-frequency-table
Jun 17, 2026
Merged

Add profile-level generic assay aggregation#12181
dippindots merged 16 commits into
cBioPortal:masterfrom
dippindots:issue-131-generic-assay-frequency-table

Conversation

@dippindots

@dippindots dippindots commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Part of: cBioPortal/GSoC#131 and #7940
Frontend PR: cBioPortal/cbioportal-frontend#5596

Summary

Adds backend support for the Generic Assay frequency/counts table in Study View by introducing a profile-level aggregation path for Generic Assay data and wiring Generic Assay row selections into Study View filtering.

This keeps the existing entity-filtered Generic Assay count behavior intact while enabling the new cohort-level table for binary and categorical Generic Assay profiles.

What changed

New profile-level Generic Assay counts path

  • Extended the Generic Assay counts request shape to accept profileType
  • Added a new profile-level aggregation query in the ClickHouse Generic Assay mapper
  • Routed column-store Generic Assay count requests to:
    • existing entity-filter path when genericAssayDataFilters are present
    • new profile-level path when profileType is provided

Study View filter integration

  • Added genericAssaySelectionFilters to Study View filter models/context
  • Wired Generic Assay table row selections into Study View cohort filtering
  • Added SQL support so selected Generic Assay rows restrict the cohort the same way other Study View components do

Counting semantics

  • Supports both sample-level and patient-level Generic Assay profiles
  • Uses exact case-insensitive matching for selected Generic Assay values
  • Preserves existing NA denominator semantics on the legacy/entity-filter count path
  • Computes profile-scoped totals for the new profile-level aggregation path
  • Fixed bin-count aggregation so patient-level profiles use patient-level counting/NA totals instead of sample-level counting

Follow-up cleanup and hardening

  • Tightened Generic Assay selection validation to reject blank profileType, stableId, and value
  • Refactored Generic Assay selection validation helpers for readability
  • Removed the dead intercepted Generic Assay request-attribute path from the column-store controller
  • Cleaned up Sonar-reported test issues, including deprecated test wiring and unused constants

Backend flow

  1. Study View sends POST /api/generic-assay-data-counts/fetch
  2. If genericAssayDataFilters are present, backend uses the existing entity-filter count path
  3. If no entity filters are present and profileType is provided, backend uses the new profile-level aggregation path
  4. If users select rows in the Generic Assay table, those selections are stored in genericAssaySelectionFilters
  5. Study View filtering SQL converts those selections into cohort restrictions and all downstream aggregations recompute against the filtered cohort

Validation / tests

Added or updated focused coverage for:

  • column-store Generic Assay controller routing and request validation
  • Generic Assay selection validation
  • Generic Assay selection matching behavior
  • profile-level Generic Assay count aggregation
  • sample-level and patient-level Generic Assay bin-count aggregation
  • restored skipped Study View controller test annotation coverage

@dippindots dippindots added the api label Jun 2, 2026
@dippindots dippindots force-pushed the issue-131-generic-assay-frequency-table branch 3 times, most recently from dd2836c to 8ce2851 Compare June 5, 2026 18:25
dippindots and others added 12 commits June 17, 2026 13:09
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dippindots dippindots force-pushed the issue-131-generic-assay-frequency-table branch from 47bacf6 to cc19663 Compare June 17, 2026 17:09
@dippindots dippindots self-assigned this Jun 17, 2026
dippindots and others added 3 commits June 17, 2026 17:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dippindots dippindots marked this pull request as ready for review June 17, 2026 18:55
@dippindots dippindots changed the title (WIP) Add profile-level generic assay aggregation Add profile-level generic assay aggregation Jun 17, 2026
@dippindots dippindots merged commit 47cdb38 into cBioPortal:master Jun 17, 2026
19 of 21 checks passed
@dippindots dippindots deleted the issue-131-generic-assay-frequency-table branch June 17, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant