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

pirl-unc / tcrsift / 25580663876

08 May 2026 09:34PM UTC coverage: 70.822% (+0.01%) from 70.812%
25580663876

push

github

web-flow
Add timepoint and apc_type axis fields; propagate to obs (#9 chunk 1) (#18)

First slice of #9. Lays the metadata foundation for the broader
stratification axes #9 calls out (timepoints, APCs, TIL-overlap,
tissue), in the same shape as #8 chunk 1: add the field, serialize
it, propagate it to obs, register it in rehydrate_obs.

Per-axis decisions:

- timepoint: free-form `str | None`. The issue's examples are mixed
  ("D7", "D14", "baseline", "post-IL2"); strings handle both numeric
  and label cases without the mixed-type column issues that bit
  `culture_days`. The existing `culture_days` int field stays — it's
  per-sample, distinct from `timepoint` which groups samples.
- apc_type: free-form `str | None` (e.g. "mDC", "B-LCL",
  "autologous_PBMC", "K562-A2-CD80"). Distinct from `tissue`
  (anatomical) and `antigen_type` (what was presented).
- tissue: existing field, but wasn't in to_dataframe() or the obs
  metadata propagation block. Wired both up so the existing axis
  participates in chunks 2/3 alongside the two new ones.

Changes:

- sample_sheet.Sample gains timepoint and apc_type fields.
- to_dataframe() now serializes timepoint, apc_type, and tissue.
- loader.load_sample propagates all three into adata.obs alongside
  patient_id / enrichment_method / source, using the conditional-skip
  pattern from #5 so unset axes don't create all-None object columns
  that break write_h5ad.
- _dtypes._STRING_COLS includes timepoint and apc_type so rehydrate_obs
  re-pins them to object after an h5ad roundtrip (tissue was already
  there).

CSV and YAML loaders pass the new fields through unchanged because
Sample(**row_dict) absorbs them.

Tests cover: propagation when set, absence when unset, sample-sheet
DataFrame serialization, free-form value acceptance, CSV/YAML loader
ingestion, and Categorical -> object rehydration for all five axis
columns (donor, method, timepoint, apc, tissue).

Bumps version to 0.6.0 — new sample-sheet schema fields (additive).
... (continued)

4187 of 5912 relevant lines covered (70.82%)

2.83 hits per line

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

84.92
/sample_sheet.py


Source Not Available

The file "sample_sheet.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