Changes in version 1.3-1 The internal function .ulal1loc has been added. This function finds all unique alleles at a single locus. genambig.to.genbinary has been changed to use this function, resulting in about a 3% reduction in processing time. The function alleleDiversity has been added. alleleDiversity finds and counts unique alleles in a dataset. The functions read.STRand and gendata.to.genind have been added. Changes in version 1.3-0 Ploidies can now be indexed by sample, locus, both, or neither. To accomplish this, the 'Ploidies' slot of a "gendata" object must now be an object of the class "ploidysuper", a virtual class which includes four new classes called "ploidymatrix", "ploidysample", "ploidylocus", and "ploidyone". Generic functions 'pld', 'pld<-', and 'plCollapse' have been defined with methods for these four new classes, in order to access and replace ploidy values and convert ploidy data between classes, respectively. The 'Ploidies' function now has 'sample' and 'locus' arguments so that ploidies can be retrieved in the same way regardless of how they are stored. 'reformatPloidies' is a new function for use on "gendata" objects, to change the class of the 'Ploidies' slot. The 'Loci' function now has a "ploidies" argument so that loci can be retrieved by ploidy, as could be done with samples in previous versions. Most functions in polysat have undergone minor changes in order to utilize the new flexibility in ploidy indexing. genotypeDiversiy, Simpson, Shannon functions: Calculations are now based on counts rather than frequencies, which in the case of the Simpson index, allows correction for sample size. genotypeDiversity: bug fix for cases in which a population only has one sample with non-missing data at a given locus. assignClones: bug fix for cases in which there is just one sample. 'Genotypes' method of "genbinary" class: Bug fixed that would have simplified the genotypes matrix to a vector if a locus had only one allele. This also fixes an issue that came up with 'genbinary.to.genambig'. 'genambig.to.genbinary' and 'genbinary.to.genambig' functions: Minor bug fix to prevent warning messages if nothing has been stored to the 'PopInfo' slot. Also, bug fix in 'genambig.to.genbinary' to allow for loci at which all data is missing. Changes in version 1.2-1 Bruvo2.distance function has been added. This calculates an alternate version of the distance measure of Bruvo et al. (2004), under the models of genome loss and/or addition. genotypeDiversity function: Default value of d has been changed to being calculated with Lynch.distance, since the default threshold value is 0 and Lynch.distance is faster. Bruvo.distance function: If both genotypes are equal to the missing data value, the distance returned is now NA instead of 0. read.GenoDive: Now correctly finds the "Individual" column, and uses it to extract sample names, whether or not a "Clones" column is included. read.GeneMapper: Sample and locus names may now consist of any combination of letters and numbers. (There had been a bug that caused an error if samples or loci were named with non-consecutive numbers.) Locus names are now allowed to be shorter versions of other locus names, e.g. "ABC1" and "ABC12". Fixed: 'Genotypes' method of "genbinary" class (this affects 'simpleFreq' and 'genbinary.to.genambig'), 'deleteLoci' method of "genbinary" class, 'Loci<-' method of "genbinary" class, 'deSilvaFreq', 'calcFst', 'write.freq.SPAGeDi', and 'freq.to.genpop'. Changes in version 1.2-0 The internal functions .G, .indexg, .genlist, .ranmul, and .selfmat have been added. Previously, these existed only within the environment of the deSilvaFreq function. They have been moved to the polysat package environment in order to be used for the calculation of genotype probabilities in additional functions (i.e. meandistance.matrix2). Functions genotypeProbs and meandistance.matrix2 have been added. This allows ambiguous genotypes to be dealt with in a more sophisticated way, calculating the probabiliity of each possible unambiguous genotype based on allele frequencies and selfing rate. Functions assignClones, genotypeDiversity, Shannon, and Simpson have been added. These use distance matrices to assign individuals to clonal groups, and calculate diversity indices based on genotype frequencies. Bruvo.distance function: Before any calculation is done, the function checks to see if usatnt is NA. If so, an error message is given telling the user to fill in the Usatnts slot. The error that the function would previously give in this case was not particularly informative. deSilvaFreq function: Now checks to see if the 'self' argument is missing before performing any calculations. This means that a more informative error message is given if the selfing rate is not provided. Also, the line smatt <- smat/smatdiv has been moved out of the while loop and is now performed immediately after the calculation of smat, to reduce computation time. Bug fix in write.GeneMapper. It can now write files correctly when there are more alleles than the ploidy of the individual. Changes in version 1.1-0 read.POPDIST, write.POPDIST, and freq.to.genpop functions added. read.Tetrasat function changed so that the comment line can't be accidentally read as a "Pop" line if it contains the letters "pop". The documentation for this function now also instructs the user not to have any locus name contain the letters "pop" adjacent to each other. write.Tetrasat function changed so that if the 'samples' argument excludes some populations, there won't be a "Pop" line for these populations. Changes in version 1.0-1 Bug fixed in the 'editGenotypes' method for "genambig" objects. stringsAsFactors=FALSE was added for the data frame that is sent to the 'edit' function, so that samples and loci are indexed correctly when genotypes are written back to the object that is returned. Version 1.0 would rearrange the genotypes if the samples or loci were not in alphabetical order. Changes in version 1.0 The S4 classes "gendata", "genambig", and "genbinary" and their accompanying methods have been added. This allows genotypes, population identities, population names, ploidies, microsatellite repeat lengths, and a description to all be stored in one object, while in version 0.1 they had to be stored in separate objects. Because of this, many of the functions require fewer arguments, and user error should be reduced. The functions 'viewGenotypes' and 'editGenotypes' have been added so that genotypes can be more neatly printed to the console, and can be edited with the Data Editor as an alternative to command-line genotype editing. The 'isMissing' function is added to simplify the identification of missing genotypes. The function 'estimatePloidy' now directly opens the Data Editor and then returns the ploidies to the appropriate slot in the "gendata" object. Previously, the function produced an array from which ploidies had to be manually extracted. The function 'distance.matrix.1locus' no longer exists since it has been consolidated into the 'meandistance.matrix' function. 'Lynch.distance' has a 'usatnt' argument added to it for the sake of simplifying the code for 'meandistance.matrix'; this argument is ignored by 'Lynch.distance'. The new function 'deSilvaFreq' performs an iterative computation to estimate allele freqencies in populations with uniform, even-numbered ploidy and a known selfing rate. The old function 'estimate.freq' is renamed 'simpleFreq'. A function 'write.freq.SPAGeDi' is added to export allele frequencies to SPAGeDi.