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

pirl-unc / tcrsift / 25706124068

12 May 2026 12:44AM UTC coverage: 70.69% (-0.2%) from 70.909%
25706124068

push

github

web-flow
--fdr-scope {global, per-donor, per-sample} (closes #26, v0.8.0) (#29)

* Add --fdr-scope {global, per-donor, per-sample} (closes #26)

Implements per-donor FDR scope so the FDR-tier filter can compute its
null against each donor's own pooled-across-methods samples instead of
silently merging unrelated repertoires.

Sample sheet:
  - SampleSheet gains a `donors_share_antigen: bool` field, read from
    the top-level YAML key `donors_share_antigen: true`. Cohort-level
    signal that pooling across donors is biologically valid.

FilterConfig (also flat-key in YAML / CLI):
  - fdr_scope: str = "auto"           {auto, global, per-donor, per-sample}
  - donors_share_antigen: bool = False  override / cohort signal

filter.resolve_fdr_scope(requested, n_donors, donors_share_antigen)
  Auto-resolution: 'per-donor' when n_donors>1 and not
  donors_share_antigen, else 'global'. Explicit values pass through.
  Validates against the four-element enum.

filter.split_clonotypes_by_donor(clonotypes, long_df)
filter.split_clonotypes_by_sample(clonotypes, long_df)
  Partition the clonotype table into per-donor / per-sample subsets
  using long_df's per-(donor|sample, clone) presence info. A clone
  appears in every donor's subset where it has at least one cell —
  cross-donor clones get evaluated independently in each donor's null.

CLI:
  --fdr-scope {auto,global,per-donor,per-sample}    default 'auto'
  --donors-share-antigen                            override sheet flag

cmd_run wiring:
  - Resolves scope from FilterConfig + sheet flag, prints the resolved
    scope so it's visible in run output.
  - global scope: existing behavior, single global tier files.
  - per-donor scope: split clonotypes by donor, run filter independently
    per donor, write per-donor tier files (filtered_tier{1..5}_<donor>.csv).
    Failed per-donor runs warn and continue rather than aborting the
    whole pipeline. Annotates each row with `scope_donor`.
  - per-sample scope: same shape... (continued)

4445 of 6288 relevant lines covered (70.69%)

2.83 hits per line

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

53.65
/cli.py


Source Not Available

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