bug: paired-heatmap top-k-microbes fails when top microbes are not found in ranks
- Dominant language
- Python
- Stars
- 133
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Error reported in [QIIME 2 forum](https://forum.qiime2.org/t/error-in-q2-mmvec-and-some-other-question/12562)
The issue is at these lines:
https://github.com/biocore/mmvec/blob/ec082d25be946971d203d96e77504aaaa3157cfc/mmvec/heatmap.py#L199-L201
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:
https://github.com/biocore/mmvec/blob/ec082d25be946971d203d96e77504aaaa3157cfc/mmvec/heatmap.py#L175
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in mmvec/heatmap.py at lines 175 and 199-201, then trace how the ranks table and microbes table are selected for paired-heatmap top-k-microbes. Reproduce the reported case with microbes missing from ranks and confirm that the command completes without a KeyError while retaining only valid features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100