Genpop file format for LOSITAN
1
1
Entering edit mode
9.7 years ago
Tohamy ▴ 80

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,

next-gen R • 1.9k views
ADD COMMENT
0
Entering edit mode
9.7 years ago
David W 4.9k

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)
ADD COMMENT

Login before adding your answer.

Traffic: 1463 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6