From 5d4fcb53e164dac05884ed9fcc1a3bce88df2cdc Mon Sep 17 00:00:00 2001 From: ZhaoXiaofei Date: Thu, 21 Sep 2023 01:44:16 +0800 Subject: [PATCH] Re-added back the code for the work-around of using the optitype_env conda env to run optitype 1.3.2 instead of its latest version due to https://github.com/FRED-2/OptiType/issues/125 and added comments to explain the three work-arounds for this issue. --- install-step-1-by-conda.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/install-step-1-by-conda.sh b/install-step-1-by-conda.sh index a9fd98d..0af3855 100644 --- a/install-step-1-by-conda.sh +++ b/install-step-1-by-conda.sh @@ -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 \ @@ -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