CAST-genomics / haptools

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

fix: issue warnings instead of errors when trying to check the header of hap files and issue error when output of transform is not provided to simphenotype #254

Closed aryarm closed 1 month ago

aryarm commented 2 months ago

We were issuing errors in the .hap reader before but it turns out that there are perfectly legitimate reasons for the header to lack an extra field. For example, if a hap file only contains haplotypes (and not repeats) and we try to provide the hap file to simphenotype, which expects both haplotypes and repeats to be declared in the header.

This PR also switches on a message in simphenotype that would warn when the output of transform is not properly passed to simphenotype. Incidentally, I do this all the time 😅 It also converts the warning to an error.

aryarm commented 1 month ago

@mlamkin7 , can I ask you for a review? Do you think this is the right approach to warning the user about these issues?