Resolve "Support haploid genotypes"
Description
Added support for haploid genotypes. Rewrote some logic:
-
MultiAllelicBlockIterator
renamed toBlockIterator
, and changed logic of when a multiallelic block ends (now relies on vt's annotation ofOLD_MULTIALLELIC
) - Moved genotype-"fixing" (removing phasing and ordering) to vcfiterator.
- Avoid issue where a batch could potentially be completed when in the middle of a multiallelic block.
- Modified logic of allele depth calculation to avoid double-counting REF count
- Added genotypes
["0", "1", "."]
as valid genotypes, and rewrite logic relying on diploid genotypes.
Rewrote some test logic:
-
vcftestgenerator.py
now updated with haploid genotypes. Now creates decomposed genotypes from a composed genotype, rather than trying to create it directly. - Add an identificator to multiallelic blocks, using the
OLD_MULTIALLELIC
key in the annotation.
Updated test data:
-
NA12878.Ciliopati_v05
did not containOLD_MULTIALLELIC
key in the annotation. Reannotated. -
HG002-Trio.Mendeliome_v01
has been replaced with a Dragen-called vcf containing phased and haploid genotypes.
Related issues
Notes to review (code/docs/QA)
Tests
General
-
Tests have been added that prove my fix is effective or that my feature works -
Related tests have been modified/removed
Hypothesis testing:
-
Soak testing has been done -
Distribution between positive / negative cases has been checked
Database
-
Includes changes to database schema -
Includes necessary database migrations
Configuration
-
Includes changes to configuration -
Includes configuration migration instructions in documentation
Merge checklist
-
Self-review of code has been performed. -
Feature review and validation against specification has been performed (if applicable). Apply label: QAdone -
Need for documentation has been evaluated and, if necessary, updated. Apply label: docsdone -
Code and implementation has been reviewed by other core developer (including any changes based on initial review). Apply label: code reviewdone
Closes #204 (closed)
Edited by Tor Solli-Nowlan