Skip to content

Commit

Permalink
Re-added back the code for the work-around of using the optitype_env …
Browse files Browse the repository at this point in the history
…conda env to run optitype 1.3.2 instead of its latest version due to FRED-2/OptiType#125 and added comments to explain the three work-arounds for this issue.
  • Loading branch information
zhaoxiaofei committed Sep 20, 2023
1 parent db3d296 commit 5d4fcb5
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions install-step-1-by-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ conda create -y -n $neoheadhunter
# ASNEO requires 'biopython<=1.79' (ASNEO code can be refactored to upgrade biopython)
# ERGO-II requires pytorch-lightning=0.8, but we will change a few lines of source code in ERGO-II
# in the next installation step to make it work with higher versions of pytorch-lightning
# podman will be used to provide a work-around for https://github.com/FRED-2/OptiType/issues/125
# podman can be used to provide a work-around for https://github.com/FRED-2/OptiType/issues/125
$conda install -y -n $neoheadhunter python=3.10 xlrd \
gcc openjdk parallel perl podman sshpass tcsh \
perl-carp-assert psutil pyyaml requests-cache zlib \
Expand All @@ -40,18 +40,25 @@ $conda install -y -n $neoheadhunter python=3.10 xlrd \
# to solve this error (namely, export CONDA_OVERRIDE_CUDA="11.8" && export CONDA_CUDA_OVERRIDE="11.8").

conda run -n $neoheadhunter pip install sj2psi # for ASNEO.py
conda run -n $neoheadhunter podman pull quay.io/biocontainers/optitype:1.3.2--py27_3 # work-around for https://github.com/FRED-2/OptiType/issues/125

# The optitype environment should be able to provide a work-around for https://github.com/FRED-2/OptiType/issues/125
# However, it seems that conda and mamba cannot install the obsolete python versions that the previous versions of optitype depend on
# Therefore, we commented out the following 4 lines of code
# optitype=optitype_env
# conda create -y -n $optitype
# $conda install -y -n $optitype optitype=1.3.2
# conda env export -n ${optitype} > ${optitype}.freeze.yml && conda list -e -n ${optitype} > ${optitype}.requirements.txt
# > First work-around for https://github.com/FRED-2/OptiType/issues/125 : use podman to run OptiType
# Please set IS_PODMAN_USED_TO_WORKAROUND_OPTITYPE_MEM_LEAK=True in the Snakefile to enable this work-around.
# On some platforms, the error '''Error: command required for rootless mode with multiple IDs: exec: "newuidmap": executable file not found in $PATH''' pop up for this work-around.
conda run -n $neoheadhunter podman pull quay.io/biocontainers/optitype:1.3.2--py27_3

# > Second work-around for https://github.com/FRED-2/OptiType/issues/125 : use another conda env to run OptiType
# Please set OTITYPE_CONDA_ENV=optitype_env in the Snakefile to enable this work-around.
# On some platforms, conda and mamba cannot install the obsolete python versions that the previous versions of optitype depend on
optitype=optitype_env
conda create -y -n $optitype
$conda install -y -n $optitype optitype=1.3.2
conda run -n ${optitype} pip install --upgrade pyomo # pyomo=5.7.3

# > Third work-around for https://github.com/FRED-2/OptiType/issues/125 : manually set the comma_sep_hla_list config param to skip HLA typing.

# The following commands can generate the requirements and freeze files
if false; then
conda env export -n ${optitype} > env/${optitype}.freeze.env_export.yml && conda list -e -n ${optitype} > env/${optitype}.requirements.list_e.txt
conda list -n ${neoheadhunter} -e | grep -v "^sj2psi=" > env/requirements.list_e_no_pypi.txt
conda env export -n ${neoheadhunter} > env/freeze.env_export.yml
conda env export -n ${neoheadhunter} --no-builds > env/freeze.env_export_no_builds.yml
Expand Down

0 comments on commit 5d4fcb5

Please sign in to comment.