Feature/threshold assignment#61
Open
irene-bonapa wants to merge 14 commits into
Open
Conversation
This reverts commit 9558a26.
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.
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, withbackground_noisean 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, withfaitfhul=Truerefering to the original ICON implementation.