forked from AlexsLemonade/OpenScPCA-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jaclyn-taroni/jaclyn-taroni/wilms-06-build…
…-test Build and test Docker image using `bioconductor/bioconductor_docker:3.19` and `renv`
- Loading branch information
Showing
14 changed files
with
2,150 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This is a workflow to build the docker image for the cell-type-wilms-tumor-06 module | ||
# | ||
# Docker modules are run on pull requests when code for files that affect the Docker image have changed. | ||
# If other files are used during the Docker build, they should be added to `paths` | ||
# | ||
# At module initialization, this workflow is inactive, and needs to be activated manually | ||
|
||
name: Build docker image for cell-type-wilms-tumor-06 | ||
|
||
concurrency: | ||
# only one run per branch at a time | ||
group: "docker_cell-type-wilms-tumor-06_${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "analyses/cell-type-wilms-tumor-06/Dockerfile" | ||
- "analyses/cell-type-wilms-tumor-06/.dockerignore" | ||
- "analyses/cell-type-wilms-tumor-06/renv.lock" | ||
- "analyses/cell-type-wilms-tumor-06/conda-lock.yml" | ||
workflow_dispatch: | ||
inputs: | ||
push-ecr: | ||
description: "Push to AWS ECR" | ||
type: boolean | ||
required: true | ||
|
||
jobs: | ||
test-build: | ||
name: Test Build Docker Image | ||
if: github.event_name == 'pull_request' || (contains(github.event_name, 'workflow_') && !inputs.push-ecr) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: "{{defaultContext}}:analyses/cell-type-wilms-tumor-06" | ||
push: false | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
build-push: | ||
name: Build and Push Docker Image | ||
if: github.repository_owner == 'AlexsLemonade' && (github.event_name == 'push' || inputs.push-ecr) | ||
uses: ./.github/workflows/build-push-docker-module.yml | ||
with: | ||
module: "cell-type-wilms-tumor-06" | ||
push-ecr: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This is a workflow to run the cell-type-wilms-tumor-06 module | ||
# | ||
# Analysis modules are run based on three triggers: | ||
# - Manual trigger | ||
# - On pull requests where code in the module has changed | ||
# - As a reusable workflow called from a separate workflow which periodically runs all modules | ||
# | ||
# At initialization, only the manual trigger is active | ||
|
||
name: Run cell-type-wilms-tumor-06 analysis module | ||
env: | ||
MODULE_PATH: analyses/cell-type-wilms-tumor-06 | ||
AWS_DEFAULT_REGION: us-east-2 | ||
|
||
concurrency: | ||
# only one run per branch at a time | ||
group: "run_cell-type-wilms-tumor-06_${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
workflow_dispatch: | ||
# workflow_call: | ||
# pull_request: | ||
# branches: | ||
# - main | ||
# paths: | ||
# - "analyses/cell-type-wilms-tumor-06/**" | ||
|
||
jobs: | ||
run-module: | ||
if: github.repository_owner == 'AlexsLemonade' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: 4.4.0 | ||
use-public-rspm: true | ||
|
||
- name: Set up pandoc | ||
uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Set up renv | ||
uses: r-lib/actions/setup-renv@v2 | ||
with: | ||
working-directory: ${{ env.MODULE_PATH }} | ||
|
||
# Update this step as needed to download the desired data | ||
- name: Download test data | ||
run: ./download-data.py --test-data --format SCE | ||
|
||
- name: Run analysis module | ||
run: | | ||
cd ${MODULE_PATH} | ||
# run module script(s) here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Don't activate renv in an OpenScPCA docker image | ||
if(Sys.getenv('OPENSCPCA_DOCKER') != 'TRUE'){ | ||
source('renv/activate.R') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
# pull base image | ||
FROM bioconductor/tidyverse:3.19 | ||
# Pull base image | ||
# This image has RStudio Server on it | ||
FROM bioconductor/bioconductor_docker:3.19 | ||
|
||
# Set global R options | ||
RUN echo "options(repos = 'https://cloud.r-project.org')" > $(R --no-echo --no-save -e "cat(Sys.getenv('R_HOME'))")/etc/Rprofile.site | ||
ENV RETICULATE_MINICONDA_ENABLED=FALSE | ||
# Labels following the Open Containers Initiative (OCI) recommendations | ||
# For more information, see https://specs.opencontainers.org/image-spec/annotations/?v=v1.0.1 | ||
LABEL org.opencontainers.image.title="openscpca/cell-type-wilms-tumor-06" | ||
LABEL org.opencontainers.image.description="Docker image for the OpenScPCA analysis module 'cell-type-wilms-tumor-06'" | ||
LABEL org.opencontainers.image.authors="OpenScPCA [email protected]" | ||
LABEL org.opencontainers.image.source="https://github.com/AlexsLemonade/OpenScPCA-analysis/tree/main/analyses/cell-type-wilms-tumor-06" | ||
|
||
RUN R --no-echo --no-restore --no-save -e "install.packages('remotes')" | ||
# Set an environment variable to allow checking if we are in an OpenScPCA container | ||
ENV OPENSCPCA_DOCKER=TRUE | ||
|
||
RUN R -e "devtools::install_github('enblacar/SCpubr')" | ||
RUN R -e "remotes::install_github('satijalab/seurat', 'seurat5', quiet = TRUE)" # this also install patchwork (and others) | ||
RUN R -e "remotes::install_github('satijalab/azimuth', quiet = TRUE)" # this also install SingleCellExperiment, DT (and others) | ||
RUN R -e "remotes::install_github('cancerbits/DElegate')" | ||
RUN R -e "install.packages('viridis')" | ||
RUN R -e "install.packages('ggplotify')" | ||
RUN R -e "BiocManager::install('edgeR')" | ||
# Disable the renv cache to install packages directly into the R library | ||
ENV RENV_CONFIG_CACHE_ENABLED=FALSE | ||
|
||
# make sure all R related binaries are in PATH in case we want to call them directly | ||
ENV PATH ${R_HOME}/bin:$PATH | ||
# Install renv | ||
RUN R --no-echo --no-restore --no-save -e "install.packages('renv')" | ||
|
||
# Copy the renv.lock file from the host environment to the image | ||
COPY renv.lock renv.lock | ||
|
||
# restore from renv.lock file and clean up to reduce image size | ||
RUN Rscript -e 'renv::restore()' && \ | ||
rm -rf ~/.cache/R/renv && \ | ||
rm -rf /tmp/downloaded_packages && \ | ||
rm -rf /tmp/Rtmp* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Tidyverse | ||
library(tidyverse) | ||
|
||
# Single-cell packages | ||
library(Seurat) # remotes::install_github("satijalab/[email protected]") | ||
library(presto) # remotes::install_github("immunogenomics/presto") | ||
library(Azimuth) # remotes::install_github("satijalab/azimuth") | ||
library(SCpubr) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.