-
Notifications
You must be signed in to change notification settings - Fork 35
Consider standardizing the API of pca and pc_relate #1077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @ravwojdyla and @eric-czech in case they have thoughts |
@timothymillar the sgkit |
+1 to standardizing as much as possible as well, but it will be important to keep in mind that the default IIRC this was to replicate scikit-allel PCA and get close to parity with hwe_normalized_pca by default. If we wanted to make this more generic so that it could run on dosages, then I would suggest this:
Ditto! Let me know if any of that isn't clear or you see a better way. |
Thanks @eric-czech, So, we could have a general API where the default variable is |
These were implemented early on, before the schema/variables where standardized. I'm not sure if there's any appetite to update them, but here are a few observations:
Both use custom methods to calculate an equivalent to
call_dosage
.pca
creates an undocumented variable called"call_alternate_allele_count"
fromcall_allele_count
(line)call_genotype
(line)call_dosage
variablecall_dosage
could be automatically computed fromcall_genotype
for backwards compatibility, see Addcount_call_alternate_alleles
function #282pc_relate
does its own filtering by MAF. This doesn't seem to be the approach taken elsewhere, but I'm not sure that we have a "standard" approach to filtering?I was looking at the implementation after considering having
"pc-relate"
as an estimator option ingenomic_relationship
. AFAICT this should work so long as asample_pc
parameter was added (similar toancestral_frequency
for the VanRaden estimator). This would return relationships (as opposed topc_relate_phi
which is an estimate of kinship).The text was updated successfully, but these errors were encountered: