IGIRANEZA CLEMENT
10/27/2026, 8:33 AMdev.
The workflow passes the joint cohort VCF from GATK_MOI into PHYLOGENY, pairing it with each WGS sample’s metadata. However, BCFTOOLS_CONSENSUS does not explicitly select the corresponding sample. In a controlled test with BCFtools 1.23.1, omitting sample selection produced an ambiguity-coded consensus when samples had different genotypes.
This suggests that the workflow may not be generating truly sample-specific consensus sequences. I haven’t changed anything yet.
Does this match the intended design? If so, I’d be happy to investigate a fix and add a regression test.Víctor Manuel Duarte Rute
10/27/2026, 8:54 AMIGIRANEZA CLEMENT
10/27/2026, 10:03 AMDebjit Pramanik
10/30/2026, 1:59 PM--sample fixes the genotype selection. I tested it in the pipeline's bcftools container (1.23.1) with a two sample VCF where the samples carry different alleles. Without --sample, both consensus FASTAs were identical, with IUPAC codes (R/Y) mixing both samples' genotypes. With --sample <id>, each FASTA has only its own sample's alleles. The fix is one ext.args entry for BCFTOOLS_CONSENSUS in conf/modules.config, plus an nf test regression test that fails without it and passes with it. I've rebased it onto today's dev and will open the PR today.
The duplicate FASTA names Clement hit in CI are a separate problem that --sample doesn't solve. bcftools consensus keeps the reference contig names as headers, so every sample's FASTA has the same names (e.g. >MT192765.1 for both samples in my test), and collectFile concatenates them into one file with duplicates. With Plasmodium it's also one record per contig per sample. This is the multi contig follow up that #50 lists as out of scope.
@IGIRANEZA CLEMENT, would you like to take that part? It needs a decision on how to name and join each sample's contigs into one sequence before MAFFT/IQ-TREE. It would also be really helpful if you could run my PR on your multi-sample CI data once it's up, to validate the per-sample consensus.Debjit Pramanik
10/30/2026, 2:50 PM--sample ${meta.id} to BCFTOOLS_CONSENSUS via ext.args in conf/modules.config, plus a two sample regression test. The nf-test jobs pass. The only failing check is nf-core lint, on the two logo PNGs (files_unchanged), which this PR doesn't touch.
@IGIRANEZA CLEMENT, if you get a chance to run it on your multi sample data, that would be great. The duplicate FASTA names will still be there, since that's the separate follow up.IGIRANEZA CLEMENT
10/30/2026, 3:33 PM