Haplotypic diversity with pegas package error
0
0
Entering edit mode
4.5 years ago
mimi ▴ 20

Hello,

I'm trying to use haploNet function of {pegas} to plot a haplotype network, but im having an error. I can't build a haplotype net with the following script:

library(pegas)
S<- read.dna(file = "C:/Users/.....file.fasta", format ="fasta")
h<-haplotype(S)
net<-haploNet(h)
plot(h)


Error :

Error in integrate(L_jm, 0, 1, j = i, m = M) : non-finite function value

R haplotypic diversity genomic phylogeny • 1.7k views
0
Entering edit mode

Did you manage to run it with example data provided with the package?

0
Entering edit mode

Yes, I used it, but there is no fault. I would like to calculate the haplotypic diversity of 100 aligned bacterial genomes. (fasta file)

0
Entering edit mode

I am struggling with the same issue. Did you get it solved?

I think it could be caused by the sequences being to long perhaps?

0
Entering edit mode

I also ran into this issue ... you should check and see if your distance matrix has any NA's in it. if fa is your DNAbin, d <- dist.dna(fa) wh.na <- is.na(d) tablewh.na)`

Purging sequences that gave NAs in the distance matrix solved my problem. John