I’m trying to process a list of csv’s but have in hand the name of the file that the row came from.
I tried this (but it didn’t work):
workflow {
ch_bed=Channel.from(file("${projectDir}/*.bed"))
ch_bed.map{ it->Channel.fromPath(it).splitCsv(sep:"\t").collect()}.view()
}
I know that I can use fromPath()
instead of from()
but then I “lose” the name of the file, and I want it for the purposes of the pipeline.
Any pointers are very much appreciated!!