Genlight objects assign specimens to populations based on information in the
ind.metadata file provided when the genlight object is first generated.
Often one wishes to subset the data by deleting populations or to amalgamate
populations. This can be done with a pop.recode table with two columns. The
first column is the population assignment in the genlight object, the second
column provides the new assignment.
This script will input an existing reassignment table for editting and
optionally save it as a new table, or if the name of an input table is not
supplied, will generate a table using the population assignments in the
parent genlight object.
The script, having deleted populations, identifies resultant monomorphic loci or loci
with all values missing and deletes them (using gl.filter.monomorphs.r)
The script returns a genlight object with the new population assignments.