Questions tagged [nextflow]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
70 views

recover files after groupTuple

I have a process that emits BAM files with a key containing the sample name: ...
  • 202
2 votes
1 answer
126 views

How can I call one file from a channel that's composed of several files in Nextflow?

In Nextflow I have a process that creates a channel that holds several files in a tuple. I'm trying to call only one of those files as input for a subsequent process. So basically if I run ...
2 votes
1 answer
125 views

Nextflow: cannot get file pairs from Channel.fromFilePairs

I'm remarkably still struggling with some basic Nextflow concepts. I'm simply trying to collect all pairs of .cram and ...
  • 1,254
3 votes
1 answer
200 views

Nextflow scheduler job doesn't end upon successful workflow completion

Bug fixed This issue appears to have been fixed in latest Nextflow: https://github.com/nextflow-io/nextflow/issues/2693 I've been using ...
  • 1,254
4 votes
1 answer
173 views

BWA mem | samtools view: Intermittent parsing error

Update The issue was that bwa was running out of memory and failing, but that error wasn't floating to the top (see @Steve's answer, below). I was getting an error ...
  • 1,254
4 votes
1 answer
223 views

Nextflow: dynamically setting resource directives for a process

I'm trying to test variations of CPU and memory for a specific process (samtools sort) to measure computational efficiency (measured only by time). To do this, I'd ...
  • 1,254
4 votes
2 answers
545 views

Nextflow (DSL v2): how to best synchronize multiple outputs from a single process

I have a workflow that needs to: Generate .fastq files from .bams (while preserving the @RG ...
  • 1,254
1 vote
2 answers
483 views

Nextflow: how to create many-to-many tuple for process

Using Nextflow, I need to submit x * y jobs where x is the number of input ...
  • 1,254
1 vote
1 answer
97 views

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 am trying to find a hack for getting a process to run until all emissions in a channel are used up. The problem is that the process also takes as input a second channel that only has a single ...
  • 31
0 votes
1 answer
158 views

Nextflow HISAT2 command exit status 255 with prebuild index

I have a problem with my nextflow pipeline. My workflow looks like this: Uncompress the hisat2 genotpye index grch38_genome.tar.gz from https://genome-idx.s3.amazonaws.com/hisat/grch38_genome.tar.gz ...
1 vote
2 answers
278 views

How do I call variants using BCFTools without piping mpileup file?

I need to call variants on a large number of reads using both VarScan2 and BCFTools. Both of these variant calling tools use <...
  • 123
1 vote
1 answer
457 views

Why are my Nextflow processes not executing in parallel?

I have written a Nextflow script with three process: The first process takes a pair of fastq files and aligns with reference genome. The process writes the ...
  • 123
2 votes
1 answer
249 views

Nextflow: How to initialize channel from CSV file but only after CSV file created?

Process A runs a python script which generates a CSV file in some absolute file path say "/mnt/x/blah.csv". Process B needs to consume the CSV file line by line, after process A has finished....
3 votes
2 answers
216 views

use same output in two processes in nextflow dsl2

This is my workflow: ...
  • 557
2 votes
1 answer
232 views

How to execute several processes sequentially, without channels?

Using DSL2. I have processes A, B, C which I want to run in sequence - B waits for A to finish, C waits for B to finish. They are not communicating via channels so I can't do A.out.collect(). I have ...
2 votes
1 answer
316 views

splitCsv map with text, join with another channel, nextflow

I have a csv file which describes number of chunks per chromosome, like; ...
2 votes
2 answers
703 views

Use conditional in workflow in Nextflow dsl2

How should I do: ... if ($(params.aligner) == "bowtie") { align_bowtie2(get_fq_info.out.fq_info) } else { align_bwa(get_fq_info.out.fq_info) } ... ...
  • 557
1 vote
2 answers
649 views

Nextflow: Can I parameterize similar processes inside a for loop?

I have set of ~5 processes which perform very similar tasks such that their differences can be parameterized. Rather than putting 5 items through some channel (which seems complicated), or defining 5 ...
0 votes
0 answers
396 views

parse csv/text file to create a channel with array in nextflow

[![example csv file][1]][1] First I want to start by parsing and doing some operation on a text/csv file. How could I read a csv/text file in nextflow? Suppose, I have above csv file with 3 columns. ...
1 vote
1 answer
509 views

How to trigger next process on completion of previous process?

Simple question but I am stumped. (I am still learning Nextflow) I have a process which takes as input a channel of files and processes each file separately. There is a second process which needs to ...
1 vote
1 answer
1k views

Merge multiple channels each emits multiple files in nextflow

I need to merge multiple channels each emits multiple file. So far I did something as below: ...
1 vote
1 answer
215 views

Input from multiple channel, merge and use in nextflow

I need to merge multiple channel to reuse them in two processes. So far I tried as follows: ...
1 vote
1 answer
905 views

Nextflow: run sbatch (slurm job script) inside a process

I was trying to run a slurm job script inside nextflow process. Is it possible? For instance, I have a job script 'PRE_PHASING_QC.JOB' and outside nextflow it runs perfectly, I want to integrate it in ...
1 vote
1 answer
280 views

Nextflow: Runs without error, produce few but not all output files into output channel

I was trying to develop a pipeline using nextflow and plink. My code runs without any error, but got only two output files instead of 22 (one for each chromosome). Here is part my code block, any help?...
0 votes
1 answer
431 views

nextflow: Filter outputs of a process

How could I filter outputs of a process in the input of the next process? Filtering works fine in channel, but if I try to filter outputs I got compilation error. I tried as follows: ...
1 vote
1 answer
562 views

Nextflow: ordering the execution of processes; outputs of process A are inputs of process B

I need to build a pipeline where 2nd process starts after completion of the 1st process and the 3rd after 2nd. As I understand nextflow's processes run parallel. But I need it to run in a order 1st>...
2 votes
1 answer
284 views

Nextflow: No signature of Method: chr() is applicable for argument types; unknown variable

I was trying to use plink in nextflow. My first process will split the input (single bed|bim|fam file) into 22 chromosomes (each with bed|bim|fam files) which would be used in subsequent processes. My ...
1 vote
1 answer
404 views

Nextflow error: can not invoke method minus () on null object

Hi I was trying to use plink in nextflow and getting the error mentioned in the subject. Here is my code, any help what I am missing. I am new in nextflow, it was ok when input was a single file, but ...
1 vote
1 answer
86 views

add task to nextflow and resume

in test.nf (dsl2) I have ... workflow{ a = Channel... processA(a) processB(processA.out.emitA) processC(processB.out.emitB) } ...
  • 557
1 vote
2 answers
454 views

How to merge back the processes by sample after splitting by chromosome in Nextflow?

I have a pipeline that has an input list of samples. I would like to split those samples by chromosomes, process each chromosome apart, and then merge them back by sample name. Here's an example: <...
1 vote
1 answer
94 views

Master of Pores Installation Mac OS Mojave 10.14

I'm bit of a newbie with ONT analyses and am having some trouble with the Master Of Pores installation instructions (https://biocorecrg.github.io/master_of_pores/install.html). I've managed to install ...
  • 11
0 votes
1 answer
64 views

nextflow `fromPath` not passing all files with *

main.nf is #!/usr/bin/env nextflow params.input = '' tchan = Channel.fromFile(params.input) tchan.println() I have a.bam, b.bam and c.bam I run: ...
  • 557
1 vote
0 answers
123 views

Passing around complex metadata in Nextflow

I have a number of samples (from the 1000 genomes) that I want to analyse using Nextflow. However, I need to keep track of their metadata, fields like sample ID, analysis type etc. So I have a basic ...
  • 350
4 votes
2 answers
1k views

Run Nextflow with file dependencies inside a Docker container?

I’m trying to run a Nextflow workflow in a custom Docker container. Without Docker, the workflow succeeds. But running it inside the container leads to an error because a dependent file cannot be ...
3 votes
2 answers
623 views

Autodetect max number of cores and pass as an argument in Nextflow

I am creating a pipeline in Nextflow. One step is creating a pangenome with Roary. Roary takes threads as an argument and if no number of threads is supplied as an argument it defaults to one. Is ...
  • 429