• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pirl-unc / tcrsift / 25584246325

08 May 2026 11:18PM UTC coverage: 71.284% (+0.1%) from 71.139%
25584246325

push

github

web-flow
Add per-donor TIL-overlap aggregation + filter knob (#9 chunk 4) (#22)

Final data-feature slice of #9. Builds on the donor metadata foundation
from chunk 1 (v0.6.0): when TIL data carries patient_id, match_til now
emits a per-donor view of how many TIL cells each culture-validated
clone has within each donor. The matching filter knob captures the
"culture-enriched and present in the same donor's TIL" criterion the
issue calls out.

In match_til:
  - When at least one TIL DataFrame has patient_id populated, group
    cell counts by (donor, clone) and produce two new columns on the
    output:
      til_cells_per_donor      JSON {donor: cells} per clone
      max_til_cells_per_donor  scalar max for filter use
  - No-op when TIL data lacks patient_id (preserves existing
    backwards-compat for legacy TIL workflows that don't carry donor
    metadata).

In filter_clonotypes_threshold + filter_clonotypes:
  - min_til_cells_per_donor knob, reads max_til_cells_per_donor.
  - No-op when the column isn't on the table (consistent convention
    with all the other axis knobs).

CLI: --min-til-cells-per-donor wired into both `tcrsift filter` and
`tcrsift run`, threaded through FilterConfig.

Tests:
  - per-donor JSON dict and max scalar produced correctly across
    multi-donor TIL inputs (B1-2 has 3 cells of clone X, B1-3 has 1)
  - empty per-donor view when clone doesn't appear in any TIL donor
  - per-donor aggregation skipped when TIL data lacks patient_id
  - filter knob behavior + no-op when the column is absent

Bumps version to 0.7.2 — additive surface, no breaking change.

This closes the data-feature scope of #9 (the four data chunks the
issue chunked itself into). Per-donor PDF reports — the reporting
piece of the issue — still remain; tracking as a separate follow-up
since it's its own piece of work (matplotlib/PDF generation, layout
decisions) and doesn't compose with this PR's data shape.

4282 of 6007 relevant lines covered (71.28%)

2.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.22
/cli.py


Source Not Available

The file "cli.py" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc