Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Bug in Infer Doublets #313

Open
hl-xue opened this issue Aug 16, 2024 · 0 comments
Open

Potential Bug in Infer Doublets #313

hl-xue opened this issue Aug 16, 2024 · 0 comments

Comments

@hl-xue
Copy link

hl-xue commented Aug 16, 2024

Hello,

Thanks for the nice package!

I would like to report a potential bug in the pegasus.infer_doublets() method.

According to what I understood, before _run_scrublet is called, the identify_robust_genes, log_norm and highly_variable_features are required.
This works correctly if the channel_attr is given.

However, if the channel_attr is not given, it seems that the three required steps are skipped, as indicated below (extracted from here).

if channel_attr is None:
        if data.shape[0] >= min_cell:
            fig = _run_scrublet(data, raw_mat_key, expected_doublet_rate = expected_doublet_rate, sim_doublet_ratio = sim_doublet_ratio, \
                                n_prin_comps = n_prin_comps, k = k, n_jobs = n_jobs, random_state = random_state, plot_hist = if_plot, manual_correction = mancor.get('', None))
            if if_plot:
                fig.savefig(f"{plot_hist}.dbl.png")
        else:
            logger.warning(f"Data has {data.shape[0]} < {min_cell} cells and thus doublet score calculation is skipped!")
            data.obs["doublet_score"] = 0.0
            data.obs["pred_dbl"] = False
    else:
            #(omitted)
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

No branches or pull requests

1 participant