[adegenet-forum] Discrepancy in NA counts
Biz Sheedy
biz.sheedy at gmail.com
Fri Nov 25 10:44:16 CET 2016
Dear All,
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!
Thank you,
Elizabeth
R version 3.3.2
adegenet version 2.0.1
Data: 44 individuals, diploid, 4279 loci.
all<-read.structure("all_batch_1.stru", NA.char="0")
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
Difference: 56
Subset Chichi
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
Difference: 14
--
4-1-1 Amakubo
Department of Botany
National Museum of Nature and Science
Tsukuba, Ibaraki 305-0005
Japan
biz.sheedy at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20161125/2e3b487b/attachment-0001.html>
More information about the adegenet-forum
mailing list