Genpop file format for LOSITAN
Dear alls,
I am going to use LOSTIAN software to detect the FST outliers but it needs the input file in Genpop format. I have made Genpop object, in adegenet package, but I do not know how can I write Genopo format from Genopo object.
Any Help will be appreciated.
best,
• 2,252 views
•
link
1 answer
As far as I know there are no functions to export datasets in genpop format. `
You should check out the results of genind2df, which makes a table that can be tweaked to something like the genpop format. I haven't tested the below, but it should get you close enough to see what else needs doing:
gp <- genind2df(nancycats)
gp[,1] <- paste(gp[,1], ",", sep="")
gp[is.na(gp)] <- '000000'
nloc <- dim(gp)[2] -1
gp_table <- rbind( c("", paste(names(gp)[2:nloc+1], ",", sep="")),
c("POP", rep("", nloc)),
gp)
write.table(gp_table, "nancycats.gp", quote=FALSE, row.names=FALSE, col.names=FALSE)
• 0 views
•
link
Log in to answer this question.