You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues with variant time==freq for non-biallelic variants #228
At the moment we assume a time for a variant used for inference equal to the total count of derived variants among the samples. This doesn't necessarily make sense for triallelic or greater variants.
It's not much of an issue at the moment, because any sites with num_alleles>2 are marked with inference=False. So we don't bother actually checking if there are > 2 non-missing values in the genotypes array. If we did, we could potentially mark some extra sites for inference (triallelic, but where one of the derived alleles is not present in any of the samples). Experimenting with numpy, the fastest way to do this is to use np.bincount(), not (as might initially be thought) np.unique()
With missing data, we can now cope with multi allelic variants, as long as we know the ancestral state, by simply setting the lowest frequency alleles to missing, and leaving only the ancestral allele and the highest frequency allele as non-missing in the sample_data file. A bit of a hack, but at least we are using some of the information.
Activity
hyanwong commentedon Mar 27, 2020
It's not much of an issue at the moment, because any sites with num_alleles>2 are marked with inference=False. So we don't bother actually checking if there are > 2 non-missing values in the genotypes array. If we did, we could potentially mark some extra sites for inference (triallelic, but where one of the derived alleles is not present in any of the samples). Experimenting with numpy, the fastest way to do this is to use
np.bincount(), not (as might initially be thought)np.unique()hyanwong commentedon Nov 26, 2020
With missing data, we can now cope with multi allelic variants, as long as we know the ancestral state, by simply setting the lowest frequency alleles to missing, and leaving only the ancestral allele and the highest frequency allele as non-missing in the sample_data file. A bit of a hack, but at least we are using some of the information.