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

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
R haplotypic diversity genomic phylogeny • 1.3k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
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)

ADD REPLY
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?

ADD REPLY
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

ADD REPLY

Login before adding your answer.

Traffic: 1693 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6