Title says most of it. I feel like
hwe_normalized_pca could output the frequency it uses to center alongside the loadings. I’m doing this for downstream projection, which presumably is most of the use cases for outputting the loadings in the first place.
Right now my process looks like:
eig, scores, loadings = hl.hwe_normalized_pca(mt) mt = mt.annotate(af=hl.agg.call_stats(mt.GT, mt.alleles).AF) loadings = loadings.annotate(af=mt[loadings.locus])
But this seems silly and wasteful.