Bug report 2015-07-13:
A bug was discovered in read.genalex that prevented missing data from being
imported. A fix was written and will be uploaded soon. In the meantime, please use
Below is an example of how to install the fix within R:
library("poppr")
data(nancycats)
outfile <- tempfile()
genind2genalex(nancycats, outfile)
## Extracting the table ... Writing the table to /var/folders/qd/dpdhfsz12wb3c7wz0xdm6dbm0000gn/T//RtmpGojara/file262234cd650e ... Done.
summary(read.genalex(outfile)) # no missing data!
##
## # Total number of genotypes: 237
##
## # Population sample sizes:
## P01 P02 P03 P04 P05 P06 P07 P08 P09 P10 P11 P12 P13 P14 P15 P16 P17
## 10 22 12 23 15 11 14 10 9 11 20 14 13 17 11 12 13
##
## # Number of alleles per locus:
## fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37
## 16 11 10 9 12 8 12 12 18
##
## # Number of alleles per population:
## P01 P02 P03 P04 P05 P06 P07 P08 P09 P10 P11 P12 P13 P14 P15 P16 P17
## 36 53 50 67 48 56 42 54 43 46 70 52 44 61 42 40 35
##
## # Percentage of missing data:
## [1] 2.344116
##
## # Observed heterozygosity:
## fca8 fca23 fca43 fca45 fca77 fca78 fca90
## 0.6682028 0.6666667 0.6793249 0.7083333 0.6329114 0.5654008 0.6497890
## fca96 fca37
## 0.6184211 0.4514768
##
## # Expected heterozygosity:
## fca8 fca23 fca43 fca45 fca77 fca78 fca90
## 0.8657224 0.7928751 0.7953319 0.7603095 0.8702576 0.6884669 0.8157881
## fca96 fca37
## 0.7603493 0.6062686
Installing the fix (should use devtools):
both_identical <- identical(summary(read.genalex(outfile), verbose = FALSE), summary(nancycats, verbose = FALSE))
both_identical
## [1] TRUE
I apologize any inconvenience this may have caused anyone
Cheers,
Zhian