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

DNAbin2genind and ambiguity codes from Fasta #336

Open
burbrink opened this issue Sep 19, 2022 · 1 comment
Open

DNAbin2genind and ambiguity codes from Fasta #336

burbrink opened this issue Sep 19, 2022 · 1 comment

Comments

@burbrink
Copy link

Hello,

It seems that when I read fasta files with ambiguity codes for heterozygous states (e.g., w = A/T) using DNAbin2genind this is coded as NA in the genind object. Unfortunately, other functions doing this at the genome scale that also rely on this (e.g., multidna2genind) also pass this as NA to the genind object. Do you know of any fix for this?

Thanks so much!

Frank

@zkamvar
Copy link
Collaborator

zkamvar commented Sep 27, 2022

Hello,

I'm not sure why, but DNAbin2genind always assumed haploid sequences for FASTA, which you can see here:

res <- genind(temp, ploidy=1, pop=pop, type="codom")

I believe that modifying DNAbin2genind with a flag that allows for heterozygous sites is possible. Would you like to make a pull request for this functionality?

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

No branches or pull requests

2 participants