[adegenet-forum] conversion genind to loci

Virgilio Massimiliano massimiliano.virgilio at africamuseum.be
Mon Apr 6 15:48:32 CEST 2015


hi,
I’m trying to make a bootstrapped njt on msat data,
as far as I can understand, it’s not possible to bootstrap my loci starting from a genind object and this:

myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx)  njs(dist(xx)))

shouldn’t be correct as it bootstraps alleles (data_genind at tab)


So I’m trying to convert my genind data into loci using genind2loci and read.loci :


library(adegenet)
data <- read.genetix("data.gtx")
data_loci<-genind2loci(data)
write.csv(data_loci, file = "data_loci.csv")
library(pegas)
data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",")

and then get the tree (based on Fst, but it doesn’t work either with distances)

pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE)

library(ape)
njtreFst_pop <- njs(pairFst)
myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, function(xx)
  njs(dist(xx)))

but it doesn’t seem to work (I’m attaching the input file) and I get only error messages no matter what I try...

What am I doing wrong? Is there a simpler way of getting bootstrapped msat loci starting form a genind object?

greeting and many thanks in advance

Massi



__________________________________
 Massimiliano Virgilio, PhD

Royal Museum for Central Africa

Joint Experimental Molecular Unit (JEMU)

Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366

massimiliano.virgilio at africamuseum.be<mailto:massimiliano.virgilio at africamuseum.be>

http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/

http://jemu.myspecies.info







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150406/58a316bc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.gtx
Type: application/octet-stream
Size: 9156 bytes
Desc: data.gtx
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150406/58a316bc/attachment.obj>


More information about the adegenet-forum mailing list