I am trying to create a channel with a CSV file and use it as tuple input. Yet the output I obtain does not contain the entire file but only the first element of the file (1st row).
the csv
dig,val
1,One
2,Two
3,Three
4,Four
5,Five
output :
cat digOne.txt
1
instead of the whole collection
digOne, digTwo...
size_amp_ch = Channel
.fromPath( params.file)
.splitCsv(header:true).map{
row -> tuple(row.dig,row.val)
}
process{
input:
tuple val(digits), val(values)
output:
path "dig_${values}.txt"
script:
"""
echo $digits >> dig_${values}.txt
}
thank you