[adegenet-forum] Reading SNP data as a genind oblect

Grant Gillis grant.j.gillis at gmail.com
Thu Jun 21 14:22:40 CEST 2012


Dear List,

I have SNP data structured as below.  This seems to be accepted as a genind
object however the obj at tab suggests to me something strange is going on.
 Too many alleles per locus.  Any tips as to where I'm going wrong would be
much appreciated.

Cheers,
Grant



> dat <- structure(c("A", "A", "A", "G", "G", "G", "A", "G", "NA", "G",
+ "G", "NA", "A", "A", "A", "A", "G", "A", "A", "C", "A", "A",
+ "C", "C"), .Dim = c(3L, 8L), .Dimnames = list(c("genot. 1", "genot. 2",
+ "genot. 3"), c("1", "1", "2", "2", "3", "3", "4", "4")))


         1   1   2    2    3   3   4   4
genot. 1 "A" "G" "A"  "G"  "A" "A" "A" "A"
genot. 2 "A" "G" "G"  "G"  "A" "G" "C" "C"
genot. 3 "A" "G" "NA" "NA" "A" "A" "A" "C"
>
>
>


> obj <- df2genind(dat, ploidy=2, missing = NA)
>
>
> obj at tab
  L1.1 L1.2 L1.3 L1.4 L2.1 L2.2 L2.3 L2.4 L2.5 L3.1 L3.2 L3.3 L3.4 L3.5
L4.1 L4.2 L4.3 L4.4 L4.5 L4.6
1  0.5  0.5  0.5  0.5  0.5  0.5  0.0  0.5  0.5  0.5  0.5  0.5  0.5  0.0
 0.5  0.5  0.0  0.5  0.5  0.0
2  0.5  0.5  0.5  0.5  0.5  0.0  0.5  0.5  0.5  0.5  0.5  0.5  0.0  0.5
 0.5  0.0  0.5  0.5  0.0  0.5
3  0.5  0.5  0.5  0.5   NA   NA   NA   NA   NA  0.5  0.5  0.5  0.5  0.0
 0.5  0.5  0.0  0.5  0.0  0.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120621/37bad303/attachment.html>


More information about the adegenet-forum mailing list