broadinstitute/gnomad_local_ancestry

Fix collapse_ancestry1.py and plot_karyogram1.py

Opened this issue · 0 comments

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.