[adegenet-forum] Here is code for converting a GENIND OBJECT to a STRUCTURE FILE
Jombart, Thibaut
t.jombart at imperial.ac.uk
Fri Apr 23 17:16:42 CEST 2010
Many thanks.
Cheers
Thibaut.
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of Andrew Kinziger [Andrew.Kinziger at humboldt.edu]
Sent: 23 April 2010 16:00
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] Here is code for converting a GENIND OBJECT to a STRUCTURE FILE
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
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
More information about the adegenet-forum
mailing list