Pierre Lindenbaum
03/11/2024, 10:09 AM@Operator that emits many object for one input value (just like flatMap). For example.
bams_ch.extract_samples(tag:"SM").view()
["sample1","file1.sam"]
["sample2","file1.sam"]
["sample3","file3.bam"]
["sample5","file6.cram"]
here file1.sam contains two samples (so one "input" produces two "values")Jorge
03/11/2024, 1:39 PMJorge
03/11/2024, 1:41 PMPierre Lindenbaum
03/11/2024, 1:49 PMfinal List<String> L = new ArrayList<>();
(...)
final next = {
L.each{V->target.bind(V)}
}
(...)
final done = { target.bind(Channel.STOP) }
DataflowHelper.subscribeImpl(source, [onNext: next, onComplete: done])