[adegenet-forum] conversion genind to loci
Thibaut Jombart
t.jombart at imperial.ac.uk
Tue Apr 7 14:54:38 CEST 2015
Hi there,
as this question is also pegas-related, it may be better suited on
R-sig-genetics (I am not sure Emmanuel Paradis reads the adegenet forum):
https://stat.ethz.ch/mailman/listinfo/r-sig-genetics
This list was typically a bit of a deadland but we are trying to
resurrect it.
Cheers
Thibaut
On 06/04/15 14:48, Virgilio Massimiliano wrote:
> 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
>
>
>
>
>
>
>
>
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150407/42538c4f/attachment.html>
More information about the adegenet-forum
mailing list