Nadia Sanseverino
09/18/2025, 2:39 PM.bigwig and one readable .bedgraph).
Citing modules guidelines, All _non-mandatory_ command-line tool _non-file_ arguments MUST be provided as a string via the $task.ext.args variable.
Test-writing seem to suggest that I need a nextflow.config to successfully launch tests.
I need a kind soul to take a look at my snippets and confirm if I'm all set to update my branch.
• from main.nf
input:
tuple val(meta) , path(bigwig1) , path(bigwig2)
tuple val(meta2), path(blacklist)
output:
tuple val(meta), path("*.{bw,bedgraph}"), emit: output
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ""
def prefix = task.ext.prefix ?: "${meta.id}"
def blacklist_cmd = blacklist ? "--blackListFileName ${blacklist}" : ""
def extension = args.contains("--outFileFormat bedgraph") ? "bedgraph" : "bw"
"""
bigwigCompare \\
--bigwig1 $bigwig1 \\
--bigwig2 $bigwig2 \\
--outFileName ${prefix}.${extension} \\
--numberOfProcessors $task.cpus \\
$blacklist_cmd \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
deeptools: \$(bigwigCompare --version | sed -e "s/bigwigCompare //g")
END_VERSIONS
"""
• from main.nf.tests
test("homo_sapiens - 2 bigwig files - bedgraph output") {
config "./nextflow.config"
when {
params {
deeptools_bigwigcompare_args = '--outFileFormat bedgraph'
}
process {
"""
def bigwig1 = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bigwig/test_S2.RPKM.bw', checkIfExists: true)
def bigwig2 = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bigwig/test_S3.RPKM.bw', checkIfExists: true)
input[0] = [
[ id:'test' ],
bigwig1,
bigwig2
]
input[1] = [
[ id:'no_blacklist' ],
[]
]
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.output,
process.out.versions)
.match()
}
)
}
}
• from nextflow.config
process {
withName: 'DEEPTOOLS_BIGWIGCOMPARE' {
ext.args = params.deeptools_bigwigcompare_args
}
}Chenyu Jin (Amend)
09/19/2025, 12:19 PMeach() in the process then it's not input as a file as path() does. How can I process each path?
workflow {
file = Channel.fromPath("${params.input_dir}/*", checkIfExists: true).view()
index_reference(files, params.threads)
}
process index_reference {
input:
each(input_ref)
val(threads)
...
}eparisis
09/22/2025, 2:27 PMEvangelos Karatzas
09/23/2025, 7:10 AMMegan Justice
09/24/2025, 4:12 PMshaojun sun
09/24/2025, 5:39 PMFabian Egli
09/26/2025, 5:44 AMFabian Egli
09/26/2025, 8:15 AMcommand.sh: line xx: 282 Killed [...] command -with -parameters [...]James Fellows Yates
09/26/2025, 9:11 AMAndrea Bagnacani
09/26/2025, 2:26 PMnf-core/samtools/merge to merge some BAM files.
The input channel that I provide to this process has meta fields id and sample_name.
The former is used by samtools merge to infer the file prefix for merging, while the latter is used in my pipeline to keep provenance info.
When I run my pipeline, this performs the merge as intended. However, when I run `nf-core/samtools/merge`'s stub test, meta.sample_name ends up being interpreted as the relative path to a docker mount point, and since Docker mount points must be absolute, the stub test is (in my case) bound to fail:
$ nf-test test tests/01.stub.nf.test --profile docker
...
Command exit status:
125
Command output:
(empty)
Command error:
docker: Error response from daemon: invalid volume specification: 'HG00666:HG00666': invalid mount config for type "volume": invalid mount path: 'HG00666' mount path must be absolute
Run 'docker run --help' for more information
From `.command.run`:
...
nxf_launch() {
docker run -i --cpu-shares 2048 --memory 12288m -e "NXF_TASK_WORKDIR" -e "NXF_DEBUG=${NXF_DEBUG:=0}" \
\
-v HG00666:HG00666 \ # <-- meta.sample_name becomes a mount point
\
-v /home/user1/src/nf-ont-vc/.nf-test/tests/5e6015530fd10b4314bec7ef1809a11/work/bb/8f8ce8297ea4c0263e765dcdffacc8:/home/user1/src/nf-ont-vc/.nf-test/tests/5e6015530fd10b4314bec7ef1809a11/work/bb/8f8ce8297ea4c0263e765dcdffacc8 -w "$NXF_TASK_WORKDIR" -u $(id -u):$(id -g) --name $NXF_BOXID quay.io/biocontainers/samtools:1.22.1--h96c455f_0 /bin/bash -c "eval $(nxf_container_env); /bin/bash /home/user1/src/nf-ont-vc/.nf-test/tests/5e6015530fd10b4314bec7ef1809a11/work/bb/8f8ce8297ea4c0263e765dcdffacc8/.command.run nxf_trace"
}
...
How do I make samtools merge ignore meta.sample_name when the docker cli is buit?Quentin Blampey
09/30/2025, 2:41 PM$HOME directory. I fixed it for Docker with containerOptions = '', but for singularity I still receive an error saying Read-only file system
Does anyone know how to fix that?Kurayi
10/02/2025, 8:31 PMQuentin Blampey
10/08/2025, 1:19 PM.zarr directory.
Everything works well for "standard" usage (e.g., Docker / Singularity on a HPC / standard file system), but I have some staging issues on AWS Batch specifically. When one process updates the zarr (i.e. creating a new subdir), the new subdir is not passed to the following process, although I specify it in my inputs/outputs (and, again, it works nicely when not on the cloud).
Does anyone faced similar issues? Do you have any idea how to fix it?Luuk Harbers
10/08/2025, 3:22 PMgetAttribute) just like normally with fasta files etc. These files are on github lfs and so we specified them like this in the config (opposed to raw.githubusercontent.com )
gnomad = "<https://github.com/IntGenomicsLab/test-datasets/raw/refs/heads/main/ClairSTO-pon/final_gnomad.vcf.gz>"
dbsnp = "<https://github.com/IntGenomicsLab/test-datasets/raw/refs/heads/main/ClairSTO-pon/final_dbsnp.vcf.gz>"
onekgenomes = "<https://github.com/IntGenomicsLab/test-datasets/raw/refs/heads/main/ClairSTO-pon/final_1kgenomes.vcf.gz>"
colors = "<https://github.com/IntGenomicsLab/test-datasets/raw/refs/heads/main/ClairSTO-pon/final_colors.vcf.gz>"
This works perfectly and downloads them fine. However the caching doesn't work and I'm unsure why. It will always restage the files from github lfs and result in processed not caching properly on resume. I'll put a nextflow.log snippet with hashes in a reply here.Sylvia Li
10/08/2025, 6:07 PMPriyanka Surana
10/10/2025, 7:24 AMSusanne Jodoin
10/13/2025, 2:49 PMJon Bråte
10/16/2025, 10:38 AMmanifest {
name = 'folkehelseinstituttet/hcvtyper'
author = """Jon Bråte"""
homePage = '<https://github.com/folkehelseinstituttet/hcvtyper>'
description = """Assemble and genotype HCV genomes from NGS data"""
mainScript = '<http://main.nf|main.nf>'
nextflowVersion = '!>=23.04.0'
version = '1.1.1' // Current release version
doi = ''
}
Current code for the process:
process SUMMARIZE {
label 'process_medium'
errorStrategy 'terminate'
// Environment with R tidyverse and seqinr packages from the conda-forge channel. Created using seqera containers.
// URLs:
// Docker image: <https://wave.seqera.io/view/builds/bd-3536dd50a17de0ab_1?_gl=1*16bm7ov*_gcl_au*MTkxMjgxNTMwMi4xNzUzNzczOTQz>
// Singularity image: <https://wave.seqera.io/view/builds/bd-88101835c4571845_1?_gl=1*5trzpp*_gcl_au*MTkxMjgxNTMwMi4xNzUzNzczOTQz>
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'<https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/2a/2a1764abd77b9638883a202b96952a48f46cb0ee6c4f65874b836b9455a674d1/data>':
'<http://community.wave.seqera.io/library/r-gridextra_r-png_r-seqinr_r-tidyverse:3536dd50a17de0ab|community.wave.seqera.io/library/r-gridextra_r-png_r-seqinr_r-tidyverse:3536dd50a17de0ab>' }"
// Set environment variables for summarize.R
env "PIPELINE_NAME", "${workflow.manifest.name}"
env "PIPELINE_VERSION", "${workflow.manifest.version}" // Primary version source
env "PIPELINE_REVISION", "${workflow.revision ?: ''}" // Secondary (branch/tag info)
env "PIPELINE_COMMIT", "${workflow.commitId ?: ''}" // Tertiary (commit info)
input:
path samplesheet
val stringency_1
val stringency_2
path 'trimmed/'
path 'kraken_classified/'
path 'parsefirst_mapping/'
path 'stats_withdup/'
path 'stats_markdup/'
path 'depth/'
path 'blast/'
path 'glue/'
path 'id/'
path 'variation/'
output:
path 'Summary.csv' , emit: summary
path '*mqc.csv' , emit: mqc
path '*png' , emit: png
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
summarize.R \\
$samplesheet \\
$stringency_1 \\
$stringency_2 \\
$args
But the R-script prints "HCVTyper (version unknown)". Relevant code part in the R-script:
pipeline_name <- Sys.getenv("PIPELINE_NAME", "HCVTyper") # Use HCVTyper if not set
pipeline_version <- Sys.getenv("PIPELINE_VERSION", "")
pipeline_rev <- Sys.getenv("PIPELINE_REVISION", "")
pipeline_commit <- Sys.getenv("PIPELINE_COMMIT", "")
# Precedence: version > revision > commit
ver_label <- dplyr::coalesce(
na_if(pipeline_version, ""),
na_if(pipeline_rev, ""),
na_if(pipeline_commit, "")
)
script_name_version <- if (!<http://is.na|is.na>(ver_label)) {
paste(pipeline_name, ver_label)
} else {
paste(pipeline_name, "(version unknown)")
}Salim Bougouffa
10/16/2025, 12:36 PMPaweł Ciurka
10/17/2025, 4:15 PMNour El Houda Barhoumi
10/19/2025, 3:46 PMSylvia Li
10/20/2025, 11:37 PMYeji Bae
10/21/2025, 1:17 AMnf-core/scrnaseq_nf, but I’m facing a memory issue with the cellranger count step. I tried increasing the memory by specifying it in my config file as shown below, but it still runs with 15 GB.
process {
withName: 'CELLRANGER_COUNT' {
cpus = 8
memory = 36.GB //TODO: check the format
time = '24h'
}
}
Here is my command for running the pipeline.
nextflow \
-log test_running_cellranger1017.log \
run nf-core/scrnaseq \
-c conf/rnaseq_sasquatch.config \
-profile seattlechildrens,test \
-params-file params/nf-core_scrnaseq_params_ex_cellranger.yml \
-resumeSylvia Li
10/21/2025, 6:58 PMworkflow MAIN {
channel1 = Channel.of(1, 2, 3, 4) // size 4
channel2 = Channel.of('A', 'B', 'C') // size 3
SUB_WORKFLOW(channel1, channel2)
}
workflow SUB_WORKFLOW {
take:
input1 // size 4
input2 // size 3
main:
PROCESS_ONE(input1) // will this run 4times?
PROCESS_TWO(input2) // Will this run 3 times?
}
Will the processes within the subworkflow run the amount of times necessary for each separate channel? I'm worried, or maybe I misunderstood, that it will only run 3 times, since that is the smallest channel for input.
is that an issue only if they're both used in 1 Process and they differ in size?Ammar Aziz
10/22/2025, 4:50 AMERROR ~ /tmp/nextflow-plugin-nf-schema-2.1.1.lock (Permission denied)Ammar Aziz
10/22/2025, 4:51 AMctrl + c during nextflow startup/downloading?Aivars Cīrulis
10/22/2025, 1:36 PMchase mateusiak
10/23/2025, 12:14 AM...
input:
tuple val(meta), path(peaks) // peaks can be a list of peak files
output:
tuple val(meta), path("*_merged.txt"), emit: merged
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def peak_list = peaks instanceof List ? peaks : [peaks]
def use_peak_file = peak_list.size() > 10
def VERSION = '5.1'
if (use_peak_file) {
"""
# Create file list using a shell loop
for peak_file in ${peaks.join(' ')}; do
echo "\${peak_file}" >> ${prefix}_peak_files.txt
done
mergePeaks \\
$args \\
-file ${prefix}_peak_files.txt \\
> ${prefix}_merged.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: ${VERSION}
END_VERSIONS
"""
} else {
"""
mergePeaks \\
$args \\
${peaks.join(' ')} \\
> ${prefix}_merged.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: ${VERSION}
END_VERSIONS
"""
}
...
that works with 4 files (reducing the threshold at which it is using a lookup), but when I try it with 1000+, it isn't. It seems like it is failing to symlink the files into the work dir, too, which also isn't happening when I run this on a reduced number of files (can't tell if that is true yet or not -- just dealing with it now)Dylan Renard
10/23/2025, 2:06 PMYang Pei
10/24/2025, 1:14 PMexecutor > slurm (6)
[4d/0abfaf] YPE…RBASE:FASTQC (sub_tes33d6) | 0 of 3
[6a/6d8f03] YPE…BASE:FASTP (sub_spike0125) | 2 of 3
[- ] YPE…NCLE_FGBIO_PERBASE:BWA_MEM -
executor > slurm (6)
[2a/cfa7f3] YPE…ASE:FASTQC (sub_spike0125) | 1 of 3
[6a/6d8f03] YPE…BASE:FASTP (sub_spike0125) | 2 of 3
[- ] YPE…NCLE_FGBIO_PERBASE:BWA_MEM -
executor > slurm (9)
[4d/0abfaf] YPE…RBASE:FASTQC (sub_tes33d6) | 3 of 3 ✔
[fd/92aa1d] YPE…ERBASE:FASTP (sub_tes33d6) | 3 of 3 ✔
[50/b7a700] YPE…BASE:BWA_MEM (sub_tes33d6) | 0 of 3
It looks like BWA_MEM only starts once all 3 FASTP tasks for that sample have finished, rather than as each FASTP task completes. Is that expected Nextflow behaviour? Or is there a way to configure Nextflow (or Slurm/executor) to let downstream tasks be scheduled as each upstream task finishes (like a per-task streaming)?