-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/cambiotraining/bacterial-ge…
- Loading branch information
Showing
7 changed files
with
167 additions
and
26 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
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
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,74 @@ | ||
# Use the official Ubuntu image as a base | ||
FROM ubuntu:24.04 | ||
|
||
# Set environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update and install required packages | ||
RUN apt update && \ | ||
apt install -y wget git default-jre | ||
|
||
# create user | ||
RUN useradd -ms /bin/bash participant | ||
|
||
# switch to participant | ||
USER participant | ||
WORKDIR /home/participant | ||
|
||
# Install Miniforge | ||
RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-$(uname -m).sh" && \ | ||
bash Miniforge3-Linux-$(uname -m).sh -b -p /home/participant/miniforge3 && \ | ||
rm Miniforge3-Linux-$(uname -m).sh && \ | ||
/home/participant/miniforge3/bin/mamba init | ||
|
||
ENV PATH="/home/participant/miniforge3/bin:$PATH" | ||
|
||
|
||
# Setup Conda channels and config | ||
RUN conda config --add channels defaults && \ | ||
conda config --add channels bioconda && \ | ||
conda config --add channels conda-forge && \ | ||
conda config --set remote_read_timeout_secs 1000 | ||
|
||
# Install conda packages and create environments | ||
RUN mamba install -y -n base pandas && \ | ||
mamba create -y -n bakta bakta && \ | ||
mamba create -y -n gubbins gubbins && \ | ||
mamba create -y -n iqtree iqtree snp-sites biopython && \ | ||
mamba create -y -n mlst mlst && \ | ||
mamba create -y -n nextflow nextflow && \ | ||
mamba create -y -n pairsnp pairsnp && \ | ||
mamba create -y -n panaroo python=3.9 panaroo>=1.3 snp-sites && \ | ||
mamba create -y -n poppunk python=3.10 poppunk && \ | ||
mamba create -y -n remove_blocks python=2.7 && \ | ||
/home/participant/miniforge3/envs/remove_blocks/bin/pip install git+https://github.com/sanger-pathogens/remove_blocks_from_aln.git && \ | ||
mamba create -y -n seqtk seqtk pandas && \ | ||
mamba create -y -n tb-profiler tb-profiler pandas && \ | ||
mamba create -y -n treetime treetime seqkit biopython | ||
|
||
# Setup Nextflow config | ||
RUN mkdir -p /home/participant/.nextflow && \ | ||
echo "\ | ||
conda { \ | ||
conda.enabled = true \ | ||
singularity.enabled = false \ | ||
docker.enabled = false \ | ||
useMamba = true \ | ||
createTimeout = '4 h' \ | ||
cacheDir = '/home/participant/.nextflow-conda-cache/' \ | ||
} \ | ||
singularity { \ | ||
singularity.enabled = true \ | ||
conda.enabled = false \ | ||
docker.enabled = false \ | ||
pullTimeout = '4 h' \ | ||
cacheDir = '/home/participant/.nextflow-singularity-cache/' \ | ||
} \ | ||
docker { \ | ||
docker.enabled = true \ | ||
singularity.enabled = false \ | ||
conda.enabled = false \ | ||
}" >> /home/participant/.nextflow/config | ||
|
||
# Set the default command | ||
CMD ["/bin/bash"] |
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,53 @@ | ||
#!/bin/bash | ||
|
||
# exit on error | ||
set -e | ||
|
||
# check for amrfinder_update | ||
if ! command -v "amrfinder_update" &> /dev/null; then | ||
echo "Error: amrfinder_update is not available on the PATH. You can install it with: mamba create -n bakta bakta" >&2 | ||
exit 1 | ||
fi | ||
|
||
# Download and extract course data | ||
echo "Downloading and extracting course files" | ||
wget -O bact-data.tar.gz "https://www.dropbox.com/scl/fi/osjpmst8i2919fv3by3eh/bact-data.tar.gz?rlkey=iddkexnnm6ccsx8prfcay259u&dl=1" | ||
tar -xzf bact-data.tar.gz | ||
rm bact-data.tar.gz | ||
|
||
# Download and extract public databases | ||
mkdir databases | ||
cd databases | ||
|
||
# kraken2 | ||
echo "Downloading and extracting Kraken2 database" | ||
wget https://genome-idx.s3.amazonaws.com/kraken/k2_standard_08gb_20240605.tar.gz | ||
mkdir k2_standard_08gb_20240605 | ||
tar -xzf k2_standard_08gb_20240605.tar.gz -C k2_standard_08gb_20240605 | ||
rm k2_standard_08gb_20240605.tar.gz | ||
|
||
# bakta | ||
echo "Downloading and extracting Bakta database" | ||
wget https://zenodo.org/records/10522951/files/db-light.tar.gz | ||
tar -xzf db-light.tar.gz | ||
mv db-light bakta_light_20240119 | ||
rm db-light.tar.gz | ||
|
||
# update amrfinder database | ||
amrfinder_update --force_update --database bakta_light_20240119/amrfinderplus-db/ | ||
|
||
# checkm2 | ||
echo "Downloading and extracting CheckM2 database" | ||
wget https://zenodo.org/records/5571251/files/checkm2_database.tar.gz | ||
tar -xzf checkm2_database.tar.gz | ||
mv CheckM2_database checkm2_v2_20210323 | ||
rm checkm2_database.tar.gz CONTENTS.json | ||
|
||
# poppunk | ||
echo "Downloading and extracting PopPunk database" | ||
wget https://gps-project.cog.sanger.ac.uk/GPS_v8_ref.tar.gz | ||
mkdir poppunk | ||
tar -xzf GPS_v8_ref.tar.gz -C poppunk | ||
rm GPS_v8_ref.tar.gz | ||
|
||
wget -O poppunk/GPS_v8_external_clusters.csv https://gps-project.cog.sanger.ac.uk/GPS_v8_external_clusters.csv |