Skip to content

Commit

Permalink
first big commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AstraBert committed Oct 25, 2024
1 parent 8b44ac9 commit 7251694
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 0 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CHANGELOG for `astrabert/silly-gat-kay`

### v0.0.0

Only for internal testing, not public.

Created the image from `broadinstitute/gatk` adding `bwa-mem2`, `cutadapt`, `platypus` and `picard`.

### v0.1.0

Added `curl`, `tar`, `micro`, `pigz` and `sra-toolkit`.

### v0.2.0

Only for internal testing, not public.

Added `R` conda environment.

### v0.3.0

Added new `python_deps` conda env and its dependencies

### v0.4.0

Added `cmake`.

### v0.5.0

Added `poolfstat` to the `R` conda environment.

13 changes: 13 additions & 0 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# v0.5.0

FROM astrabert/silly-gat-kay:latest

WORKDIR /gatk_modified

COPY ./shell/installations/conda_install_for_gatk /gatk_modified/conda_install_for_gatk

RUN bash /gatk_modified/conda_install_for_gatk/install_poolfstat.sh

ENTRYPOINT [ "/bin/bash" ]

# sudo docker build . -f Dockerfile -t astrabert/silly-gat-kay:latest -t astrabert/silly-gat-kay:0.5.0
41 changes: 41 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# silly-gat-kay
Repository for Docker image `astrabert/silly-gat-kay` info and changelog

## Information on the image

Variant calling and statistical analysis of population genomics data requires a certain number of tools, which can differ for functioning and version between machines and platforms. This is why we created a virtual environment managed through Docker, based on broadinstitute/gatk: you can run the image inside a container, which will produce an isolated machine on which you can carry out your analysis, without conflicts.

The image is easily accessible through;

```bash
sudo docker pull astrabert/silly-gat-kay:latest
```

You should run it in interactive mode, possibily mounting your local file system into the container if you want to access data from your real machine inside the virtual one.

```bash
sudo docker run -v /path/to/your/project:/gatk_modified/drosophila-project -it astrabert/silly-gat-kay
```

The virtual machine is based on broadinstitute/gatk and provides a fully equipped environment for the analysis, divided into three conda envs:

- **gatk_modified**: contains all GATK dependencies, but also bwa-mem2 and cutadapt
- **picard**: contains picard-slim a lighter implementation of Picard which does not require r-base to run
- **platypus**: contains platypus-variants, a SNP-calling focused conda wrapper for Platypus
- **R**: contains r-base platform for data analysis in R and the library poolfstat
- **python_deps**: contains python3.11 and various libraries like pandas, biopython, pyyaml.

To activate the conda envs and deactivate them, run:

```bash
## activate
source activate platypus
## deactivate
conda deactivate
```
Apart from these conda envs, it also contains other tools like cmake, the basic text editor micro, the multi-threading gzipper pigz and the SRA toolkit. To make SRA-toolkit CLI work, you should run:

```bash
cd /gatk_modified
export PATH=$PATH:$PWD/sratoolkit.3.1.1-ubuntu64/bin
## check if it was successful
fastq-dump -h
```
16 changes: 16 additions & 0 deletions shell/installations/conda_install_for_gatk/install_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apt-get update && apt-get install -y curl zip unzip tar pkg-config

apt update && \
apt install -y software-properties-common lsb-release && \
apt clean all

wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null

apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"

apt update
apt install -y kitware-archive-keyring
rm /etc/apt/trusted.gpg.d/kitware.gpg

apt update
apt install -y cmake
6 changes: 6 additions & 0 deletions shell/installations/conda_install_for_gatk/install_picard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eval "$(conda shell.bash hook)"

conda create -y --name picard
conda activate picard
conda install -y bioconda::picard-slim
conda deactivate
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eval "$(conda shell.bash hook)"

conda create -y --name platypus
conda activate platypus
conda install -y bioconda::platypus-variant
# platypus callVariants -h
conda deactivate
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eval "$(conda shell.bash hook)"

conda activate R
conda install -y r-poolfstat
conda deactivate
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eval "$(conda shell.bash hook)"

conda create -y --name python_deps python=3.11

source activate python_deps
conda install -y anaconda::pandas
conda install -y anaconda::pyyaml
conda install -y conda-forge::biopython
conda deactivate
6 changes: 6 additions & 0 deletions shell/installations/conda_install_for_gatk/install_rbase.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eval "$(conda shell.bash hook)"

conda create -y --name R
conda activate R
conda install -y conda-forge::r-base
conda deactivate
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wget --output-document sratoolkit.tar.gz https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/current/sratoolkit.current-ubuntu64.tar.gz
tar -vxzf sratoolkit.tar.gz
# export PATH=$PATH:$PWD/sratoolkit.3.1.1-ubuntu64/bin
# fastq-dump -h
6 changes: 6 additions & 0 deletions shell/installations/conda_install_for_gatk/installations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eval "$(conda shell.bash hook)"

conda activate gatk_modified
conda install -y bioconda::bwa-mem2
conda install -y bioconda::cutadapt
conda deactivate
16 changes: 16 additions & 0 deletions v0.1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM broadinstitute/gatk:latest

WORKDIR /gatk_modified
COPY ./shell/installations/conda_install_for_gatk /gatk_modified/conda_install_for_gatk

RUN apt-get update && apt-get install -y tar curl
RUN apt update && apt install -y micro pigz

RUN bash /gatk_modified/conda_install_for_gatk/install_sra-toolkit.sh
RUN conda create -y --name gatk_modified --clone gatk
RUN bash /gatk_modified/conda_install_for_gatk/installations.sh
RUN bash /gatk_modified/conda_install_for_gatk/install_platypus.sh
RUN bash /gatk_modified/conda_install_for_gatk/install_picard.sh

ENTRYPOINT [ "/bin/bash" ]
# sudo docker build . -f Dockerfile -t astrabert/silly-gat-kay:latest -t astrabert/silly-gat-kay:0.1.0
11 changes: 11 additions & 0 deletions v0.3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM astrabert/silly-gat-kay:latest

WORKDIR /gatk_modified

COPY ./shell/installations/conda_install_for_gatk /gatk_modified/conda_install_for_gatk

RUN bash /gatk_modified/conda_install_for_gatk/install_python_deps.sh

ENTRYPOINT [ "/bin/bash" ]

# sudo docker build . -f Dockerfile -t astrabert/silly-gat-kay:latest -t astrabert/silly-gat-kay:0.3.0
11 changes: 11 additions & 0 deletions v0.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM astrabert/silly-gat-kay:latest

WORKDIR /gatk_modified

COPY ./shell/installations/conda_install_for_gatk /gatk_modified/conda_install_for_gatk

RUN bash /gatk_modified/conda_install_for_gatk/install_cmake.sh

ENTRYPOINT [ "/bin/bash" ]

# sudo docker build . -f Dockerfile.gatk -t astrabert/silly-gat-kay:latest -t astrabert/silly-gat-kay:0.4.0
11 changes: 11 additions & 0 deletions v0.5.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM astrabert/silly-gat-kay:latest

WORKDIR /gatk_modified

COPY ./shell/installations/conda_install_for_gatk /gatk_modified/conda_install_for_gatk

RUN bash /gatk_modified/conda_install_for_gatk/install_poolfstat.sh

ENTRYPOINT [ "/bin/bash" ]

# sudo docker build . -f Dockerfile -t astrabert/silly-gat-kay:latest -t astrabert/silly-gat-kay:0.5.0

0 comments on commit 7251694

Please sign in to comment.