These are chat archives for nextflow-io/nextflow

23rd
Aug 2017
Simone Baffelli
@baffelli
Aug 23 2017 04:39
Ups😂
Never leave
Francesco Strozzi
@fstrozzi
Aug 23 2017 08:14
irreverent_montalcini is by far the best launching name I have seen in NF until now
Simone Baffelli
@baffelli
Aug 23 2017 12:23
I say that "rotound" should be added as an adjective
Shawn Rynearson
@srynobio
Aug 23 2017 21:52

Question about the best approach to joining multiple files.
I've created a channel which collect multiple GVCF files

Channel.fromPath("$params.gvcfs/*")
    .ifEmpty { error "Cannot find needed gvcf.gz files" }
    .filter( ~/.*.g.vcf.gz$/ )
    .collect()
    .set { dataInput }

And when I .println() the above it print as a list. However when I try to use dataInput in a process it's just printing the last item in the list.

Ideas on the best approach?

Paolo Di Tommaso
@pditommaso
Aug 23 2017 22:03
How are u printing it? It should work.
Shawn Rynearson
@srynobio
Aug 23 2017 22:10

I'm just tried the following:

process GVCFtyper {
    tag {"TEST"}
    executor = 'local'

    input:
    file gvcfs from dataInput.collect()

    output:
    file ("${params.project}.g.vcf.gz") into typed_ch

    """
    echo ${gvcf} > foo
    """
}

but it removes the $baseDir path from the beginning of the file

Paolo Di Tommaso
@pditommaso
Aug 23 2017 22:12
The collect was also in the previous snippet, are u applying it twice? It could be the problem
Shawn Rynearson
@srynobio
Aug 23 2017 22:12
sorry, no that was a typo
strange, if I print it from the channel, the path is included, but if I print it from a process the path is gone and only the file remains.
Really I just want to be able to take a collection of files "fromPath" and use them at once.
Paolo Di Tommaso
@pditommaso
Aug 23 2017 22:16
The path is not strange, the process always stage the inputs as relative files
The other should work
Paolo Di Tommaso
@pditommaso
Aug 23 2017 22:23
Try the following, put a .map{ file (it) } before the collect
Shawn Rynearson
@srynobio
Aug 23 2017 22:25
will do.