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: Fixes JSON file detection bug in heatmap visualizer #38

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

VinzentRisch
Copy link
Collaborator

@VinzentRisch VinzentRisch commented Jan 18, 2024

This PR was created to fix #37.

  • The heatmap visualizer has to copy all JSON files from the annotation artifact to one directory and rename the files in the process.
  • The files where missing the .json extension after the renaming and because of this were not detected.
  • Now the .json is added to the destination path, what resolved the issue
  • Added comments to the heatmap visualizer.

Set up an environment

CONDA_SUBDIR=osx-64 mamba create -yn q2-amr \
  -c conda-forge -c bioconda -c qiime2 -c defaults \
  -c https://packages.qiime2.org/qiime2/2023.9/shotgun/released/ \
  qiime2 q2cli q2templates q2-types q2-types-genomics rgi

conda activate q2-amr
conda config --env --set subdir osx-64

pip install --no-deps --force-reinstall \
  git+https://github.com/misialq/rgi.git@py38-fix \

Run it locally

  1. First, clone the repo and checkout the PR branch:
git clone https://github.com/bokulich-lab/q2-amr.git
cd q2-amr
git fetch origin pull/38/head:pr-38
git checkout pr-38
pip install -e .
  1. Download test file amr_annotations.qza

  2. Test it out!

 qiime amr heatmap --i-amr-annotation amr_annotations.qza --o-visualization heatmap.qzv

Should look like this:

Screenshot 2024-01-18 at 15 21 28

@VinzentRisch VinzentRisch requested review from Sann5 and removed request for Sann5 January 18, 2024 14:24
@VinzentRisch
Copy link
Collaborator Author

Hey @Sann5 :) can you give this a review.
Super small bug and everything should run smoothly.
And please tell me if the environment setup and PR checkout works fine, I have tested it myself but no one else has tried it before. 🙂

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (68f5ddb) 93.35% compared to head (ebe425f) 93.35%.

Files Patch % Lines
q2_amr/card/heatmap.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #38   +/-   ##
=======================================
  Coverage   93.35%   93.35%           
=======================================
  Files          18       18           
  Lines        1054     1054           
=======================================
  Hits          984      984           
  Misses         70       70           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VinzentRisch VinzentRisch added the bug Something isn't working label Jan 18, 2024
@Sann5
Copy link

Sann5 commented Jan 19, 2024

@VinzentRisch in the Set up an environment section is it not redundant to pip install q2-amr from git when in the next step it is cloned and installed manually?

@VinzentRisch
Copy link
Collaborator Author

Yeah that is true. I'll remove it :)

Copy link

@Sann5 Sann5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ✅ Env setup worked
  • ✅ Visualizer runs locally
  • ✅ Test pass locally
  • ✅ Code looks good to me

Overall it all looks good to me :)

@VinzentRisch
Copy link
Collaborator Author

Thanks :)

@VinzentRisch VinzentRisch merged commit c179878 into bokulich-lab:main Jan 19, 2024
6 checks passed
@VinzentRisch VinzentRisch deleted the 37_heatmap_json_error branch January 19, 2024 13:49
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 this pull request may close these issues.

BUG: Heatmap produces error becuase it does not recognise JSON files
3 participants