Skip to content

Bug in scib.metrics.metrics when param 'embed' is not default "X_emb" for lisi scores and how to fix it #429

Description

@KieranwXtalpi

#In scib.metrics.metrics, 'use_rep' parameter in the calling of clisi_graph function and ilisi_graph function is not set and therefore default 'X_emb', which results in an inconsistency bug if 'embed' is set to something else.
Adding 'use_rep=embed' solves this problem:

if clisi_:
print("cLISI score...")
clisi = clisi_graph(
adata_int,
batch_key=batch_key,
label_key=label_key,
type_=type_,
subsample=subsample * 100,
use_rep=embed,
scale=True,
n_cores=n_cores,
verbose=verbose,
)
else:
clisi = np.nan
if ilisi_:
print("iLISI score...")
ilisi = ilisi_graph(
adata_int,
batch_key=batch_key,
type_=type_,
subsample=subsample * 100,
use_rep=embed,
scale=True,
n_cores=n_cores,
verbose=verbose,
)
else:
ilisi = np.nan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions