EricArcher / strataG

strataG is a toolkit for haploid sequence and multilocus genetic data summaries, and analyses of population structure.
25 stars 12 forks source link

enhancement request: gtypes2genind add Lat/Lon data #32

Closed PAMorin closed 4 years ago

PAMorin commented 4 years ago

Latitude and Longitude data can be added to a gtypes object in the 'other' object, but the gtypes2genind function doesn't transfer the Lat/Lon data. Currently, I have to convert back to a dataframe, combine alleles to a single column, add the locus names, use the Adegenet function df2genind to create the genind object, then add the lat/lon data from the dataframe to the genind object. Can the gtypes2genind function be modified to include other/xy for lat/lon data?

EricArcher commented 4 years ago

gtypes2genind and genind2gtypes now copy the data in the 'other' slot for each other.