[BioC] boot.phylo( ) function

Martin Morgan mtmorgan at fhcrc.org
Wed Mar 21 17:37:58 CET 2007


Hi Nora --

I do not have direct experience with this package, but from the help
page

> library(ape)
> ?boot.phylo

perhaps

allbacteria <- read.dna("allbacteriafasta","fasta")
distallbacteria <-
  dist.dna(allbacteria, pairwise.deletion=TRUE, as.matrix=TRUE)
njtree <- nj(distallbacteria)

boot.phylo(njtree,
           allbacteria,
           FUN=function(bootstrappedData) {
               nj(dist.dna(bootstrappedData,
                           pairwise.deletion=TRUE,
                           as.matrix=TRUE))
           })

works?

Martin

Nora Muda <noramuda at yahoo.com> writes:

> Dear BioConducter useRs,
>  
> I have problems in writing boot.phylo() function. 
>  
> Let say I have 30 aligned sequences; then I computed
> pairwise distances with "K80" method. Then I construct
> phylogenetic tree with neighbor-joining method and my
> proposed method. Now I have problems in writing "FUN"
> in boot.phylo() function. Below are examples of my
> programs:
>  
> library(ape)
> allbacteria <- read.dna("allbacteriafasta","fasta")
> distallbacteria <-
> dist.dna(allbacteria,pairwise.deletion=TRUE,as.matrix=TRUE)
> plot(nj(distallbacteria))
>  
> boot.phylo(plot(nj(distallbacteria)),allbacteria,nj(distallbacteria))
>  
> What should I put as FUN in boot.phylo?
>  
> I make comparison between distances of "K80" in PHYLIP
> and dist.dna("K80").There are a lot of differences esp
> in PHYLIP there is a default for
> transversion/transition rate; which is 2 but not in
> ape package. How to modify it to make it the same?
>  
> Hope you all may help. Your attention are really
> appreciated.
>  
>  
> Regards,
> Nora.
>
>
>
>
>  
> ____________________________________________________________________________________
> Be a PS3 game guru.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list