Skip to content

Fix SIC extraction for cell types with shared prefixes#6

Merged
jeliason merged 3 commits intomainfrom
fix/sic-extraction-prefix-matching
Feb 4, 2026
Merged

Fix SIC extraction for cell types with shared prefixes#6
jeliason merged 3 commits intomainfrom
fix/sic-extraction-prefix-matching

Conversation

@jeliason
Copy link
Owner

@jeliason jeliason commented Feb 3, 2026

Summary

Fixes the mul.tensor: i incompatible to j error when extracting SICs from datasets where one cell type name is a prefix of another (e.g., cd4tcells, cd4tcells_ICOS, cd4tcells_PD1).

  • Changed coefficient name matching from substring search to exact end-of-string match using regex $ anchor
  • Applied fix to all three extraction functions: .extract_group_sics(), .extract_patient_sics(), .extract_image_sics()

Fixes #5

The coefficient name matching used a substring search that incorrectly
matched multiple cell types when one name was a prefix of another
(e.g., cd4tcells also matched cd4tcells_ICOS, cd4tcells_PD1, etc.).

Changed grep pattern to use regex $ anchor to match only coefficient
names ending with the exact source type name.

Fixes #5
@jeliason jeliason mentioned this pull request Feb 3, 2026
CRAN removes old macOS ARM binaries when new versions are released,
causing cached lockfiles to reference non-existent packages.
@jeliason jeliason merged commit 7cf0263 into main Feb 4, 2026
5 checks passed
@jeliason jeliason deleted the fix/sic-extraction-prefix-matching branch February 4, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when extracting SICs

1 participant