Hi, I’m developing my first pipeline and ran into...
# nostupidquestions
d
Hi, I’m developing my first pipeline and ran into an issue: the pipeline completes successfully, but one process (FREEBAYES) doesn’t run at all. Here’s the command I used:
Copy code
nextflow run . -profile singularity --input assets/samplesheet.csv --fasta assets/hg38.fna --fasta_index assets/hg38.fna.fai --outdir tmp -resume
Output shows all other processes running, but FREEBAYES remains stuck:
Copy code
[94/12fc14] process > NFCORE_EMSNV:EMSNV:SAMTOOLS_CALMD (test)         [100%] 1 of 1, cached: 1 ✔
[0a/b19923] process > NFCORE_EMSNV:EMSNV:SAMTOOLS_INDEX (test)         [100%] 1 of 1, cached: 1 ✔
[da/aaafe0] process > NFCORE_EMSNV:EMSNV:REVELIO (test)                [100%] 1 of 1, cached: 1 ✔
[29/71a593] process > NFCORE_EMSNV:EMSNV:SAMTOOLS_INDEX_REVELIO (test) [100%] 1 of 1, cached: 1 ✔
[-        ] process > NFCORE_EMSNV:EMSNV:FREEBAYES                     -         
[nf-core/emsnv] Pipeline completed successfully
I’m using the latest version of the nf-core freebayes module. In workflow’s main.nf, this is how I call FREEBAYES:
Copy code
ch_freebayes_input = ch_masked_bam
        .combine(ch_masked_bam_bai)
        .map { meta_1, bam, _meta2, bai ->
            tuple(meta_1, bam, bai, null, null, null) // meta, input1, index1, input2, index2, bed
        }

    FREEBAYES(
        ch_freebayes_input,
        ch_fasta,
        ch_fasta_fai,
        Channel.empty(), // samples
        Channel.empty(), // populations
        Channel.empty()  // cnv
    )
ch_fasta and ch_fasta_fai are defined in the root main.nf as:
Copy code
ch_fasta       = params.fasta         ? Channel.fromPath(params.fasta).map{ it -> [ [id:it.baseName], it ] } : Channel.empty()
ch_fasta_index = params.fasta_index   ? Channel.fromPath(params.fasta_index).map{ it -> [ [id:it.baseName], it ] } : Channel.empty()
Any idea what could be causing FREEBAYES not to run? Thanks!
j
Try
[]
rather than
null
in your
map
d
Thanks! I’ve tried that but nothing has changed - same issue
j
What about replacing
Channel.empty()
as
[]
in the FREEBAYES call?
this 2
d
Copy code
-[nf-core/emsnv] Pipeline completed with errors-
WARN: Input tuple does not match tuple declaration in process `NFCORE_EMSNV:EMSNV:FREEBAYES` -- offending value: []
ERROR ~ Execution aborted due to an unexpected error

 -- Check script 'modules/nf-core/freebayes/main.nf' at line: 6 or see '.nextflow.log' file for more details
Line 6 in the freebayes module is a container declaration
j
OK that's progress, what does the FREEBAYES call look like now?
d
You mean this?
Copy code
ch_freebayes_input = ch_masked_bam
        .combine(ch_masked_bam_bai)
        .map { meta_1, bam, _meta2, bai ->
            tuple(meta_1, bam, bai, [], [], []) // input1, index1, input2, index2, bed
        }

    FREEBAYES(
        ch_freebayes_input,
        ch_fasta,
        ch_fasta_fai,
        [], // samples
        [], // populations
        []  // cnv
    )
j
Ok looking at that, your samples/pops/cnv still needs a fake meta
so try
[[:],[]]
instead of just
[]
d
The freebayes process has finally been called when I changed to this:
Copy code
FREEBAYES(
        ch_freebayes_input,
        ch_fasta,
        ch_fasta_fai,
        [[id:'null'], []],
        [[id:'null'], []],
        [[id:'null'], []]  // cnv
    )
It hasn’t finished yet but working. Thanks a lot! @James Fellows Yates
j
🎉
🙌 1