Joining files in channel

54 views
Skip to first unread message

Chris D

unread,
Oct 4, 2016, 12:58:35 PM10/4/16
to Nextflow
Suppose I have the following:

process A {
    input:
    some input

    output:
    some output in variants

    """
    freebayes -f ref.fa alignment.bam into variants
    """
}

Is there a way to take the files placed in the variants channel and do a join outside of the process and use the result for input into another process? For example,

def variant_files = variants.join(" ")



Paolo Di Tommaso

unread,
Oct 4, 2016, 1:04:40 PM10/4/16
to nextflow
For join do you mean to collect all of the use in a single shot? 

If you ca use toList as shown here for example: 



Cheers,
p

--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.

Chris D

unread,
Oct 4, 2016, 1:24:43 PM10/4/16
to Nextflow
Yeah, I want to collect all of the inputs in a single shot so I can use bcftools for multiple vcf intersection, but as far as I can tell bcftools needs the format to be:

bcftools -isec -p dir A.vcf B.vcf C.vcf

Can I use toList for this?

On Tuesday, October 4, 2016 at 11:04:40 AM UTC-6, Paolo Di Tommaso wrote:
For join do you mean to collect all of the use in a single shot? 

If you ca use toList as shown here for example: 



Cheers,
p
On Tue, Oct 4, 2016 at 6:58 PM, Chris D <cde...@rams.colostate.edu> wrote:
Suppose I have the following:

process A {
    input:
    some input

    output:
    some output in variants

    """
    freebayes -f ref.fa alignment.bam into variants
    """
}

Is there a way to take the files placed in the variants channel and do a join outside of the process and use the result for input into another process? For example,

def variant_files = variants.join(" ")



--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.

Paolo Di Tommaso

unread,
Oct 4, 2016, 1:29:53 PM10/4/16
to nextflow
Yes! 

p
Reply all
Reply to author
Forward
0 new messages