[adegenet-forum] Here is code for converting a GENIND OBJECT to a STRUCTURE FILE

Andrew Kinziger Andrew.Kinziger at humboldt.edu
Fri Apr 23 17:00:27 CEST 2010


Hi Thibaut,

I developed the following code to translate a GENIND object to a 
Structure file.

###STEPS TO WRITE STRUCTURE FILE###
x <- as.loci(hybrid.df) ###CONVERSION OF GENIND OBJECT TO LOCI OBJECT####
write.loci(x, file = "project_data", loci.sep ="\t", quote = FALSE, 
allele.sep ="\t", na ="-9\t-9", col.names = FALSE) ###WRITE STRUCTURE 
DATA FILE####

The as.loci and write.loci functions are in the package Pegas.

Andrew Kinziger


More information about the adegenet-forum mailing list