I would like to choose the path of different outputs obtained by AWK into a nextflow process, but i cannot get it. By writing $it after view i can obtain the output in the work directory but i would need to choose the $PATH. I have tried to change $it to "${PathOutdir}/test_out.csv" but doesn't work. Here i put a simple awk function inside the nextflow process. I should use the workflow function? Thanks in advance!
PathFile = "/home/pvellosillo/nextflow_test/test.csv"
InputCsv = file(PathFile)
PathOutdir = "/home/pvellosillo/nextflow_test"
process genesFilter {
tag "PathInputFile:${PathFile}"
input:
path InputCsv
output:
file("test_out.csv") into out_filter
shell:
"""
#!/bin/bash
awk 'BEGIN{FS=OFS="\t"}{print \$2}' $InputCsv > "test_out.csv"
"""
}
out_filter.view {"${PathOutdir}/test_out.csv"}