I did a small example that works but on my real flow I got InvocationTargetException
nextflow.enable.dsl=2
include
{extractText
} from './
func.nf'
process x
{
input:
val x
output:
tuple val(x), val(a2x), path(out_file)
script:
out_file="xout"
a2x = x+2
"""
echo "$x, perfect!" > $out_file
"""
}
process b
{
echo true
input:
tuple val (x), val(a2x), val(message)
script:
"""
echo $x:
echo $a2x:
echo $message
echo "*****"
"""
}
ch = Channel.from(1,2,3,4)
empty_file = file('EMPTY')
workflow
{
x(ch)
ch2 = extractText(ch.join(x.out, remainder: true))
b(ch2)
}
func.nf: