From 377c778170ba37cf579e83fcaa93a5188724c491 Mon Sep 17 00:00:00 2001 From: Shivani Guturu Date: Tue, 28 Oct 2025 09:17:00 -0400 Subject: [PATCH 1/4] singularity config --- modules/local/COPY_NUMBER/main.nf | 4 --- modules/local/FIND_FACETS_FIT/main.nf | 4 --- modules/local/GENERATE_MAF/main.nf | 4 --- modules/local/MSI/main.nf | 4 --- .../SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf | 4 --- .../local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf | 4 --- modules/local/STRUCTURAL_VARIANTS/main.nf | 4 --- nextflow.config | 25 ++++++++++++++++--- 8 files changed, 22 insertions(+), 31 deletions(-) diff --git a/modules/local/COPY_NUMBER/main.nf b/modules/local/COPY_NUMBER/main.nf index 4dfb4fc..7201f67 100644 --- a/modules/local/COPY_NUMBER/main.nf +++ b/modules/local/COPY_NUMBER/main.nf @@ -2,10 +2,6 @@ process COPY_NUMBER { tag "$patient_id" label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" - input: tuple path(patient_json), val(patient_id) val research_access_cna_template diff --git a/modules/local/FIND_FACETS_FIT/main.nf b/modules/local/FIND_FACETS_FIT/main.nf index c41688e..9ff7b33 100644 --- a/modules/local/FIND_FACETS_FIT/main.nf +++ b/modules/local/FIND_FACETS_FIT/main.nf @@ -2,10 +2,6 @@ process FIND_FACETS_FIT { tag "$patient_id" label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/genotype_variants:0.3.9': - 'ghcr.io/msk-access/genotype_variants:0.3.9' }" - input: val facets_dir tuple path(patient_json), val(patient_id) diff --git a/modules/local/GENERATE_MAF/main.nf b/modules/local/GENERATE_MAF/main.nf index 1471d0a..ae32a32 100644 --- a/modules/local/GENERATE_MAF/main.nf +++ b/modules/local/GENERATE_MAF/main.nf @@ -1,10 +1,6 @@ process GENERATE_MAF { label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" - input: path patient_json val research_access_mutations_maf_template diff --git a/modules/local/MSI/main.nf b/modules/local/MSI/main.nf index f468e86..52e45c0 100644 --- a/modules/local/MSI/main.nf +++ b/modules/local/MSI/main.nf @@ -2,10 +2,6 @@ process MSI { tag "$patient_id" label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" - input: tuple path(patient_json), val(patient_id) val reseach_access_msi_template diff --git a/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf b/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf index f58404e..3dbe384 100644 --- a/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf +++ b/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf @@ -2,10 +2,6 @@ process SNV_INDEL_CREATE_GENOTYPE_INPUT { tag "$patient_id" label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" - input: tuple path(patient_json), val(patient_id), path(all_calls_maf) val research_access_duplex_bam_template diff --git a/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf b/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf index fe2ba72..7757bdf 100644 --- a/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf +++ b/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf @@ -4,10 +4,6 @@ process SNV_INDEL_GENOTYPE_VARIANTS { conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/genotype_variants:0.3.9': - 'ghcr.io/msk-access/genotype_variants:0.3.9' }" - input: tuple path(patient_json), val(patient_id), val(genotyping_input) val fasta_ref diff --git a/modules/local/STRUCTURAL_VARIANTS/main.nf b/modules/local/STRUCTURAL_VARIANTS/main.nf index 0a2e3e5..fbbafe6 100644 --- a/modules/local/STRUCTURAL_VARIANTS/main.nf +++ b/modules/local/STRUCTURAL_VARIANTS/main.nf @@ -2,10 +2,6 @@ process STRUCTURAL_VARIANTS { tag "$patient_id" label 'process_single' - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.25.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.25.1--pyhdfd78af_0' }" - input: tuple path(patient_json), val(patient_id) val research_access_sv_template diff --git a/nextflow.config b/nextflow.config index f9503cd..ba8faac 100644 --- a/nextflow.config +++ b/nextflow.config @@ -117,27 +117,46 @@ profiles { apptainer.enabled = false } docker { - docker.enabled = true + docker.enabled = false conda.enabled = false - singularity.enabled = false + singularity.enabled = true podman.enabled = false shifter.enabled = false charliecloud.enabled = false apptainer.enabled = false docker.runOptions = '-u $(id -u):$(id -g)' + process { + container = '/singularity_cache/jupyter-scipy-notebook-python-3.9.sif' + withLabel: 'genotype_variants' { + container = './singularity_cache/genotype_variants-0.3.10.sif' + } + withLabel: 'biometrics' { + container = './singularity_cache/biometrics-0.2.16.sif' + } + } } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { singularity.enabled = true - singularity.autoMounts = true + singularity.autoMounts = false + singularity.runOptions = '--bind /juno:/juno,/scratch:/scratch -u $(id -u):$(id -g) --disable-overlay --debug' conda.enabled = false docker.enabled = false podman.enabled = false shifter.enabled = false charliecloud.enabled = false apptainer.enabled = false + process { + container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/jupyter-scipy-notebook-python-3.9.sif' + withLabel: 'genotype_variants' { + container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/genotype_variants-0.3.10.sif' + } + withLabel: 'biometrics' { + container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/biometrics-0.2.16.sif' + } + } } podman { podman.enabled = true From eeecf94098ff0188a199f407ed66dc510d07d6af Mon Sep 17 00:00:00 2001 From: Shivani Guturu Date: Thu, 30 Oct 2025 11:45:06 -0400 Subject: [PATCH 2/4] testing msk containers --- .../BIOMETRICS/biometrics_create_input.nf | 6 ++ .../local/BIOMETRICS/biometrics_extract.nf | 3 + .../local/BIOMETRICS/biometrics_genotype.nf | 4 ++ .../BIOMETRICS/biometrics_sexmismatch.nf | 4 ++ .../local/BIOMETRICS/biometrics_summary.nf | 5 ++ modules/local/COPY_NUMBER/main.nf | 5 ++ modules/local/FIND_FACETS_FIT/main.nf | 5 ++ modules/local/GENERATE_MAF/main.nf | 5 ++ modules/local/GENOTYPE_VARIANTS/main.nf | 67 +++++++++++++++++++ modules/local/INFER_SAMPLES/main.nf | 6 ++ modules/local/MSI/main.nf | 5 ++ .../SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf | 7 +- modules/local/SNV_INDEL_FILTER_CALLS/main.nf | 20 ++++++ .../SNV_INDEL_GENERATE_UNION_MAF/main.nf | 5 ++ .../local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf | 9 ++- modules/local/STRUCTURAL_VARIANTS/main.nf | 5 ++ nextflow.config | 10 +-- 17 files changed, 163 insertions(+), 8 deletions(-) create mode 100644 modules/local/GENOTYPE_VARIANTS/main.nf diff --git a/modules/local/BIOMETRICS/biometrics_create_input.nf b/modules/local/BIOMETRICS/biometrics_create_input.nf index 37ece13..67512a0 100644 --- a/modules/local/BIOMETRICS/biometrics_create_input.nf +++ b/modules/local/BIOMETRICS/biometrics_create_input.nf @@ -1,6 +1,12 @@ process BIOMETRICS_CREATE_INPUT { tag "$patient_id" label 'process_single' + errorStrategy 'terminate' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/biometrics:0.2.16': + 'ghcr.io/msk-access/biometrics:0.2.16' }" input: tuple path(patient_json), val(patient_id) diff --git a/modules/local/BIOMETRICS/biometrics_extract.nf b/modules/local/BIOMETRICS/biometrics_extract.nf index a92335c..b43d5a7 100644 --- a/modules/local/BIOMETRICS/biometrics_extract.nf +++ b/modules/local/BIOMETRICS/biometrics_extract.nf @@ -3,6 +3,9 @@ process BIOMETRICS_EXTRACT { label 'biometrics_extract' conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/biometrics:0.2.16': + 'ghcr.io/msk-access/biometrics:0.2.16' }" input: tuple val(patient_id), path(biometrics_input) diff --git a/modules/local/BIOMETRICS/biometrics_genotype.nf b/modules/local/BIOMETRICS/biometrics_genotype.nf index e28ecd0..25728ac 100644 --- a/modules/local/BIOMETRICS/biometrics_genotype.nf +++ b/modules/local/BIOMETRICS/biometrics_genotype.nf @@ -1,7 +1,11 @@ process BIOMETRICS_GENOTYPE { tag "$patient_id" label 'biometrics_genotype' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/biometrics:0.2.16': + 'ghcr.io/msk-access/biometrics:0.2.16' }" input: tuple val(patient_id), path(biometrics_input), path(biometrics_extract_db) diff --git a/modules/local/BIOMETRICS/biometrics_sexmismatch.nf b/modules/local/BIOMETRICS/biometrics_sexmismatch.nf index 41c11ff..aca48e6 100644 --- a/modules/local/BIOMETRICS/biometrics_sexmismatch.nf +++ b/modules/local/BIOMETRICS/biometrics_sexmismatch.nf @@ -1,7 +1,11 @@ process BIOMETRICS_SEXMISMATCH { tag "$patient_id" label 'biometrics_genotype' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/biometrics:0.2.16': + 'ghcr.io/msk-access/biometrics:0.2.16' }" input: tuple val(patient_id), path(biometrics_input), path(biometrics_extract_db) diff --git a/modules/local/BIOMETRICS/biometrics_summary.nf b/modules/local/BIOMETRICS/biometrics_summary.nf index 2dd1808..ed79eaf 100644 --- a/modules/local/BIOMETRICS/biometrics_summary.nf +++ b/modules/local/BIOMETRICS/biometrics_summary.nf @@ -2,6 +2,11 @@ process BIOMETRICS_SUMMARY { tag "$patient_id" label 'biometrics_summary' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/biometrics:0.2.16': + 'ghcr.io/msk-access/biometrics:0.2.16' }" + input: tuple val(patient_id), path(biometrics_genotype_csv), path(biometrics_sexmismatch_csv) diff --git a/modules/local/COPY_NUMBER/main.nf b/modules/local/COPY_NUMBER/main.nf index 7201f67..e792b3d 100644 --- a/modules/local/COPY_NUMBER/main.nf +++ b/modules/local/COPY_NUMBER/main.nf @@ -2,6 +2,11 @@ process COPY_NUMBER { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id) val research_access_cna_template diff --git a/modules/local/FIND_FACETS_FIT/main.nf b/modules/local/FIND_FACETS_FIT/main.nf index 9ff7b33..af32604 100644 --- a/modules/local/FIND_FACETS_FIT/main.nf +++ b/modules/local/FIND_FACETS_FIT/main.nf @@ -2,6 +2,11 @@ process FIND_FACETS_FIT { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: val facets_dir tuple path(patient_json), val(patient_id) diff --git a/modules/local/GENERATE_MAF/main.nf b/modules/local/GENERATE_MAF/main.nf index ae32a32..0c05871 100644 --- a/modules/local/GENERATE_MAF/main.nf +++ b/modules/local/GENERATE_MAF/main.nf @@ -1,6 +1,11 @@ process GENERATE_MAF { label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: path patient_json val research_access_mutations_maf_template diff --git a/modules/local/GENOTYPE_VARIANTS/main.nf b/modules/local/GENOTYPE_VARIANTS/main.nf new file mode 100644 index 0000000..252afd7 --- /dev/null +++ b/modules/local/GENOTYPE_VARIANTS/main.nf @@ -0,0 +1,67 @@ +process GENOTYPEVARIANTS_ALL { + tag "$meta.id" + label 'process_medium' + errorStrategy 'terminate' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/genotype_variants:0.3.9': + 'ghcr.io/msk-access/genotype_variants:0.3.9' }" + + input: + // [[patient:null, id:'sample'], standard.bam, standard.bam.bai, [], [], [], []] + // or + // [[patient:null, id:'sample'], [], [], duplex.bam, duplex.bam.bai, simplex.bam, simplex.bam.bai] + tuple val(meta), path(bam_standard), path(bai_standard), path(bam_duplex), path(bai_duplex), path(bam_simplex), path(bai_simplex), path(maf) + path(fasta) + path(fai) + + output: + tuple val(meta), path("*.maf"), emit: maf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def sample = task.ext.prefix != null ? "-si ${task.ext.prefix}" : (meta.id != null ? "-si ${meta.id}" : "") + def patient = meta.patient ?"-p ${meta.patient}": '' + def bams_standard = bam_standard ?"-b $bam_standard" : '' + def bam_liquid = (bam_duplex && bam_simplex) ? "-d $bam_duplex -s $bam_simplex" : '' + + """ + genotype_variants small_variants all \\ + -i ${maf} \\ + -r ${fasta} \\ + -g /usr/local/bin/GetBaseCountsMultiSample \\ + $patient \\ + $bams_standard \\ + $bam_liquid \\ + $sample \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + genotypevariants: \$(genotype_variants --version) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def sample = "${meta.sample}" + def patient = "${meta.patient}" + + """ + touch ${prefix}-DUPLEX_genotyped.maf + touch ${prefix}-ORG-SIMPLEX-DUPLEX_genotyped.maf + touch ${prefix}-SIMPLEX-DUPLEX_genotyped.maf + touch ${prefix}-SIMPLEX_genotyped.maf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + genotypevariants: \$(genotype_variants --version) + END_VERSIONS + """ +} \ No newline at end of file diff --git a/modules/local/INFER_SAMPLES/main.nf b/modules/local/INFER_SAMPLES/main.nf index e31af7e..47727d7 100644 --- a/modules/local/INFER_SAMPLES/main.nf +++ b/modules/local/INFER_SAMPLES/main.nf @@ -1,5 +1,11 @@ process INFER_SAMPLES { label 'process_single' + errorStrategy 'terminate' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" input: path id_mapping_file diff --git a/modules/local/MSI/main.nf b/modules/local/MSI/main.nf index 52e45c0..e2f0708 100644 --- a/modules/local/MSI/main.nf +++ b/modules/local/MSI/main.nf @@ -2,6 +2,11 @@ process MSI { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id) val reseach_access_msi_template diff --git a/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf b/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf index 3dbe384..1b93a6a 100644 --- a/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf +++ b/modules/local/SNV_INDEL_CREATE_GENOTYPE_INPUT/main.nf @@ -2,6 +2,11 @@ process SNV_INDEL_CREATE_GENOTYPE_INPUT { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id), path(all_calls_maf) val research_access_duplex_bam_template @@ -12,7 +17,7 @@ process SNV_INDEL_CREATE_GENOTYPE_INPUT { val clinical_access_unfilter_bam_template val clinical_impact_standard_bam_template -// publishDir "${params.outdir}/intermediate/small_variants/${patient_id}", mode: 'copy', pattern: '*genotyping_input.tsv' + publishDir "${params.outdir}/intermediate/small_variants/${patient_id}", mode: 'copy', pattern: '*genotyping_input.tsv' output: tuple path(patient_json), val(patient_id), path("*genotyping_input.tsv"), emit: genotyping_input diff --git a/modules/local/SNV_INDEL_FILTER_CALLS/main.nf b/modules/local/SNV_INDEL_FILTER_CALLS/main.nf index 908c739..e51dad3 100644 --- a/modules/local/SNV_INDEL_FILTER_CALLS/main.nf +++ b/modules/local/SNV_INDEL_FILTER_CALLS/main.nf @@ -10,6 +10,11 @@ process SNV_INDEL_AGGREGATE_ALLELE_COUNTS { label 'process_single' tag "${patient_id}" + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id), path(genotyping_output), path(all_small_calls_maf) val access_min_cov @@ -46,6 +51,11 @@ process SNV_INDEL_ANNOTATE_HOTSPOT_CH { label 'process_single' tag "${patient_id}" + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple val(patient_id), path(snv_indel_csv) val hotspot_list @@ -83,6 +93,11 @@ process SNV_INDEL_ADD_FILTER_COL { label 'process_single' tag "${patient_id}" + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple val(patient_id), path(snv_indel_csv) val exclude_genes @@ -131,6 +146,11 @@ process SNV_INDEL_ADD_FACETS_ADJUSTED_VAF { label 'process_single' tag "${patient_id}" + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple val(patient_id), val(sex), path(facets_fit), path(snv_indel_csv) diff --git a/modules/local/SNV_INDEL_GENERATE_UNION_MAF/main.nf b/modules/local/SNV_INDEL_GENERATE_UNION_MAF/main.nf index 59127bc..3d9ffe3 100644 --- a/modules/local/SNV_INDEL_GENERATE_UNION_MAF/main.nf +++ b/modules/local/SNV_INDEL_GENERATE_UNION_MAF/main.nf @@ -2,6 +2,11 @@ process SNV_INDEL_GENERATE_UNION_MAF { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id) val research_access_mutations_maf_template diff --git a/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf b/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf index 7757bdf..fe62e14 100644 --- a/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf +++ b/modules/local/SNV_INDEL_GENOTYPE_VARIANTS/main.nf @@ -1,14 +1,19 @@ process SNV_INDEL_GENOTYPE_VARIANTS { tag "$patient_id" label 'genotype_variants' + errorStrategy 'terminate' conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/genotype_variants:sha-f0411c85': + 'ghcr.io/msk-access/genotype_variants:sha-f0411c85' }" + input: tuple path(patient_json), val(patient_id), val(genotyping_input) val fasta_ref -// publishDir "${params.outdir}/intermediate/small_variants/${patient_id}/genotyped_mafs", mode: 'copy', pattern: '*.maf' + publishDir "${params.outdir}/intermediate/small_variants/${patient_id}/genotyped_mafs", mode: 'copy', pattern: '*.maf' output: tuple path(patient_json), val(patient_id), path("*.maf"), emit: genotyped_mafs @@ -25,7 +30,7 @@ process SNV_INDEL_GENOTYPE_VARIANTS { -i ${genotyping_input} \\ -r ${fasta_ref} \\ --filter-duplicate 1 \\ - -g /work/access/production/resources/tools/GetBaseCountsMultiSample/current/GetBaseCountsMultiSample \\ + -g /juno/work/access/production/resources/tools/GetBaseCountsMultiSample/current/GetBaseCountsMultiSample \\ -t ${task.cpus} \\ """ diff --git a/modules/local/STRUCTURAL_VARIANTS/main.nf b/modules/local/STRUCTURAL_VARIANTS/main.nf index fbbafe6..fa13282 100644 --- a/modules/local/STRUCTURAL_VARIANTS/main.nf +++ b/modules/local/STRUCTURAL_VARIANTS/main.nf @@ -2,6 +2,11 @@ process STRUCTURAL_VARIANTS { tag "$patient_id" label 'process_single' + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" + input: tuple path(patient_json), val(patient_id) val research_access_sv_template diff --git a/nextflow.config b/nextflow.config index ba8faac..71a17fe 100644 --- a/nextflow.config +++ b/nextflow.config @@ -10,14 +10,14 @@ // Global default params, used in configs params { - input = "/juno/cmo/bergerlab/guturus1/testing_cohort/nf_inputs/v2/nf_v2_patients.csv" - keep_research_samples_file = "/juno/cmo/bergerlab/guturus1/testing_cohort/nf_inputs/v2/nf_v2_samples.csv" + input = "/juno/cmo/bergerlab/guturus1/testing_cohort/nf_inputs/v1/nf_v1_singularity.csv" + keep_research_samples_file = "/juno/cmo/bergerlab/guturus1/testing_cohort/nf_inputs/v1/nf_v1_singularity_samples.csv" // input = "/juno/cmo/bergerlab/arorak/repositories/clean_copy/access_data_analysis_nf/assets/test_accessv2_input.csv" // keep_research_samples_file = "/juno/cmo/bergerlab/arorak/repositories/clean_copy/access_data_analysis_nf/assets/test_accessv2_include.csv" exclude_samples_file = null // Output dir - outdir = "./results_accessv2/biometrics_only/" + outdir = "/juno/cmo/bergerlab/guturus1/testing_cohort/nf_outputs/v1/singularity" variant_filter_rules = [ exclude_genes : "RP11-", @@ -140,8 +140,8 @@ profiles { } singularity { singularity.enabled = true - singularity.autoMounts = false - singularity.runOptions = '--bind /juno:/juno,/scratch:/scratch -u $(id -u):$(id -g) --disable-overlay --debug' + singularity.autoMounts = true + singularity.runOptions = '--bind /juno/:/juno/' conda.enabled = false docker.enabled = false podman.enabled = false From ef0398d809847bde1d9ddf92d90a63c9138da117 Mon Sep 17 00:00:00 2001 From: Shivani Guturu Date: Thu, 30 Oct 2025 12:16:23 -0400 Subject: [PATCH 3/4] remove generic container options --- modules/local/GENOTYPE_VARIANTS/main.nf | 67 ------------------------- nextflow.config | 18 ------- 2 files changed, 85 deletions(-) delete mode 100644 modules/local/GENOTYPE_VARIANTS/main.nf diff --git a/modules/local/GENOTYPE_VARIANTS/main.nf b/modules/local/GENOTYPE_VARIANTS/main.nf deleted file mode 100644 index 252afd7..0000000 --- a/modules/local/GENOTYPE_VARIANTS/main.nf +++ /dev/null @@ -1,67 +0,0 @@ -process GENOTYPEVARIANTS_ALL { - tag "$meta.id" - label 'process_medium' - errorStrategy 'terminate' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/genotype_variants:0.3.9': - 'ghcr.io/msk-access/genotype_variants:0.3.9' }" - - input: - // [[patient:null, id:'sample'], standard.bam, standard.bam.bai, [], [], [], []] - // or - // [[patient:null, id:'sample'], [], [], duplex.bam, duplex.bam.bai, simplex.bam, simplex.bam.bai] - tuple val(meta), path(bam_standard), path(bai_standard), path(bam_duplex), path(bai_duplex), path(bam_simplex), path(bai_simplex), path(maf) - path(fasta) - path(fai) - - output: - tuple val(meta), path("*.maf"), emit: maf - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def sample = task.ext.prefix != null ? "-si ${task.ext.prefix}" : (meta.id != null ? "-si ${meta.id}" : "") - def patient = meta.patient ?"-p ${meta.patient}": '' - def bams_standard = bam_standard ?"-b $bam_standard" : '' - def bam_liquid = (bam_duplex && bam_simplex) ? "-d $bam_duplex -s $bam_simplex" : '' - - """ - genotype_variants small_variants all \\ - -i ${maf} \\ - -r ${fasta} \\ - -g /usr/local/bin/GetBaseCountsMultiSample \\ - $patient \\ - $bams_standard \\ - $bam_liquid \\ - $sample \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genotypevariants: \$(genotype_variants --version) - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def sample = "${meta.sample}" - def patient = "${meta.patient}" - - """ - touch ${prefix}-DUPLEX_genotyped.maf - touch ${prefix}-ORG-SIMPLEX-DUPLEX_genotyped.maf - touch ${prefix}-SIMPLEX-DUPLEX_genotyped.maf - touch ${prefix}-SIMPLEX_genotyped.maf - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - genotypevariants: \$(genotype_variants --version) - END_VERSIONS - """ -} \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 71a17fe..554426d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -125,15 +125,6 @@ profiles { charliecloud.enabled = false apptainer.enabled = false docker.runOptions = '-u $(id -u):$(id -g)' - process { - container = '/singularity_cache/jupyter-scipy-notebook-python-3.9.sif' - withLabel: 'genotype_variants' { - container = './singularity_cache/genotype_variants-0.3.10.sif' - } - withLabel: 'biometrics' { - container = './singularity_cache/biometrics-0.2.16.sif' - } - } } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' @@ -148,15 +139,6 @@ profiles { shifter.enabled = false charliecloud.enabled = false apptainer.enabled = false - process { - container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/jupyter-scipy-notebook-python-3.9.sif' - withLabel: 'genotype_variants' { - container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/genotype_variants-0.3.10.sif' - } - withLabel: 'biometrics' { - container = '/juno/cmo/bergerlab/guturus1/oct/access_data_analysis_nf/singularity_cache/biometrics-0.2.16.sif' - } - } } podman { podman.enabled = true From d016be2e643b37e4aaaa1edb759fce2de7debaf9 Mon Sep 17 00:00:00 2001 From: Shivani Guturu Date: Tue, 4 Nov 2025 12:21:23 -0500 Subject: [PATCH 4/4] biometrics create input doesn't need biometrics container --- modules/local/BIOMETRICS/biometrics_create_input.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/BIOMETRICS/biometrics_create_input.nf b/modules/local/BIOMETRICS/biometrics_create_input.nf index 67512a0..cbf5814 100644 --- a/modules/local/BIOMETRICS/biometrics_create_input.nf +++ b/modules/local/BIOMETRICS/biometrics_create_input.nf @@ -5,8 +5,8 @@ process BIOMETRICS_CREATE_INPUT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'ghcr.io/msk-access/biometrics:0.2.16': - 'ghcr.io/msk-access/biometrics:0.2.16' }" + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6': + 'ghcr.io/msk-access/postprocessing_variant_calls:0.2.6' }" input: tuple path(patient_json), val(patient_id)