Dear Gontran,

for short sequences such a result can happen. Maybe you check whether
any values in
dist.dna(seq100b, model = "raw")
are close to 0.75.
I suspect that some elements in this distance matrix are close to 0.75
than pairwise distances for the bootstrap samples are likely to be
equal or greater than 0.75. Most models ("K80", "JC69" etc.) are not
defined for distances >=0.75 and will return Inf or NaN (the 0.75 can
vary a bit, depending on the substitution model). bionj of course does
not like building trees from infinite values as input. With short
sequences the variances are of course larger and you are more likely
to observe this, that's why your larger data set works fine.
However in this cases NaN or Inf are the correct results!
It would be nice to catch this "error" with a try and use only trees
from finite distance matrices or set infinite values to a large value.
But one should return a warning as these samples are likely to be
biased.

Kind regards,
Klaus




On 3/15/11, Gontran Sonet <gontran.so...@naturalsciences.be> wrote:
>
> Dear all,
> When I make a bootstrapping analysis of relatively short DNA sequences
> (100bp), I have an error message:
> Error in bionj(dist.dna(seq100b, model = "K80", pairwise.deletion =
> FALSE,  :
>    NA/NaN/Inf in foreign function call (arg 1)
>
> I am not able to solve the problem since:
> 1)This "short sequence" data set is part of a larger data set where
> bootstrapping works perfectly using the same commands:
>>
> mytre<-bionj(dist.dna(seq100b,model="K80",pairwise.deletion=FALSE,as.matrix=TRUE))
>>  boot.phylo(mytre,seq100b,FUN=function(seq100b) {
> bionj(dist.dna(seq100b,model="K80",pairwise.deletion=FALSE,
> as.matrix=TRUE))})
>
> 2)The problematic data set doesn't contain any "-" or "?" or "N", or
> ambiguities and the dist.dna() doesn't produce any "NA" or missing value.
>>seq100b
> 396 DNA sequences in binary format stored in a matrix (.
> All sequences of same length: 100
> Labels: XX, XX, XX
> Base composition:
>      a     c     g     t
> 0.224 0.281 0.222 0.273
>
> 3)This data set also works in other programs (like Mega) without any
> problem.
>
> Thank you very much for your help
>
> Gontran Sonet
>
> _______________________________________________
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>


-- 
Klaus Schliep
Université Paris 6 (Pierre et Marie Curie)
9, Quai Saint-Bernard, 75005 Paris

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

Reply via email to