Question: Haplotypic diversity with pegas package error
0
gravatar for mimi
2.2 years ago by
mimi20
mimi20 wrote:

Hello,

I'm trying to use haploNet function of {pegas} to plot a haplotype network, but i`m 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
ADD COMMENTlink modified 7 months ago by mernster0 • written 2.2 years ago by mimi20

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

ADD REPLYlink written 2.2 years ago by zx87549.3k

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

ADD REPLYlink written 2.2 years ago by mimi20

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?

ADD REPLYlink modified 7 months ago • written 7 months ago by mernster0

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

ADD REPLYlink modified 4 months ago • written 4 months ago by johntlovell10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1075 users visited in the last hour