bodkan / admixr

An R package for reproducible and automated ADMIXTOOLS analyses
https://bodkan.net/admixr
Other
28 stars 9 forks source link

admixr result #49

Closed smallfishcui closed 4 years ago

smallfishcui commented 4 years ago

Hi,

I saw a closed issue showing the same problem but the user solved the problem him/herself. I used converf to convert my vcf file to the required format, and the snp count seems to be normal: id sex label present

1 Y1 U AU 205117 2 Y3 U Med 204909 3 Y4 U EU 200972 4 Y6 U AU 201144 5 Y7 U Usland 197303 However the D stat seems to be not working at all: > test1 <- d(W = "EU", X = "CN", Y = "Usnat", Z = "OG", data = snps) > test1 # A tibble: 1 x 10 W X Y Z D stderr Zscore BABA ABBA nsnps 1 EU CN Usnat OG 0 1 0 0 0 0 Any guess about the problem? thanks, Cui
bodkan commented 4 years ago

Hi, sorry for the delay. I keep having problems getting notifications on Github issues.

Is there any chance you could share:

Someone else contacted me recently reporting the same problem (0 value D statistic, Zscore 0 etc). They fixed the problem on their end (the cause was apparently incorrectly formatted EIGENSTRAT data - either snp or geno file). I have not heard from them since then so I can't give any more details, but my bet would be that something is wrong with the VCF -> EIGENSTRAT conversion.

smallfishcui commented 4 years ago

Hi Martin, Thank you for the reply. Yes, the problem still exist even if i use a small set of SNPs. Problem with my data is I have polyploids individuals, and there seems to be excessive amount of homozygous sites-I am not sure if that caused the issue. However, I don't think this is caused by the admixr package, because the same thing happens when I used the admixtools software....

best, Cui

bodkan commented 4 years ago

Hi, in general, I'd say that a good indication that a problem X is something admixr cannot solve is whether it persists even when running base ADMIXTOOLS. If that's the case, there's hardly anything we can do about it. :( Like in this case, polyploidy is not something ADMIXTOOLS understands (an individual can either have 0, 1 or 2 alternative alleles). I will close this issue for now but will keep this in mind in case there are future developments..