emmanuelparadis / pegas

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

Alternative links - placement of mutation ticks #81

Closed naurasd closed 1 year ago

naurasd commented 1 year ago

Hi,

I noticed that the mutation ticks are placed in two different ways on the links between haplotypes, depending on if it's an alternative or regular link.

In the network below, check the alternative link between ASV39 (the largest one) and ASV1358. You can see that the mutation ticks are placed on the center of a line between the CENTERS of both haplotypes so the ticks have and equal distance to the CENTERS of each haplotype. However, mutation ticks of regular links seem to be placed on the center of a line between the EDGE of haplotypes so the ticks have and equal distance to the EDGE of each haplotype.

grafik

Unfortunately, in this way, the mutation ticks of alternative links seem a bit out of place. Is there a way to have them drawn with an equal distance from the edges of two haplotypes instead of from the centers of two haplotypes?

Cheers

Nauras

emmanuelparadis commented 1 year ago

This is fixed. I've pushed a new version here (1.2-0.2). You'll need to re-install from GitHub because the changes are in internal functions. Cheers,

naurasd commented 1 year ago

Thanks, much appreciated.

I tried

devtools::install_github("emmanuelparadis/pegas")

but this gave an error

Downloading GitHub repo emmanuelparadis/pegas@HEAD
Error: Failed to install 'pegas' from GitHub:
  Does not appear to be an R package (no DESCRIPTION)

What do I need to do in order to install from Github?

emmanuelparadis commented 1 year ago

You need to double 'pegas':

devtools::install_github("emmanuelparadis/pegas/pegas")
naurasd commented 1 year ago

Worked, thanks ;-)

naurasd commented 1 year ago

Hi,

i just realized that with the new version, this works for mutation ticks. But with show.mutaion = 2 for example, this is still not working.

Cheers Nauras

emmanuelparadis commented 1 year ago

Hi, This should be fixed. I've pushed here (same version number but new date). Cheers, Emmanuel

naurasd commented 1 year ago

Works perfectly ;-) Thanks