11# Bioconductor-compliant management of Python environments
22#
3- # This script defines a basilisk environment for immlynx .
3+ # This script defines basilisk environments for immLynx .
44#
5- # The environment is defined using the BasiliskEnvironment function, which
6- # specifies the name of the environment, the package name, and the list of
7- # required Python packages .
5+ # Two separate environments are used so that installation failures in
6+ # problematic packages (soNNia and clusTCR) do not prevent the rest of
7+ # the Python tooling from working .
88#
9- # The defined environment is then used in the wrapper functions to execute
10- # Python code using basiliskRun.
9+ # immLynxEnv -- stable dependencies used by the majority of the
10+ # package: OLGA, tcrdist3, metaclonotypist,
11+ # transformers/torch (ESM-2 embeddings), etc.
12+ #
13+ # immLynxExtraEnv -- packages that have historically had installation
14+ # issues: soNNia and clusTCR. Used only by
15+ # calculate.sonia() and calculate.clustcr().
1116#
1217# Note: Version checking is disabled because clusTCR is installed directly
1318# from its GitHub repository via a git+https:// URL in the `pip` vector,
1722
1823basilisk :: setBasiliskCheckVersions(FALSE )
1924
25+ # ---------------------------------------------------------------------------
26+ # Core environment -- stable packages
27+ # ---------------------------------------------------------------------------
2028immLynxEnv <- basilisk :: BasiliskEnvironment(
2129 envname = " immLynxEnv" ,
2230 pkgname = " immLynx" ,
@@ -29,17 +37,35 @@ immLynxEnv <- basilisk::BasiliskEnvironment(
2937 " scikit-learn=1.1.3" ,
3038 " statsmodels=0.13.2" ,
3139 " seaborn=0.12.1" ,
32- " markov-clustering=0.0.6.dev0" ,
3340 " faiss-cpu=1.7.4"
3441 ),
3542 pip = c(
3643 " tcrdist3==0.2.2" ,
3744 " olga==1.2.4" ,
38- " sonnia==0.2.5" ,
3945 " metaclonotypist==0.2.0" ,
4046 " pyrepseq==1.5.1" ,
4147 " torch==2.1.2" ,
42- " transformers==4.36.2" ,
48+ " transformers==4.36.2"
49+ )
50+ )
51+
52+ # ---------------------------------------------------------------------------
53+ # Extra environment -- soNNia + clusTCR (may fail to install)
54+ # ---------------------------------------------------------------------------
55+ immLynxExtraEnv <- basilisk :: BasiliskEnvironment(
56+ envname = " immLynxExtraEnv" ,
57+ pkgname = " immLynx" ,
58+ packages = c(
59+ " python=3.9" ,
60+ " numpy=1.23.4" ,
61+ " scipy=1.8.0" ,
62+ " pandas=1.4.4" ,
63+ " scikit-learn=1.1.3" ,
64+ " markov-clustering=0.0.6.dev0"
65+ ),
66+ pip = c(
67+ " olga==1.2.4" ,
68+ " sonnia==0.2.5" ,
4369 " git+https://github.com/svalkiers/clusTCR.git@1.0.3"
4470 )
4571)
0 commit comments