Skip to content

Commit

Permalink
Merge pull request #248 from NCI-CGR/dev/docker_test
Browse files Browse the repository at this point in the history
Dev/docker test
  • Loading branch information
jsanjak authored Jul 24, 2023
2 parents b7e236a + f32bf1c commit 86a26f5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/codespell-project/codespell
rev: v2.0.0
rev: v2.2.5
hooks:
- id: codespell
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 23.7.0
hooks:
- id: black
- repo: https://gitlab.com/PyCQA/flake8.git
rev: 3.9.2
- repo: https://github.com/PyCQA/flake8.git
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
rev: v1.4.1
hooks:
- id: mypy
- repo: https://github.com/timothycrosley/isort
rev: 5.8.0
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/snakemake/snakefmt
rev: 0.4.0
rev: v0.8.4
hooks:
- id: snakefmt
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM continuumio/miniconda3:4.11.0
RUN apt-get update

#NOTE: I don't know whether the --fix-broken is actually needed
RUN apt-get -y install gcc zip libdeflate-dev libcurl4-openssl-dev --fix-broken

WORKDIR /home

RUN mkdir GwasQcPipeline
RUN mkdir data

WORKDIR /home/GwasQcPipeline

ENV PYTHONPATH=${PYTHONPATH}:${PWD}

COPY . .

#NOTE: I don't think we need a special env inside the container
#RUN conda create -n cgr-dev python=3.8 poetry make -y
#RUN echo "conda activate cgr-dev" >> ~/.bashrc
#RUN conda init bash && conda activate cgr-dev

RUN conda install poetry make -y
RUN conda install -c conda-forge mamba
RUN poetry config virtualenvs.create false
RUN poetry install --without dev

#NOTE: Aren't these also not needed? Unless somehow the docs adds the help for the CLI...
#RUN make -C docs html
#RUN pytest -v
#RUN pre-commit install
#RUN pre-commit run


WORKDIR /home/data

ENTRYPOINT [ "cgr" ]
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ If you use this workflow in a paper, please cite the URL of this repository (htt

The documentation of this pipeline is at https://nci-cgr.github.io/GwasQcPipeline/

### Deploying with Docker
Build docker image from within GwasQcPipeline directory
```
docker build -t gwas_qc_pipe .
```

Test docker image if you have test data
```
docker run -v $(pwd):/home/data -i -t gwas_qc_pipe snakemake -k --use-conda -npr
```

Pull docker image into a singularity image file (assumes singlurity is installed)
```
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker tag gwas_qc_pipe localhost:5000/gwas_qc_pipe
docker push localhost:5000/gwas_qc_pipe
SINGULARITY_NOHTTPS=1 singularity pull cgr_gwas_qc_pipe.sif docker://localhost:5000/gwas_qc_pipe:latest
```

### LOG
- add Plink GWAS for case-controls
- add `sex_chr_included` parameter to config.yml. If `false` sex concordance check step is skipped.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ python = "^3.8"
typer = "^0.3.2"
pandas = "^1.2.4"
snakemake = "~6.15.5"
pysam = "^0.16.0"
pysam = "^0.21.0"
ryd = "^0.4.1"
pydantic = "^1.8.2"
networkx = "^2.5"
Expand Down

0 comments on commit 86a26f5

Please sign in to comment.