From a35cfb4473afbe30b61510e77b20519fb91b513e Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Thu, 4 Nov 2021 12:39:10 +0000 Subject: [PATCH 1/4] Update and pin base-cpu --- environments/base-cpu.yaml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/environments/base-cpu.yaml b/environments/base-cpu.yaml index 6a37ab3..8473c33 100644 --- a/environments/base-cpu.yaml +++ b/environments/base-cpu.yaml @@ -4,24 +4,18 @@ channels: dependencies: - snakemake-minimal =5.8.1 - python =3.6 - - networkx =2.1 - - matplotlib =2.2.3 - - bcftools =1.9 - - samtools =1.9 - - pysam =0.15.0 - - pyvcf - - pandas - - biopython - - minimap2 - - racon - - seqtk - - kraken2 - - seqkit - - datamash - - medaka + - bcftools =1.13 + - samtools =1.13 + - pysam =0.17.0 + - pyvcf =0.6.8 + - minimap2 =2.22 + - racon =1.4.20 + - seqtk =1.3 + - kraken2 =2.1.2 + - pip - pip: - git+https://github.com/SamStudio8/bondage.git - git+https://github.com/SamStudio8/dehumanizer.git - git+https://github.com/SamStudio8/ktkit.git - slackclient==1.3.1 - - GPUtil + - GPUtil==1.4.0 From 843003e5b5b2e2525444f5984a026d3af6020f87 Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Thu, 4 Nov 2021 15:14:17 +0000 Subject: [PATCH 2/4] (Re)add missing pandas dep --- environments/base-cpu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/base-cpu.yaml b/environments/base-cpu.yaml index 8473c33..3b8b111 100644 --- a/environments/base-cpu.yaml +++ b/environments/base-cpu.yaml @@ -4,6 +4,7 @@ channels: dependencies: - snakemake-minimal =5.8.1 - python =3.6 + - pandas =1.1.5 - bcftools =1.13 - samtools =1.13 - pysam =0.17.0 From adda0d3c9bbd6c2f18d5a658879b7b603b5f2aaa Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Thu, 4 Nov 2021 17:15:47 +0000 Subject: [PATCH 3/4] Abstract medaka env to ease building base env --- README.md | 6 +++++- Snakefile-base | 2 ++ environments/medaka.yaml | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 environments/medaka.yaml diff --git a/README.md b/README.md index bffc117..032e585 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Replace the YAML keys as appropriate. Keys are: | `slack_token` | str, optional | if you want to be bombarded with slack messages regarding the success and failure of your snakes, insert a suitable bot API token here | | `slack_channel` | str, optional | if using a `slack_token`, enter the name of the channel to send messages, including the leading `#` | | `cuda` | boolean | set to `False` if you do not want GPU-acceleration and `True` if you have the means to go very fast (*i.e.* you have a CUDA-compatible GPU) | -| `medaka_env` | URI | path to a singularity image (simg) or sandbox container to run medaka (CPU or GPU) | +| `medaka_env` | URI | path to a singularity image (simg) or sandbox container to run medaka (GPU only as conda env will interfere with simg on CPU mode) | | `racon_batches`| int | number of simultaneous batches to process on GPU | | `polish_threads` | int | number of CPU threads to use for any polishing step | | `polish_gpu` | int | number of GPU devices to use for any on-GPU polishing step | @@ -169,6 +169,10 @@ For a full invocation example: snakemake -j --reason --use-conda --use-singularity --singularity-args '--nv -B :' -k --restart-times 1 --resources gpu=N ``` +## Notes + +* Reticulatus is currently pinned to `medaka v0.11.5` (a fine vintage) + ## Housekeeping Unless otherwise stated by a suitable header, the files within this repository are made available under the MIT license. If you use this pipeline, an acknowledgement in your work would be nice... Don't forget to [cite Snakemake](https://snakemake.readthedocs.io/en/stable/project_info/citations.html). diff --git a/Snakefile-base b/Snakefile-base index 3a3fb26..1a9e515 100644 --- a/Snakefile-base +++ b/Snakefile-base @@ -424,6 +424,7 @@ rule polish_racon: rule prepolish_medaka_override_calls2draft: singularity: config["medaka_env"], + conda: "environments/medaka.yaml" if not config["cuda"] else None input: contigs=input_polish, reads=polish_reads_input, @@ -462,6 +463,7 @@ rule prepolish_medaka_override_calls2draft_subsample_depth0: rule polish_medaka: singularity: config["medaka_env"], + conda: "environments/medaka.yaml" if not config["cuda"] else None input: contigs=input_polish, reads=polish_reads_input, diff --git a/environments/medaka.yaml b/environments/medaka.yaml new file mode 100644 index 0000000..673221f --- /dev/null +++ b/environments/medaka.yaml @@ -0,0 +1,6 @@ +channels: + - bioconda + - conda-forge +dependencies: + - medaka =0.11.5 + From 00779fb47badac99b8870b7f1379b5ceef1cef1b Mon Sep 17 00:00:00 2001 From: Sam Nicholls Date: Thu, 4 Nov 2021 18:39:15 +0000 Subject: [PATCH 4/4] Add seqkit back to base for subsetting --- environments/base-cpu.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/base-cpu.yaml b/environments/base-cpu.yaml index 3b8b111..4587548 100644 --- a/environments/base-cpu.yaml +++ b/environments/base-cpu.yaml @@ -11,7 +11,7 @@ dependencies: - pyvcf =0.6.8 - minimap2 =2.22 - racon =1.4.20 - - seqtk =1.3 + - seqkit =2.0.0 - kraken2 =2.1.2 - pip - pip: