From aabaf6ecbb0449ba7761a3afd80f0015c940c2a1 Mon Sep 17 00:00:00 2001 From: bbimber Date: Mon, 22 Jan 2024 11:57:37 -0600 Subject: [PATCH] Prepare for seurat 5 compatibility (#40) * Prepare for seurat 5 compatibility * Remove unnecessary fixed versions --- .github/workflows/R-CMD-check.yaml | 16 +++------------- DESCRIPTION | 2 +- Dockerfile | 9 ++------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index f2be0b2..8e45034 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -50,8 +50,7 @@ jobs: - name: Setup CoNGA run: | - # NOTE: seaborn added for: https://github.com/scverse/scanpy/issues/2680 - python3 -m pip install --user scanpy fastcluster seaborn==0.12.2 + python3 -m pip install --user scanpy cd ../ git clone -b rhesus https://github.com/phbradley/conga.git conga cd conga/tcrdist_cpp @@ -105,17 +104,8 @@ jobs: run: | getOption('repos'); print(paste0("R_BIOC_VERSION: ", Sys.getenv("R_BIOC_VERSION"))); - # TODO: remove this once Seurat 5 is supported. Install RIRA and CellMembrane first, since it depends on seurat 4.4 and the upgrade would otherwise force-update it: - devtools::install_version('Seurat', version = '4.4.0', ask = FALSE, upgrade = 'never', type = 'source', repos = 'https://cloud.r-project.org') - devtools::install_github(repo = 'bimberlabinternal/RIRA', ref = 'master', dependencies = TRUE, upgrade = 'never') - devtools::install_github(repo = 'bimberlabinternal/CellMembrane', ref = 'master', dependencies = TRUE, upgrade = 'never') - devtools::install_github(repo = 'bimberlab/cellhashR', ref = 'master', dependencies = TRUE, upgrade = 'never') - remotes::install_deps(dependencies = TRUE, upgrade = "never") - # Force 4.x for Seurat - devtools::install_version('Seurat', version = '4.4.0', ask = FALSE, upgrade = 'never') + remotes::install_deps(dependencies = TRUE, upgrade = "always") remotes::install_cran("rcmdcheck") - # Due to Matrix/SeuratObject: https://github.com/mojaveazure/seurat-object/issues/166 - install.packages('SeuratObject', ask = FALSE, force = TRUE, type = 'source', repos = 'https://cloud.r-project.org') shell: Rscript {0} - name: Session info @@ -140,5 +130,5 @@ jobs: if: failure() uses: actions/upload-artifact@main with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results + name: ${{ runner.os }}-r${{ matrix.config.r }}-bioc${{ matrix.config.bioc }}-results path: check diff --git a/DESCRIPTION b/DESCRIPTION index e3ac4ba..2940ba4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,7 @@ Encoding: UTF-8 Depends: R (>= 4.3.0) Imports: - Seurat (<= 4.4.0), + Seurat, dplyr, naturalsort, Rlabkey, diff --git a/Dockerfile b/Dockerfile index 1b4d02c..cd147a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,7 @@ RUN echo "local({r <- getOption('repos') ;r['CRAN'] = 'https://packagemanager.rs wget \ git \ && python3 -m pip install --upgrade pip \ - # NOTE: seaborn added for: https://github.com/scverse/scanpy/issues/2680 - && pip3 install umap-learn phate scanpy fastcluster seaborn==0.12.2 \ + && pip3 install umap-learn phate scanpy \ && mkdir /conga \ && cd /conga \ && git clone https://github.com/phbradley/conga.git \ @@ -46,11 +45,7 @@ RUN --mount=type=secret,id=GITHUB_PAT \ && export GITHUB_PAT="$(cat /run/secrets/GITHUB_PAT)" \ && echo "GH: $GITHUB_PAT" \ && Rscript -e "BiocManager::install(ask = F, upgrade = 'always');" \ - # Force 4.x for Seurat - && Rscript -e "devtools::install_version('Seurat', version = '4.4.0', upgrade = 'never')" \ - && Rscript -e "devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade = 'never');" \ - # Due to Matrix/SeuratObject: https://github.com/mojaveazure/seurat-object/issues/166 - && Rscript -e "install.packages('SeuratObject', ask = FALSE, force = TRUE, type = 'source', repos = 'https://cloud.r-project.org')" \ + && Rscript -e "devtools::install_deps(pkg = '.', dependencies = TRUE, upgrade = 'always');" \ && R CMD build . \ && R CMD INSTALL --build *.tar.gz \ && rm -Rf /tmp/downloaded_packages/ /tmp/*.rds