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

TotalVI unexpected behaviour in differential expression function #2627

Open
canergen opened this issue Mar 23, 2024 · 0 comments
Open

TotalVI unexpected behaviour in differential expression function #2627

canergen opened this issue Mar 23, 2024 · 0 comments
Labels

Comments

@canergen
Copy link
Contributor

canergen commented Mar 23, 2024

If defining protein_names_uns_key the DE function fails. This is unexpected behaviour.

def test_totalvi_de_error(save_path):
    adata = synthetic_iid()
    TOTALVI.setup_anndata(
        adata,
        batch_key="batch",
        protein_expression_obsm_key="protein_expression",
    )
    model = TOTALVI(adata)
    model.train(1, train_size=0.5)
    model.differential_expression(groupby="labels", group1="label_1")

    adata = synthetic_iid()
    TOTALVI.setup_anndata(
        adata,
        batch_key="batch",
        protein_expression_obsm_key="protein_expression",
        protein_names_uns_key="protein_names",
    )
    model = TOTALVI(adata)
    model.train(1, train_size=0.5)
    model.differential_expression(groupby="labels", group1="label_1")

ValueError("cannot reindex on an axis with duplicate labels")

@canergen canergen added the bug label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant