r - How to select a genetic distance range to plot a mst using vengan library -
i've tried perform genetic distance analysis using ape , vegan. first of calculated genetic distances using ape:
data<-read.dna(file = "proof.txt", format = 'fasta') d <- dist.dna(data, model ='tn93', as.matrix ='true')
this code gives me huge matrix d = 0
in many cases. then, perform mst follows:
mst <-spantree(distances, toolong = 0.015)
i chose toolong
select max parwise distances = 0.015
but when i've tried plot it, error apeared:
error in fun 8d, y):zero or negative distances between objects 1 , 2
does know how choose distances larger "0" , >= 0.015?
supply configuration on plot spanning tree.
the error message comes function mass::sammon()
used find configuration of points if none given, , function not accept 0 distances. instance, following should work:
plot(mst, ord = cmdscale(as.dist(dist.dna)))
Comments
Post a Comment