Skip to content

Attach per-haplotype tip labels from the input VCF#48

Open
wnsplim wants to merge 1 commit into
popgenmethods:mainfrom
wnsplim:haplotype-tip-labels
Open

Attach per-haplotype tip labels from the input VCF#48
wnsplim wants to merge 1 commit into
popgenmethods:mainfrom
wnsplim:haplotype-tip-labels

Conversation

@wnsplim

@wnsplim wnsplim commented May 29, 2026

Copy link
Copy Markdown

Currently SINGER reads VCF genotypes positionally and discards the sample names, so the output has no tip labels (samples come out enumerated 0…n-1). This makes mapping results back to samples awkward for some downstream analyses.

We can re-attaches names from the input VCF when converting SINGER output to tskit: each diploid sample i (in VCF column order) becomes individual i with label set to the VCF sample name, and the two tips are named [sample]_0 & [sample]_1.

Edits:

  • merge_ARG.py: new optional --vcf flag (off by default; behavior unchanged unless passed).
  • convert_long_ARG.py: uses the already-required -vcf prefix, so labeling happens automatically. (It now reads {prefix}.vcf, which is present in the normal workflow)

If these should be handled differently, this PR can be dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant