broadinstitute / gnomad_local_ancestry

Hail batch pipeline and scripts for local ancestry inference
MIT License
3 stars 0 forks source link

Fix collapse_ancestry1.py and plot_karyogram1.py #100

Open mike-w-wilson opened 3 years ago

mike-w-wilson commented 3 years ago

A bug was found in both collapse_ancestry1.py and plot_karyogram1.py in Elizabeths branch of the ancestry_pipeline repo. The plot_karyogram1.py bug rescues the collapse ancestry. Collapse_ancestry1.py has a fence post problem where the last window in a file is not being added for the ancestry in the bed file. This creates gaps on the right side of the ancestry windows in the karyograms. Plot ancestry rescues this by grabbing the incorrect field, bp, and plotting the rectangles from a cM position to the bp position instead of cM to cM. This fills in the gap as the anc rectangle extend off the plotted areas.