ComparativeGenomicsToolkit / cactus

Official home of genome aligner based upon notion of Cactus graphs
Other
523 stars 111 forks source link

try to orient bar jobs on reference to left-align downstream #1248

Open glennhickey opened 11 months ago

glennhickey commented 11 months ago

minigraph-cactus VCFs are not left-aligned, which could be confusing to people who expect that.

This PR tries to address this by orienting BAR jobs in the direction of the reference genome, under the assumption that abPOA will then take care of left aligning. It does so my changing the getDominantEnd() function to use strand information to break ties. So if two ends both have the maximum number of adjacencies, it'll pick the end that has the most adjacencies coming out of it in the forward orientation. In pangenome mode, it will prioritize adjacencies that are forward on the reference event.

The problem is that it doesn't appear to do much on the yeast pangenome test. Here's the output of bcftools norm -f for the master branch, using the reference-guided orientation ref-adj, and the orientation of all ajdacencies (all-adj)

ref-adj    Lines   total/split/realigned/skipped:   161479/0/3877/0
all-adj    Lines   total/split/realigned/skipped:   161479/0/3876/0
master     Lines   total/split/realigned/skipped:   161479/0/3938/0

Adding either heuristic only increases left alignment by about 2.5%, with no advantage of giving the reference special treatment over just using all the adjacencies.