6
votes
Accepted
Nextflow: dynamically setting resource directives for a process
It's possible to specify dynamic computing resources using a closure. For example, this sets the cpus and memory directives using the values supplied via the input declaration:
...
5
votes
Accepted
Autodetect max number of cores and pass as an argument in Nextflow
I have not read the full Nextflow manual in depth, but I think there is no Nextflow command to detect the maximum number of threads you can use.
However, you can try to automatize this task by using ...
5
votes
How to merge back the processes by sample after splitting by chromosome in Nextflow?
Use the groupBy operator. If the content of channel xasxa is:
...
5
votes
Accepted
Using SED command in Nextflow script
Inside your script's command string, assembly_id is actually a java.lang.String so trying to manipulate it with a Bash operation (i.e. using ...
5
votes
Easier / lazy way to convert an existing bash pipeline to nextflow pipeline?
If your objective is to convert Bash scripts into Nextflow code, you might find Viash (https://viash.io) a particularly useful open source tool. It automatically generates independent Nextflow modules ...
5
votes
Nextflow - Process has already been used
I believe adding a comma after val(sample_name) on line tuple val(sample_name) path(reads) will solve the issue.
EDIT: Also ...
4
votes
Accepted
Nextflow: No signature of Method: chr() is applicable for argument types; unknown variable
The documation re conditional scripts is useful here:
Process scripts can contain conditional statements by simply prefixing
the script block with the keyword ...
4
votes
Accepted
Nextflow: Can I parameterize similar processes inside a for loop?
Use channels, this is what nextflow's entire design is based on. I'm honestly surprised that spawning 5 processes with the same name in a loop even works.
Turn your parameters into regular channels, ...
4
votes
Accepted
Why are my Nextflow processes not executing in parallel?
I have tested it on my end with the following script:
...
4
votes
Accepted
Nextflow: how to create many-to-many tuple for process
The combine operator can be used to produce the Cartesian product:
...
4
votes
Nextflow with Minimap2 not working
Command error:
.command.sh: line 2: ./minimap2: No such file or directory
Work dir:
/Users/rimo/Desktop/AWS/minimap2/work/ae/47e3c0708f33b1949315fc83066b95
...
4
votes
Accepted
How to solve Nextflow error: "Trace file already exists"?
Rotation of report files (trace, execution, timeline etc) was removed recently (since version 22.10.0 in a762ed5). To overwrite the existing trace file you will ...
4
votes
Accepted
How to handle output from a python script that gives different outputs depending upon the condition - Nextflow
You should be able to just use a glob pattern that accounts for all possible output files, regardless of the specified conditions. As long as a single file matches the glob pattern when the process ...
4
votes
Accepted
How to run a nextflow process for each file generated by another process separately - Input tuple does not match input set cardinality error
If the output channel produces a tuple where the first element is a simple value and the second element is a collection of files, like in this case, you can simply use the transpose operator to ...
3
votes
How fo force nextflow to repeat a process until all values in a particular channels are used up BUT a single value from another channel is needed
I discovered a solution using a combination of .collect() and each.
If one collects from a path the result is a value channel of ...
3
votes
Nextflow: Can I parameterize similar processes inside a for loop?
You don't need to create processes in a loop when you have channels. The each qualifier allows you to repeat the execution of a process for each item in a collection. For example, the contents of '...
3
votes
Accepted
Merge multiple channels each emits multiple files in nextflow
The merge operator is deprecated and will be removed from future Nextflow releases. You'll need instead the join operator to join by chromosome. You can use the fromFilePairs operator to quickly get ...
3
votes
Master of Pores Installation Mac OS Mojave 10.14
you should not move nextflow within ~/master_of_pores/NanoPreProcess/bin .
Just add nextflow in your path.
...
3
votes
Run Nextflow with file dependencies inside a Docker container?
The following workaround seems to work but ideally I don’t want to have to change the script portion of my process so that it works with Docker.
...
3
votes
Accepted
add task to nextflow and resume
It is actually very hard to answer this using only the information you have provided. It'd be necessary to actually see your test.nf file and read the processes. ...
3
votes
Accepted
Nextflow (DSL v2): how to best synchronize multiple outputs from a single process
Nextflow channels guarantee that items are delivered in the same order as they are sent. So if a process declares two (or more) output channels, the items that are emitted should already be ...
3
votes
Accepted
Nextflow: cannot get file pairs from Channel.fromFilePairs
TLDR, use:
nextflow.enable.dsl=2
workflow {
Channel.fromFilePairs('/path/to/adsp/cram/snd10000/A-CUHS-CU000*.cram{,.crai}')
| view()
}
Results:
...
3
votes
Accepted
How to keep the basename of an input file and change its extension in Nextflow?
You can use the getBaseName() method on file objects to get the basename:
The invocation of any method name starting with the <...
3
votes
Accepted
Why does this nextflow script finish after running one sample?
The issue here is that the fromPath factory method produces a queue channel, but you don't want all of your input channels to be queue channels. Most of the time, ...
3
votes
Accepted
Nextflow Error: failed to read header from "-"
This is not a Nextflow error. The problem is that without an input file, samtools sort tries to read from stdin. Using a recent ...
2
votes
Accepted
How to merge back the processes by sample after splitting by chromosome in Nextflow?
I was able to find a solution that answers my problem finally.
So, here are two different methods below, one which does exactly what I want while the other has to wait for all the previous processes ...
2
votes
Autodetect max number of cores and pass as an argument in Nextflow
Here's an example I wrote recently:
...
2
votes
Accepted
nextflow `fromPath` not passing all files with *
got it!
I should run:
nextflow run main.nf --input "*bam"
instead of
nextflow run main.nf --input *bam
2
votes
Accepted
How to trigger next process on completion of previous process?
So from this page...
https://groups.google.com/g/nextflow/c/jt77_-uApMs
It is the "scatter-gather" pattern. I think the answer is to collect() the channel as follows - interested to hear if ...
2
votes
Accepted
Nextflow error: can not invoke method minus () on null object
Channel names must consist only alphanumeric characters including underscores. Your channel called 'plink-data' contains a hyphen. This is problematic because it is interpreted as a minus() operation ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
nextflow × 63workflow-management × 7
errors × 4
rna-seq × 3
plink × 3
fasta × 2
samtools × 2
bash × 2
bwa × 2
rna-alignment × 2
sequence-alignment × 1
assembly × 1
fastq × 1
variant-calling × 1
nanopore × 1
read-mapping × 1
sars-cov-2 × 1
software-installation × 1
k-mer × 1
data-download × 1
bcftools × 1
mpileup × 1
minimap2 × 1
docker × 1
slurm × 1