These are chat archives for nextflow-io/nextflow

28th
Aug 2017
marchoeppner
@marchoeppner
Aug 28 2017 11:50
Hi! looking for a channel function but cannot seem to find what I am looking for: I have a channel with BAM files - and I would like to process these in GATK to call variants - but I would like to split this task by chromosome (which GATK supports via a cmd flag). So I would need to intersect my BAM channel with a list of chromosomes so that the resulting channel emits: [ "chr1", "file1.bam" ], ["chr2", "file1.bam"] and so on. How would one do that?
(so each object in the BAM channel gets paired with each object in the chromosome list/channel
Francesco Strozzi
@fstrozzi
Aug 28 2017 11:56
@marchoeppner maybe what you are looking for is the cross operator ? Having a look here seems it will do exactly that https://www.nextflow.io/docs/latest/operator.html#cross
Francesco Strozzi
@fstrozzi
Aug 28 2017 12:01
since with “cross” you need to create a set for each bam and chromosome to share a common key
marchoeppner
@marchoeppner
Aug 28 2017 12:04
yes that would be the caveat, but I think that would be the most NF solution
thanks, I'll give it a go