Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvinite committed Jan 16, 2025
2 parents 0b31571 + 2e88459 commit 203c5ea
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Light installation doc updates
- Updated NGP config file
- Added ska2 module process (`ska_build`)
- Added ska2 to `bacterial_base.nf`
- Added emmtyper module process (`emmtyper`)
Expand All @@ -22,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Interrupted installation now hard resets E.Coli. to avoid fragmented installation
- Installation target file for streptococcus changed, to resolve interrupted installation
- Included htslib image to natively support tabix and bgzip
- Fixed a bug that prevented pipeline from correctly guessing misspelled profiles
- Fixed tbprofiler related installation rules in `Makefile`
- All modules can be called in one workflow -> profile determines whether they are actually executed using `when` statement
- Empty channels fixed
Expand All @@ -34,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Removed sudo requirement from apptainer container creation (only required for older versions of apptainer) to streamline installation
- Updated tbdb submodule
- Moved taxon related methods to methods directory
- Changed spyogenes genome from GCF_900475035.1 to GCF_000006785.2
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ ecoli_download_wgmlst_schema: $(ECOLI_WGMLST_DIR)/alleles/ecoli_INNUENDO_wgMLST/

$(ECOLI_WGMLST_DIR)/alleles/ecoli_INNUENDO_wgMLST/Escherichia_coli.trn:
$(call log_message,"Downloading E. coli wgMLST schema ...")
mkdir -p $(ECOLI_WGMLST_DIR)/alleles &> /dev/null \
rm -rf $(ECOLI_WGMLST_DIR)/alleles &> /dev/null \
&& mkdir -p $(ECOLI_WGMLST_DIR)/alleles &> /dev/null \
&& cd $(ECOLI_WGMLST_DIR)/alleles \
&& apptainer exec --bind $(MNT_ROOT) $(CONTAINER_DIR)/chewbbaca.sif \
chewie DownloadSchema \
Expand Down Expand Up @@ -725,7 +726,7 @@ $(STREP_CGMLST_DIR)/alleles/index.html:

streptococcus_unpack_cgmlst_schema: $(STREP_CGMLST_DIR)/alleles/unpacking.done

$(STREP_CGMLST_DIR)/alleles/unpacking.done: $(STREP_CGMLST_DIR)/alleles/profiles.list
$(STREP_CGMLST_DIR)/alleles/unpacking.done: $(STREP_CGMLST_DIR)/alleles/index.html
$(call log_message,"Unpacking S. pyogenes cgMLST schema ...")
cd $(STREP_CGMLST_DIR)/alleles \
&& gunzip *.gz |& tee -a $(INSTALL_LOG) \
Expand Down Expand Up @@ -802,14 +803,14 @@ mtuberculosis_bgzip_bed: $(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed.gz
$(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed.gz: $(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed
$(call log_message,"Bgzipping converged WHO + FoHM + TBDB bed file ...")
cd $(MTUBE_TBDB_DIR) \
&& bgzip $$(basename $<) -o converged_who_fohm_tbdb.bed.gz |& tee -a $(INSTALL_LOG)
&& apptainer exec --bind $(MNT_ROOT) $(CONTAINER_DIR)/htslib.sif bgzip $$(basename $<) -o converged_who_fohm_tbdb.bed.gz |& tee -a $(INSTALL_LOG)

mtuberculosis_index_bed: $(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed.gz.tbi

$(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed.gz.tbi: $(MTUBE_TBDB_DIR)/converged_who_fohm_tbdb.bed.gz
$(call log_message,"Indexing converged WHO + FoHM + TBDB bgzipped bed file ...")
cd $(MTUBE_TBDB_DIR) \
&& tabix -p bed $$(basename $<) |& tee -a $(INSTALL_LOG)
&& apptainer exec --bind $(MNT_ROOT) $(CONTAINER_DIR)/htslib.sif tabix -p bed $$(basename $<) |& tee -a $(INSTALL_LOG)

# ==============================================================================
# Perform checks
Expand Down
1 change: 1 addition & 0 deletions configs/nextflow.base.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ params {
krakenDb = "/filepath/to/kraken_db" //edit if useKraken = true
workDir = "/filepath/to/workdir" //edit
publishDir = ""
speciesDir = "" //stable default
publishDirMode = 'copy'
publishDirOverwrite = true
outdir = "/filepath/to/outdir" //edit
Expand Down
19 changes: 7 additions & 12 deletions configs/nextflow.ngp.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
params {
penv = "OpenMP"
root = "/gms-apps/pipelines/jasen" //edit
root = "/mnt/ngpbenchmark2/gms-apps/pipelines/jasen/v0.9" //edit
amrfinderDb = "${root}/assets/amrfinder_db/latest"
resfinderDb = "${root}/assets/resfinder_db"
pointfinderDb = "${root}/assets/pointfinder_db"
Expand All @@ -9,11 +9,12 @@ params {
mlstBlastDb = "${root}/assets/mlst_db/blast"
pubMlstDb = "${root}/assets/mlst_db/pubmlst"
krakenDb = "/gms-home/isasyl/code/JASEN" //edit if useKraken = true
workDir = "/gms-apps/pipelines/jasen/trash" //edit
workDir = "/mnt/ngpbenchmark2/gms-data/gmc-west/pipeline_output/jasen_workdir" //edit
publishDir = ""
speciesDir = "" //stable default
publishDirMode = 'copy'
publishDirOverwrite = true
outdir = "/gms-apps/pipelines/jasen/trash" //edit
outdir = "/mnt/ngpbenchmark2/gms-data/gmc-west/pipeline_output/jasen_output" //edit
scratch = true
containerDir = "${root}/container"
args = ""
Expand All @@ -26,19 +27,19 @@ params {
useSkesa = false // To use spades set useSkesa = false
devMode = false

cpus_small=2
cpus_small=2 // Originally 2
cpus_medium=8
cpus_large=16
cpus_huge=32
mem_small='6 GB'
mem_small='6 GB' // Originally 6gb
mem_medium='14 GB'
mem_large='30 GB'
mem_huge='120 GB'
}

apptainer {
enabled = true
runOptions = '--bind /gms-apps/pipelines/jasen/:/gms-apps/pipelines/jasen/,/gms-scratch/:/gms-scratch/'
runOptions = '--bind /mnt/ngpbenchmark2/gms-apps/pipelines/jasen/v0.9/:/mnt/ngpbenchmark2/gms-apps/pipelines/jasen/v0.9/'
cacheDir = "${params.containerDir}/"

env.NXF_APPTAINER_LOCALCACHEDIR="${params.workDir}"
Expand Down Expand Up @@ -284,12 +285,6 @@ process {
container = "${params.containerDir}/samtools.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/${params.bamDir}", mode: 'copy', overwrite: true ]
}
withName: samtools_sort_ref {
cpus = params.cpus_large
memory = params.mem_small
container = "${params.containerDir}/samtools.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/${params.bamDir}", mode: 'copy', overwrite: true ]
}
withName: save_analysis_metadata {
container = "${params.containerDir}/bonsai-prp.sif"
publishDir = [ path: "${params.outdir}/${params.speciesDir}/analysis_metadata", mode: 'copy', overwrite: true ]
Expand Down
6 changes: 4 additions & 2 deletions container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ URL_chewbbaca := https://depot.galaxyproject.org/singularity/chewbbaca:3.3.2--py
URL_emmtyper := https://depot.galaxyproject.org/singularity/emmtyper:0.2.0--py_0
URL_flye := https://depot.galaxyproject.org/singularity/flye:2.9.3--py39hd65a603_0
URL_freebayes := https://depot.galaxyproject.org/singularity/freebayes:1.3.6--hbfe0e7f_2
URL_htslib := https://depot.galaxyproject.org/singularity/htslib:1.21--h566b1c6_1
URL_kraken2 := https://depot.galaxyproject.org/singularity/kraken2:2.1.2--pl5321h9f5acd7_3
URL_medaka := https://depot.galaxyproject.org/singularity/medaka:1.11.3--py39h05d5c5e_0
URL_mlst := https://depot.galaxyproject.org/singularity/mlst:2.23.0--hdfd78af_1
Expand Down Expand Up @@ -101,8 +102,9 @@ $(remote_containers):
$(call log_message,"Downloading remote container $@ ...")
$(eval tool := $(basename $@))
$(eval container_url := ${URL_${tool}})
output_file=$$(echo ${container_url} | sed -e 's#https://##' -e 's#/#-#g' -e 's#:#-#g').img \
&& wget -O $${output_file} ${container_url} --no-check-certificate \
$(eval sanitized_url := $(shell echo ${container_url} | sed -e 's/%3A/:/g'))
output_file=$$(echo ${sanitized_url} | sed -e 's#https://##' -e 's#/#-#g' -e 's#:#-#g').img \
&& wget -O $${output_file} ${sanitized_url} --no-check-certificate \
&& ln -sf $${output_file} $@


Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
### Copy code locally

```bash
git clone --recurse-submodules --single-branch --branch master \\
git clone --recurse-submodules --branch master \\
https://github.com/genomic-medicine-sweden/jasen.git && \\
cd jasen
```
Expand Down

0 comments on commit 203c5ea

Please sign in to comment.