emmanuelparadis / pegas

Population and Evolutionary Genetics Analysis System
GNU General Public License v2.0
28 stars 10 forks source link

Problem ploting haplonet with mutations as dots (show.mutation=2) #63

Closed Juanphg closed 2 years ago

Juanphg commented 2 years ago

Hello, First I would like to thank for pegas and ape, really makes easy analyzing and ploting the data. Now, I'm using pegas to plot a haploNet, but I'm having an issue when trying to plot the mutations as dots, I get a plot but without the pies: This is the command: plot(hmgb.sc.net, size=attr(hmgb.sc.net,'freq'), show.mutation=2,labels =F, scale.ratio=10, pie = hmgb.sc.ind.hap, xy=hmgb.cs.XY, bg=colors.hmgb.sc) this is the error I get: Error in .labelSegmentsHaploNet(xx, yy, altlink[s, 1:2, drop = FALSE], : argument "scale.ratio" is missing, with no default but as you see in the plot command I'm specifying scale.ratio. I also tried with different values for the parameter but it did not work. This is the plot: image

This is the plot when I change the mutation to the default value, show.mutation=1. I want to change to dots because in this case, the bars are too wide. image

Thanks in advance for your help, Kind regards, Juan Pablo

emmanuelparadis commented 2 years ago

Hi. Thanks for the appreciation! Did you install the version of pegas from GitHub? I fixed a bug recently about scale.ratio. You can type in R packageVersion("pegas"). The version on CRAN is 1.0.1. The version 1.0.2 has some bug fixes. Cheers,

Juanphg commented 2 years ago

Thanks for your help. I downloaded the file form github and now I have the version 1.0.3. It worked without problem. Cheers,