Louis Le Nézet
09/29/2026, 10:31 AMVCF_PHASE_SHAPEIT5.
It takes as input:
• ch_vcf (meta[id, optional(chr)], vcf, index): mandatory target variants to be phased (can be multi/single sample, multi/single chr)
• ch_chunks (meta[panel_id, chr], regionout): optional list of successive regions in a chr to perform the phasing on (multiple / chr), obtained from chunking the panel so linked to panel_id
• ch_ref (meta[panel_id, chr], vcf, index): optional chromosome level VCF of a reference population haplotypes (one / chr)
• ch_scaffold (meta[panel_id, chr], vcf, index): optional chromosome level VCF of some haplotypes that overlap ch_vcf position and samples (one / chr)
• ch_scaffold (meta[chr], region, map): optional region and geneticmap to perform chunking and phasing (one / chr)
Here are the use case:
• work with only input vcfs (multi-sample, multi/single chr), + optionally chunks (multi / chr) and map (one / chr)
• work with input vcf (multi/single sample + multi/single chr) + panel/scaffold (one / chr) + optionally chunks (multi / chr) and map (one / chr)
I need to properly combine the different channel based on the data provided.
Currently the sbwf do a join on all channel and let the user in charge of doing the whole meta modification before using it.
This is no ideal and add a lot of meta map manipulation for the second use case.
My idea was either to:
• use a boolean to ask if ch_vcf needs to be joined or simply combined (this works for most cases but not if ch_vcf is split by chr)
• use an array of common meta to perform the join on (should work but need a way when ch_vcf is not split by chr)Louis Le Nézet
09/29/2026, 10:41 AMArthur
09/29/2026, 10:41 AM[id, chr]
Even if that means injecting a dummy chr for samples where the vcf is not split? i.e. chr: 'all'Louis Le Nézet
09/29/2026, 10:42 AMArthur
09/29/2026, 10:42 AMArthur
09/29/2026, 10:47 AMnf-core) which relies on a non-standard meta field (chr) to do channel operations and determine what runs, where that meta field needs to be supplied by the user (it’s different if the subworkflow injects a custom one itself and operates on it entirely within that subworkflow)Arthur
09/29/2026, 10:52 AMvcf_join? It would require the panels and chunks etc to have the same id in meta as a sample? That whole concept seems confusing to me.Louis Le Nézet
09/29/2026, 10:52 AMArthur
09/29/2026, 10:54 AMmeta maps with the correct informationArthur
09/29/2026, 10:57 AMLouis Le Nézet
09/29/2026, 11:19 AMmeta maps with the correct information
I think joining on an array of common meta might be the way to go, but then it's the GLIMPSE_CHUNK that doesn't work anymore when giving ch_vcf without chr and ch_map with chr.
github.com/nf-core/modules/pull/13050 (I need to try a variation).
> In fact, the internal tools `glimpse`/`shapeit5` seem to take most of these values as a single input channel, so why not just make the user provide a single input channel with the correct cross-joining already done?
This could be a wayLouis Le Nézet
09/29/2026, 11:32 AMArthur
09/29/2026, 12:06 PMchunk boolean afaict, you could simply filter the input channel on the presence of a value in ch_chunks (or the chunk field of a single large input channel)Arthur
09/29/2026, 12:06 PMLouis Le Nézet
09/29/2026, 1:14 PMchunk boolean afaict, you could simply filter the input channel on the presence of a value in ch_chunks (or the chunk field of a single large input channel)
TrueLouis Le Nézet
09/29/2026, 2:28 PMregion to compute the chunk, then use .transpose() to split across chunks.Louis Le Nézet
09/29/2026, 3:10 PM