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

bug: paired-heatmap top-k-microbes fails when top microbes are not found in ranks #108

Open
nbokulich opened this issue Nov 20, 2019 · 0 comments

Comments

@nbokulich
Copy link
Contributor

Error reported in QIIME 2 forum

The issue is at these lines:

mmvec/mmvec/heatmap.py

Lines 199 to 201 in ec082d2

top_metabolites = dict.fromkeys(m for x in [ranks.loc[f].sort_values(
ascending=False)[:top_k_metabolites].index
for f in features] for m in x).keys()

This results in a KeyError if any of the features (microbes) are missing from the ranks table.

either those lines should be amended to grab only features that are present in ranks, or better yet ranks and microbes_table should be subsetted to keep the intersection somewhere before this line:

if top_k_microbes is not None:

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