[adegenet-forum] adegenet-forum Digest, Vol 80, Issue 2

Virgilio Massimiliano massimiliano.virgilio at africamuseum.be
Tue Apr 7 16:53:19 CEST 2015


Hi Zhian,

many thanks for your answer,

The problem with aboot it that it calculates distances among individuals
(and I have some 800 individuals) but not among populations.

The reason I was using pairwise.fst of adegenet was that it has a pop
argument, similarly dist.genpop works with populations.

Or do you have a way of using aboot on populations?

Cheers 

M.


On 07/04/15 16:10, "Zhian Kamvar" <zkamvar at gmail.com> wrote:

>Hello,
>
>I have solved this problem in the package "poppr"
>(http://cran.r-project.org/package=poppr). The function "aboot" will
>calculate bootstrapped nj and upgma trees for any genetic distance
>(http://rpackages.ianhowson.com/cran/poppr/man/aboot.html) (see the
>second example).
>
>It doesn't do njs at the moment, but I can easily make a patch for that.
>
>Cheers,
>Zhian
>
>
>> On Apr 7, 2015, at 03:00 ,
>>adegenet-forum-request at lists.r-forge.r-project.org wrote:
>> 
>> Send adegenet-forum mailing list submissions to
>> 	adegenet-forum at lists.r-forge.r-project.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 
>>	https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-fo
>>rum
>> 
>> or, via email, send a message with subject or body 'help' to
>> 	adegenet-forum-request at lists.r-forge.r-project.org
>> 
>> You can reach the person managing the list at
>> 	adegenet-forum-owner at lists.r-forge.r-project.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of adegenet-forum digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. conversion genind to loci (Virgilio Massimiliano)
>> 
>> 
>> ----------------------------------------------------------------------
>> 
>> Message: 1
>> Date: Mon, 6 Apr 2015 13:48:32 +0000
>> From: Virgilio Massimiliano <massimiliano.virgilio at africamuseum.be>
>> To: "adegenet-forum at lists.r-forge.r-project.org"
>> 	<adegenet-forum at lists.r-forge.r-project.org>
>> Subject: [adegenet-forum] conversion genind to loci
>> Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65 at africamuseum.be>
>> Content-Type: text/plain; charset="utf-8"
>> 
>> 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 africa
>>museum.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-0001.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-0001.obj>
>> 
>> ------------------------------
>> 
>> _______________________________________________
>> 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-for
>>um
>> 
>> End of adegenet-forum Digest, Vol 80, Issue 2
>> *********************************************
>



More information about the adegenet-forum mailing list