Skip to content

Commit

Permalink
nanopore container splits
Browse files Browse the repository at this point in the history
[x] nanopore container splits into nanopolish and medaka
[x] fixed issues with nanopolish, added numpy (1.21.0) and tensorflow (1.14.0)
[x] medaka version updated to 1.7.2
[x] --medaka-model added to medaka workflow.
[x] README updated
[ ] needs container updated on gms-Dockerhub.
  • Loading branch information
JD2112 committed Nov 8, 2023
1 parent 0c599b9 commit 359d8eb
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
nextflow
results
*.sif
work
work/
.idea/
.DS_Store
nanopore_medaka/
nanopore_nanopolish/
illumina_test/
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ nextflow run main.nf -profile singularity \
--outdir illumina_test
```
### Nanopore nanopolish pipeline

PLEASE NOTE: check the 'nextflow.config' is updated with 'gms-artic-nanopolish:latest'

```
nextflow run main.nf -profile singularity \
--nanopolish --prefix "test_nanopore_nanopolish" \
Expand All @@ -111,10 +114,14 @@ nextflow run main.nf -profile singularity \
--outdir nanopore_nanopolish
```
#### Nanopore medaka pipeline

PLEASE NOTE: check the 'nextflow.config' is updated with 'gms-artic-medaka:latest'. To use the 'medka' workflow, please provide the '--medaka-model'. [Read more here](https://github.com/nanoporetech/medaka/tree/master#models) how to get the model information.

```
nextflow run main.nf -profile singularity \
--medaka --prefix "test_nanopore_medaka" \
--basecalled_fastq .github/data/nanopore/20200311_1427_X1_FAK72834_a3787181/fastq_pass/ \
--medaka-model [email protected]:variant \
--outdir nanopore_medaka
```

Expand Down Expand Up @@ -142,6 +149,7 @@ nextflow run main.nf -profile singularity,sge \
nextflow run main.nf -profile singularity,sge \
--medaka --prefix "test_nanopore_medaka" \
--basecalled_fastq .github/data/nanopore/20200311_1427_X1_FAK72834_a3787181/fastq_pass/ \
--medaka-model [email protected]:variant \
--outdir nanopore_medaka
```
2. *for Illumina analysis*
Expand Down
4 changes: 2 additions & 2 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ params{


// Repo to download your primer scheme from
//schemeRepoURL = 'https://github.com/genomic-medicine-sweden/gms-artic.git'
schemeRepoURL = 'https://github.com/jd2112/gms-artic.git'
schemeRepoURL = 'https://github.com/genomic-medicine-sweden/gms-artic.git'
//schemeRepoURL = 'https://github.com/jd2112/gms-artic.git'

// Directory within schemeRepoURL that contains primer schemes
schemeDir = 'gms-artic'
Expand Down
4 changes: 4 additions & 0 deletions conf/nanopore.config
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ params {

// Minimum coverage depth to call aa consequences of variant.
csqDpThreshold = 20

// medaka model used by artic minion
// {pore}_{device}_{caller variant}_{caller version}
medakaModel = '[email protected]:variant'

}
18 changes: 18 additions & 0 deletions environments/medaka/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM continuumio/miniconda3:latest AS condabuild
LABEL authors="Matt Bull" \
description="Docker image containing all requirements for the ARTIC project's ncov2019 pipeline"

COPY environments/extras.yml /extras.yml
COPY environments/medaka/environment.yml /environment.yml
RUN /opt/conda/bin/conda install mamba -c conda-forge && \
/opt/conda/bin/conda update mamba -c conda-forge && \
/opt/conda/bin/mamba env create -f /environment.yml

FROM debian:buster-slim
RUN apt-get update && \
apt-get install -y git procps && \
apt-get clean -y
COPY --from=condabuild /opt/conda/envs/artic /opt/conda/envs/artic
ENV PATH=/opt/conda/envs/artic/bin:$PATH
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
35 changes: 35 additions & 0 deletions environments/medaka/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Bootstrap: docker
From: condaforge/mambaforge:latest
Stage: condabuild

%files
environments/nanopore/environment.yml /environment.yml
environments/extras.yml /extras.yml

%labels
authors="Matt Bull"
description="Docker image containing all requirements for the ARTIC project's ncov2019 pipeline"

%post
/opt/conda/bin/mamba env create -f /environment.yml #&& \
/opt/conda/bin/mamba env update -f /extras.yml -n artic

Bootstrap: docker
From: debian:buster-slim
Stage: final

%post
apt-get update && \
apt-get install -y git procps && \
apt-get clean -y

%files from condabuild
/opt/conda/envs/artic /opt/conda/envs/artic

%environment
export PATH=/opt/conda/envs/artic/bin:$PATH
export LC_ALL=C.UTF-8
export LANG=C.UTF-8

%runscript
exec "/opt/conda/envs/artic/bin/artic" "$@"
11 changes: 11 additions & 0 deletions environments/medaka/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
condaname: artic
channels:
- epi2melabs
- bioconda
- conda-forge
- defaults
dependencies:
- aplanat=0.5.4
- fastcat=0.3.6
- np-artic=1.3.0
- pomoxis=0.3.6
10 changes: 10 additions & 0 deletions environments/medaka/extras.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- biopython
- matplotlib
- pandas
- samtools
- libxcb
18 changes: 18 additions & 0 deletions environments/nanopolish/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM continuumio/miniconda3:latest AS condabuild
LABEL authors="Matt Bull" \
description="Docker image containing all requirements for the ARTIC project's ncov2019 pipeline"

COPY environments/extras.yml /extras.yml
COPY environments/nanopolish/environment.yml /environment.yml
RUN /opt/conda/bin/conda install mamba -c conda-forge && \
/opt/conda/bin/conda update mamba -c conda-forge && \
/opt/conda/bin/mamba env create -f /environment.yml

FROM debian:buster-slim
RUN apt-get update && \
apt-get install -y git procps && \
apt-get clean -y
COPY --from=condabuild /opt/conda/envs/artic /opt/conda/envs/artic
ENV PATH=/opt/conda/envs/artic/bin:$PATH
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
35 changes: 35 additions & 0 deletions environments/nanopolish/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Bootstrap: docker
From: condaforge/mambaforge:latest
Stage: condabuild

%files
environments/nanopore/environment.yml /environment.yml
environments/extras.yml /extras.yml

%labels
authors="Matt Bull"
description="Docker image containing all requirements for the ARTIC project's ncov2019 pipeline"

%post
/opt/conda/bin/mamba env create -f /environment.yml #&& \
/opt/conda/bin/mamba env update -f /extras.yml -n artic

Bootstrap: docker
From: debian:buster-slim
Stage: final

%post
apt-get update && \
apt-get install -y git procps && \
apt-get clean -y

%files from condabuild
/opt/conda/envs/artic /opt/conda/envs/artic

%environment
export PATH=/opt/conda/envs/artic/bin:$PATH
export LC_ALL=C.UTF-8
export LANG=C.UTF-8

%runscript
exec "/opt/conda/envs/artic/bin/artic" "$@"
24 changes: 24 additions & 0 deletions environments/nanopolish/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: artic
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- artic=1.1.3
- pyyaml=5.3.1
- python>=3.6
- pip=19.3.1
- gofasta=0.0.4
- usher=0.2.0
- snakemake-minimal=5.13
- minimap2=2.17
- nextclade=2.11
- fastqc=0.11.9
- rich=12.6.0
- multiqc=1.11
- numpy=<1.21.0
- tensorflow=1.14.0
- pip:
- pandas >= 1.1
- scikit-learn >= 0.23.1
- muscle=3.8
10 changes: 10 additions & 0 deletions environments/nanopolish/extras.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- biopython
- matplotlib
- pandas
- samtools
- libxcb
6 changes: 4 additions & 2 deletions modules/artic.nf
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ process articMinIONMedaka {
"""
artic minion --medaka \
${minionFinalConfig} \
--medaka-model ${params.medakaModel} \
--threads ${task.cpus} \
--scheme-directory ${schemeRepo} \
--scheme-directory ${params.schemeDir}/${params.scheme} \
--read-file ${fastq} \
${params.scheme}/${params.schemeVersion} \
--scheme-version ${params.schemeVersion} \
nCoV-2019-primer \
${sampleName}
"""
}
Expand Down
6 changes: 4 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ profiles {
container="docker://genomicmedicinesweden/gms-artic-nanopore:latest"
}
withName:articMinIONMedaka {
container="docker://genomicmedicinesweden/gms-artic-nanopore:latest"
container="docker://genomicmedicinesweden/gms-artic-medka:latest"
//container="docker://jd21/gms-artic-medaka:latest"
}
withName:articMinIONNanopolish {
container="docker://genomicmedicinesweden/gms-artic-nanopore:latest"
container="docker://genomicmedicinesweden/gms-artic-nanopolish:latest"
//container="docker://jd21/gms-artic-nanopolish:latest"
}
withName:articRemoveUnmappedReads {
container="docker://genomicmedicinesweden/gms-artic-nanopore:latest"
Expand Down

0 comments on commit 359d8eb

Please sign in to comment.