[adegenet-forum] Discrepancy in NA counts
roman.lustrik at biolitika.si
Mon Nov 28 08:31:07 CET 2016
can you share a (subset) of the dataset? It's hard to pinpoint where things might be going wrong without some data in hand.
In god we trust, all others bring data.
From: "Biz Sheedy" <biz.sheedy at gmail.com>
To: adegenet-forum at lists.r-forge.r-project.org
Sent: Friday, November 25, 2016 10:44:16 AM
Subject: [adegenet-forum] Discrepancy in NA counts
I am trying to read SNP data from Stacks into adegenet. I have tried read.structure and read.genepop but they both give (the same) NA counts that are higher than expected. Using read.table on the structure-formatted file (with "ind" and "pop" inserted into the first two columns of row one) gave the expected number of missing data.
I looked at a single population subset (both the original and the converted data) in excel and found a locus where in the original data, all nine individuals were "3", but in the converted data one individual was "NA". The loci before and after this one both matched/were correct.
I am not sure what I have missed for this to happen, my R skills are beginner at best. Any help with reading the data in correctly would be greatly appreciated!
R version 3.3.2
adegenet version 2.0.1
Data: 44 individuals, diploid, 4279 loci.
Total cells in excel: 376552
After read.structure/genepop: 44*8558=376552
0s in excel: 3952
0s after read.table; length(which(X==0)): 3952
NA after read.structure/genepop; sum( is.na (all$tab)): 4008
Total cells: 77022
After read.structure/genepop: 9*8558=77022
0s in excel: 742
NA after read.structure/genepop; sum( is.na (chi$tab)): 756
Department of Botany
National Museum of Nature and Science
Tsukuba, Ibaraki 305-0005
biz.sheedy at gmail.com
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the adegenet-forum