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

Augur example code throws a TypeError #524

Closed
namsaraeva opened this issue Feb 6, 2024 · 0 comments · Fixed by #533
Closed

Augur example code throws a TypeError #524

namsaraeva opened this issue Feb 6, 2024 · 0 comments · Fixed by #533
Assignees
Labels
bug Something isn't working

Comments

@namsaraeva
Copy link
Collaborator

Report

Augur example code:

import pertpy as pt
adata = pt.dt.bhattacherjee()
ag_rfc = pt.tl.Augur("random_forest_classifier")

data_15 = ag_rfc.load(adata, condition_label="Maintenance_Cocaine", treatment_label="withdraw_15d_Cocaine")
adata_15, results_15 = ag_rfc.predict(data_15, random_state=None, n_threads=4)
adata_15_permute, results_15_permute = ag_rfc.predict(data_15, augur_mode="permute", n_subsamples=100, random_state=None, n_threads=4)

data_48 = ag_rfc.load(adata, condition_label="Maintenance_Cocaine", treatment_label="withdraw_48h_Cocaine")
adata_48, results_48 = ag_rfc.predict(data_48, random_state=None, n_threads=4)
adata_48_permute, results_48_permute = ag_rfc.predict(data_48, augur_mode="permute", n_subsamples=100, random_state=None, n_threads=4)
pvals = ag_rfc.predict_differential_prioritization(augur_results1=results_15, augur_results2=results_48, permuted_results1=results_15_permute, permuted_results2=results_48_permute)

The pvals pvals = ag_rfc.predict_differential_prioritization(augur_results1=results_15, augur_results2=results_48, permuted_results1=results_15_permute, permuted_results2=results_48_permute) can't be calculated due to TypeError: Passing a set as an indexer is not supported. Use a list instead.

grafik

Version information

No response

@namsaraeva namsaraeva added the bug Something isn't working label Feb 6, 2024
@namsaraeva namsaraeva self-assigned this Feb 6, 2024
@namsaraeva namsaraeva linked a pull request Feb 10, 2024 that will close this issue
Zethson pushed a commit that referenced this issue Feb 10, 2024
* fix Augur example code throws a TypeError #524

* added augur example plots

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* 1st attempt to fix precommit

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant