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: Changed installation instructions in README to install unreleased qiime2 version 2024.5 #70

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

VinzentRisch
Copy link
Collaborator

@VinzentRisch VinzentRisch commented Apr 5, 2024

temporary fix for #69

Set up an environment for apple silicone

CONDA_SUBDIR=osx-64 mamba create -yn q2-amr \
  -c conda-forge -c bioconda -c defaults \
  -c https://packages.qiime2.org/qiime2/2024.2/shotgun/released/ -c qiime2 \
  qiime2 q2cli q2templates q2-types 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 \

pip install git+https://github.com/qiime2/qiime2.git  

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/70/head:pr-70
git checkout pr-70
pip install -e .
  1. Download test files
    PR_56.zip

  2. Test it out!
    Run all this command from the PR_56 directory.

qiime amr collate-reads-allele-annotations --i-annotations partition_reads_allele/sample1.qza partition_reads_allele/sample2.qza --o-collated-annotations partition_reads_allele/collate.qza

@VinzentRisch VinzentRisch linked an issue Apr 11, 2024 that may be closed by this pull request
@VinzentRisch
Copy link
Collaborator Author

Hi @Sann5
Could you try this out?
Its a temporary fix for a problem that will be solved when the new qiime2 version is released, until then it needs this additional step in the installation instructions.
There are no code changes, only a small addition in the README

@VinzentRisch VinzentRisch requested a review from Sann5 April 12, 2024 09:10
@Sann5
Copy link

Sann5 commented Apr 12, 2024

@VinzentRisch sure thing. Ill try it out rn.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
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.

Disclaimer: I don't have an apple silicon so I followed the instructions on the README.md rather than the one in the PR message

So I ran into an error basically because the conda q2-types from is version 2023.7 and you rely on a newer one. So I simply pip installed q2-types from GitHub also and then it worked.

@VinzentRisch
Copy link
Collaborator Author

a sorry no that was because i had an error with my installation instructions.
If you try again now the correct types should be installed with the instructions in the PR

@VinzentRisch VinzentRisch requested a review from Sann5 April 12, 2024 10:49
@Sann5
Copy link

Sann5 commented Apr 12, 2024

@VinzentRisch should I also try the CONDA_SUBDIR=osx-64 and conda config --env --set sub dir osx-64 lines or is that only for the Apple Silicon Installation?

@VinzentRisch
Copy link
Collaborator Author

That is only for an apple silicone installation.
I forgot that you have an intel mac.
I just read your disclaimer, so that means you used the installation instructions in the readme with the additional
pip install git+https://github.com/qiime2/qiime2.git ? And this led to q2-types 2023.7 getting installed?

@Sann5
Copy link

Sann5 commented Apr 12, 2024

Rather I think when you conda/mamba install q2-types in the first command the 2023.7 gets installed. I looked at the Anaconda repo and that is the latest version there. But maybe it's looking in the wrong channel if you know there is already a newer one available in conda.

Because i think pip install git+https://github.com/qiime2/qiime2.git should not install any dependencies.

@Sann5
Copy link

Sann5 commented Apr 12, 2024

Actually I just checked and it is indeed the channel that you removed now, e.g. -c qiime2 that was present before.

@VinzentRisch
Copy link
Collaborator Author

VinzentRisch commented Apr 12, 2024

Yes I understand that.
But It does not happen for me if i do

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

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

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

it installs q2-types 2024.2

maybe there is a difference because of the different processors

can you please try again with this and see if it happens again?

mamba create -yn q2-amr_testtypes \
  -c conda-forge -c bioconda -c defaults \
  -c https://packages.qiime2.org/qiime2/2024.2/shotgun/released/ -c qiime2 \
  qiime2 q2cli q2templates q2-types rgi

conda activate q2-amr_testtypes

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

And if it happens again can you try with this where the order of the channels is different

mamba create -yn q2-amr_testorder \
  -c https://packages.qiime2.org/qiime2/2024.2/shotgun/released/ -c qiime2 \
  -c conda-forge -c bioconda -c defaults \
  qiime2 q2cli q2templates q2-types rgi

conda activate q2-amr_testorder

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

@Sann5
Copy link

Sann5 commented Apr 12, 2024

Ok so setting up the q2-amr-testorder env from above and then runing the example in the PR message will throw the follwoing error:

ValueError: Cannot place Tuple[SampleData[CARDAlleleAnnotation % Properties('kma', 'bowtie2')]] and Tuple[SampleData[CARDAlleleAnnotation % Properties('kma', 'bwa')]] in the same type variable.

Then because I was curious I pip install git+https://github.com/qiime2/qiime2.git. This updates the version from 2024.2.0 to 2024.5.0. Then the action works ✨

@VinzentRisch
Copy link
Collaborator Author

Yes Okay perfect, thanks for the testing :)

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.53%. Comparing base (6cb68a5) to head (3fc1427).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   93.53%   93.53%           
=======================================
  Files          20       20           
  Lines        1314     1314           
=======================================
  Hits         1229     1229           
  Misses         85       85           

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

@VinzentRisch VinzentRisch merged commit 9172f4e into bokulich-lab:main Apr 12, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

BUG: ValueError when running collate-reads-allele-annotations
2 participants