I generate a file, list.relative.path.mismatch.txt, in a process. Each line in this file represents a path that I need to process in parallel using another process. However, I’m unsure how to properly utilize this file as input for the next process.
Additionally, I noticed that nf_log does not contain any output from my process, even though the expected files are created correctly in the publishDir.
Tags are for task-specific things really, as it’s the same as the process name this will just duplicate what’s shown. Better to leave as blank (defaults to an index count) or something specific to the input
module load python/2023-09-0
If you really need environment modules, better to use the module directive (Nextflow has built in support for these)
Thanks a lot for the valuable gold standard recommendations! I’ve updated my code accordingly and will follow these instructions for all future projects.
Python script for moduleBinaries
I have the following structure in my module folder (./modules/projectdata):
[projectdata]$ tree
.
├── main.nf
└── resources
└── usr
└── bin
├── ica_check_size.py
Additionally, nextflow.enable.moduleBinaries = true is set in nextflow.config. However, the script isn’t being detected properly. I noticed that if I remove python3, Nextflow resolves the absolute path, but the script still fails since .py files require the python3 prefix. The error message I get is:
python3: can't open file 'ica_check_md5.py': [Errno 2] No such file or directory
or if I remove python3
.command.sh: line 2: /nf_test/modules/projectdata/resources/usr/bin/ica_check_md5.py: Permission denied
Behavior of channel assignment in process calls
I’ve been using this approach to capture process outputs:
This has worked consistently for me, but I want to confirm whether this behavior is officially supported or if I’ve just been lucky. If it’s not intended behavior, I’ll switch to using:
I think that the channel assignment is fine, I’m just not used to seeing it written that way. Personally I find the other approach easier to read as there is no intermediate variable that you need to assign, instead you just access the outputs directly. But up to you