Repository navigation
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The session views already bump marker ids, so the edgelist stream, proximity filter, and proximity SQL go back to the dev code instead of keeping a separate translation. Co-authored-by: Cursor <cursoragent@cursor.com>
to_record_batches uses the same marker1/marker2 rename as _handle_backwards_compatibility, so a streamed legacy edgelist matches to_polars. Co-authored-by: Cursor <cursoragent@cursor.com>
refactor(panel): bump marker ids in the session views
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 76665c8. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Several
--panelinputs are concatenated into one panel (marker_id,sequence_1, andsequence_2stay unique across that panel).Each input panel is one source, and each marker keeps a link to the source it came from.
A concatenated panel is stored in the
.pxlfile. It cannot be registered in the config.add_panelonly accepts a single source panels.New
.pxlfiles store the panel in thepanelsandpanel_sourcestables.Redundant storage of the same info is removed:
var, anduns['panel_metadata']is no longer written. instead, the panel columns are joined onto the in-memory AnnData, on read.panel_nameorpanel_version.Files from pixelator 0.22.0 through 0.30.0 are still read from
uns['panel_metadata']andvar. Denoise still readspanel_namefor files from before 0.22.0.When several files are read together, each source is bumped to the newest patch those files carry. A source is one input panel. Sources match on name, product, and major.minor. The bump renames markers in the in-memory edgelist, proximity, and layouts. The file on disk is not rewritten. Sample-called files keep hashing clones collapsed.
Denoise rebuilds the count matrix from the markers already in
var, so hashing clones that sample calling removed do not come back. The full panel is still written to the tables.from_adatais removed. It only rebuilt a panel from an AnnData that still carried the on-disk panel fields, and a loaded dataset no longer has those. Legacy.pxlfiles are still read directly. No caller in this repository usedfrom_adataon an AnnData that was not the pxl file.Fixes: PNA-3624
Type of change
How Has This Been Tested?
.pxland confirm the panel comes from the tables, not fromvaroruns.unsandvar.panel_name.vardo not come back.PR checklist:
pyproject.tomland cited it properlyNote
High Risk
Breaking
.pxlpanel storage and metadata, plus automatic patch alignment and hashing rename rules, affect denoise, sample calling, and multi-file analysis paths where marker identity must stay consistent.Overview
This PR redefines how antibody panels are defined, stored, and reconciled across the PNA pipeline.
CLI and panel model:
single-cell-pna demux,collapse, andgraphnow accept repeated--panelflags; inputs are concatenated into one panel (uniquemarker_idand sequences), with each CSV as a tracked source.PNAAntibodyPanel.from_adatais removed; panels come from the.pxlfile or config viaload_antibody_panels/read_dataset_panel.On-disk format: New
.pxlfiles persist panels inpanelsandpanel_sourcesDuckDB tables. Panel columns are not duplicated onvar,uns['panel_metadata']is dropped, and file metadata no longer carriespanel_name/panel_version. Rewriting legacy 0.22–0.30 files migrates panel data fromuns/varinto those tables.Multi-sample reads: When several files are loaded together,
align_panel_patchesbumps each source to the newest patch shared across files (match on name, product, major.minor). Renames apply in memory to AnnData, edgelist, proximity, and layouts (session views); disks are unchanged. Sample-called files respecthashing_collapsedso hashing clones stay collapsed.Pipeline fixes: Denoise reads the panel from the file and rebuilds counts using markers already in
var, so clones removed by sample calling are not reintroduced. Sample calling uses structured hashing id rules and writeshashing_collapsed: true.Edgelist.to_record_batchesnow renames legacymarker1/marker2like other exporters.Reviewed by Cursor Bugbot for commit c818e23. Bugbot is set up for automated code reviews on this repo. Configure here.