-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dist #34
Conversation
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
=========================================
+ Coverage 93.11% 93.71% +0.6%
=========================================
Files 19 19
Lines 668 700 +32
Branches 120 128 +8
=========================================
+ Hits 622 656 +34
Misses 39 39
+ Partials 7 5 -2
Continue to review full report at Codecov.
|
'gt1', help='genotype data (in JSON format) for individual 1' | ||
'-p', '--ploidy', type=int, metavar='PLD', default=2, | ||
help='for simulated genotypes, the number of distinct haplotypes ' | ||
'present in the sample; default is 2 (for a single diploid genotype)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be possible to infer the ploidy automatically when populating SimulatedGenotype
objects from BED data. I don't like having to state this explicitly, but we'll leave it in for now.
if locus in gt2.data: | ||
allele2 = gt2.data[locus]['genotype'] | ||
allele1 = gt1.alleles(locus) | ||
allele2 = gt2.alleles(locus) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the SimulatedGenotype
and ObservedGenotype
classes so that their alleles()
and loci()
methods perform identically to take advantage of duck typing.
This update enables more seamless comparisons between simulated and observed genotypes, both at the Python level and the CLI. The
mixture
module can now also output a BED file containing genotype data from all contributors to enable equality and distance comparisons. Closes #33.