Skip to content
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

alt allele assignment for heterozygous SNP site instead of IUPAC codes #23

Closed
kumarsaurabh20 opened this issue May 1, 2020 · 4 comments

Comments

@kumarsaurabh20
Copy link

Hi,

is it possible with the current script to assign alternate allele for all heterozygous sites, instead of IUPAC codes? With the default, while trying to translate the converted phylip file, many stop codons are appearing in the alignment because of IUPAC codes and its a painful process to correct 1-2 million SNPs. Any suggestions? I am sure it won't be difficult to add this functionality as an option.

Many thanks.

Kumar

@edgardomortiz
Copy link
Owner

That sounds feasible, however I will be able to work on it in a couple of days. I will keep you updated.

@kumarsaurabh20
Copy link
Author

Many thanks Edgardo.

@edgardomortiz
Copy link
Owner

edgardomortiz commented May 12, 2020

Hi, I was working on the code when I found an edge case:
REF=A, and ALT=C,T, then I find some heterozygote genotypes CT which are both ALT, what behavior would you propose in that case? picking one of the ALT randomly would be acceptable?, in that case why not choose also randomly between REF and ALT...

@edgardomortiz
Copy link
Owner

I guess the most logical option is to randomly resolve the genotype when is not homozygous, especially when working with polyploids.

I went ahead and pushed an update with a new option -r or --resolve-IUPAC that chooses a nucleotide from a heterozygous genotype at random to avoid IUPAC ambiguities in the output matrices.

Check it out and tell me if it fits your purposes ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants