Skip to content

Feature/threshold assignment#61

Open
irene-bonapa wants to merge 14 commits into
mainfrom
feature/threshold_assignment
Open

Feature/threshold assignment#61
irene-bonapa wants to merge 14 commits into
mainfrom
feature/threshold_assignment

Conversation

@irene-bonapa

Copy link
Copy Markdown

Resolves #4

Re-implementation of ICON, adapted to our data format and scenario.

Short summary:
ICON calculates a S score and assigns specificity to all cells with S > threshold, with: S = np.log(E+0.01) * R * C^2, followed by per cell normalisation and per dextramer scaling.

E: Denoised dextramer signal. dextramer_counts - background_noise, with background_noise an user input, or a high quantile of the negative control dextramer.
C: pMHC ratio per cell. E/sum(E, axis=1).
R: clonal purity. clonal_counts.div(clonal_counts.sum(axis=1), axis=0), with clonal counts the number of cells per clone with E>0 per dextramer.

In the original ICON implementation, there's a bug in R calculation, that gives very low scores to clones with R=1. For reproducibility, we implemented both options, with faitfhul=True refering to the original ICON implementation.

@irene-bonapa irene-bonapa linked an issue Mar 31, 2026 that may be closed by this pull request
@irene-bonapa irene-bonapa self-assigned this Mar 31, 2026
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.

Implementation of ICOS

3 participants