Closed sanjaynagi closed 5 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.87%. Comparing base (
6aef71a
) to head (114923c
). Report is 46 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
CodeCov is failing because I have only made a notebook and not tests. This is the way plot_haplotype_clustering() works.
Should i write tests...? I guess we only started using codecov after the haplotype clustering functions were implemented.
hey guys @ahernank @leehart @alimanfoo , I just saw the discussion in #506 around the problem in random_region_str()
with regions that exceed the max contig size. At some point I had the same issue, so just to say that I have already fixed it in this PR.
Changing title of PR accordingly.
Cool, thanks @sanjaynagi 👍
Resolves #509
Beautiful, thanks @sanjaynagi :) Merging...
In this PR, we implement a plot_diplotype_clustering() function, which works exactly like plot_haplotype_clustering(), except it works on diplotypes rather than haplotypes.
This PR works towards #361, we aim to make an 'advanced' version of this plotting function which plots amino acid mutation heatmap below it, as well as sample heterozygosity and possibly CNV copy number and diplotype cluster assignments. For now, we start with the simple dendrogram itself.
I have added (Alistairs) functions into util.py which calculate pairwise distances for diplotypes. As far as I can tell, these functions were marginally different to the existing biallelic diplotype functions, so i have added new multiallelic ones. It might be that this is not quite necessary, please check @alimanfoo :)