retrieve_optimal_markers added in utils - #19
Open
ivanferrari95 wants to merge 1 commit into
Open
Conversation
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.
🚀 Title
Add
retrieve_optimal_markers: automated marker selection using CIA scoring🧠 Summary
This merge request introduces a new function,
retrieve_optimal_markers, to automatically identify optimal marker gene signatures for each group in a single-cell dataset.The method combines differential expression analysis with CIA-like scoring and ROC AUC evaluation to select compact, high-performing gene signatures.
🎯 Motivation
Current workflows often rely on:
This function provides a more data-driven and quantitative approach to:
⚙️ What the function does
For each group, the function performs the following steps:
scanpy.tl.rank_genes_groupspct1)pct2)auc_toleranceof the best AUC🧬 Key Features
Quantitative marker evaluation
The function uses ROC AUC to quantify how well a gene signature separates one group from all others.
CIA-like scoring
The score combines:
Optimal signature selection
The function avoids arbitrary selection of the top N genes and instead identifies a compact signature with strong discriminative performance.
Efficient implementation
To improve scalability, the function includes:
n_jobsmax_genes)step,refine_window)🔧 Main Parameters
groupbyadata.obsdefining the groupsuns_keyrank_genes_groups)logFCpct1pct2meanpadjauc_tolerancen_jobsmax_genessteprefine_window📦 Output
The function returns a dictionary of marker genes in the form:
{group: [marker_genes]}