CAST-genomics / haptools

Ancestry and haplotype aware simulation of genotypes and phenotypes for complex trait analysis
https://haptools.readthedocs.io
MIT License
19 stars 4 forks source link

feat: allow multiallelic variants in `transform` #232

Closed aryarm closed 10 months ago

aryarm commented 10 months ago

I'm making this PR for @XimeiWulilyy , who asked recently about whether the transform command could accept multiallelic SNPs. Previously, there was a check in place to restrict it to only biallelic variants, since the GenotypesVCF class could handle only biallelic variants. But then multiallelic support was added to the GenotypesVCF class in #195.

This PR removes the biallelic check in transform, adds some tests, and makes some changes to Haplotype.transform and Haplotypes.transform to allow them to handle Genotypes classes with multiallelic variants in them.

aryarm commented 10 months ago

@mlamkin7 , can you review this? and just double check that the tests are sufficient?

also, can you recall any other reason we hadn't enabled support for biallelic variants in transform, yet? Is there anything I'm not thinking of?