Oscar:

Oscar Franzén wrote on 17/03/2010 17:55:
Dear all,

I'm trying to use the boot.phylo function in the ape package to get
bootstrap values for my NJ-tree which is based on a clustalw alignment.
Basically what I'm doing is this:

library(ape)
library(seqinr)

an = read.alignment("file.aln", format="clustal")
an.dist = dist.alignment(an)
an.nj = nj(an.dist)

qwe = as.DNAbin(an)

any(is.na(an.dist))
[1] FALSE

If I call boot.phylo this happens:

You should use in boot.phylo the same function used to estimate the tree 'an.nj', but that's not what you did below.

Besides, I suspect that your alignment is of AA, not DNA. If true, you can't use dist.dna.

Emmanuel

for (i in 1:5) boot.phylo(an.nj, qwe, function(xx) nj(dist.dna(xx)))
Error in nj(dist.dna(xx)) :
  missing values are not allowed in the distance matrix
 boot.phylo(an.nj, qwe, function(xx) nj(dist.dna(xx)))

 *** caught segfault ***
address 0x9c11039, cause 'memory not mapped'

Traceback:
 1: .C("dist_dna", x, n, s, imod, double(Ndist), BF,
as.integer(pairwise.deletion),     as.integer(variance), var,
as.integer(gamma), alpha, DUP = FALSE,     NAOK = TRUE, PACKAGE = "ape")
 2: dist.dna(xx)
 3: nj(dist.dna(xx))
 4: FUN(x[, boot.samp])
 5: boot.phylo(an.nj, qwe, function(xx) nj(dist.dna(xx)))

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:

But the weird thing is that it sometimes works:

boot.phylo(an.nj, qwe, function(xx) nj(dist.dna(xx)))
Error in nj(dist.dna(xx)) :
  missing values are not allowed in the distance matrix
boot.phylo(an.nj, qwe, function(xx) nj(dist.dna(xx)))
  [1] 100   0   0   0  11   0   0   0   0   0   0   0   0   0   0  18  26
0
 [19]   0   7   0   0   0   0   0  16   0   1   0   0  16   4   0   7   0
0
 [37]   0   3   0   8  21   6   0   0   0  18   0   0   0   3   0   0  13
13
 [55]   0  16   3  13  48  66   0   1   0   0   0  15   0   3  25   0   4
0
 [73]   0  19  11   0  33   1  28   0   8  15   1  15  29  34   0  15   8
0
 [91]  29   4   3  11   0   7   1  16   3   6   6  13  10  19  25

Can this be a bug in R/boot.phylo or could the error be located in my
dataset? My dataset is a gene family consisting of around 100 members.

I just upgraded to R v2.10.1, and the problem remains.

Thanks in advance,
Oscar

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


--
Emmanuel Paradis
IRD, Montpellier, France
  ph: +33 (0)4 67 16 64 47
 fax: +33 (0)4 67 16 64 40
http://ape.mpl.ird.fr/

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to