Skip to content

Commit

Permalink
fix: remove extra dot on lower right corner (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane authored May 6, 2022
1 parent b8d7192 commit 270808c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# PhyloPlots: to plot phylogenetic trees and networks

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/dev)
[![Build status](https://github.com/cecileane/PhyloPlots.jl/workflows/CI/badge.svg?branch=master)](https://github.com/cecileane/PhyloPlots.jl/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/cecileane/PhyloPlots.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/cecileane/PhyloPlots.jl?branch=master)
[![codecov.io](http://codecov.io/github/cecileane/PhyloPlots.jl/coverage.svg?branch=master)](http://codecov.io/github/cecileane/PhyloPlots.jl?branch=master)

## overview
Expand All @@ -12,12 +13,10 @@ using plotting back-ends like [Gadfly](http://gadflyjl.org/stable/),
and through [R](https://www.r-project.org)
via [RCall](https://github.com/JuliaInterop/RCall.jl).

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/PhyloPlots.jl/dev)

## examples

in the documentation for [PhyloNetworks](http://crsl4.github.io/PhyloNetworks.jl/latest/), see
in PhyloPlots' documentation [manual](https://cecileane.github.io/PhyloPlots.jl/stable/man/getting_started/), and
in [PhyloNetworks](http://crsl4.github.io/PhyloNetworks.jl/latest/)'s documentation, see
- basic examples
[here](http://crsl4.github.io/PhyloNetworks.jl/latest/man/snaq_plot/#Network-Visualization-1)
- examples to annotate edges
Expand Down
5 changes: 4 additions & 1 deletion src/phylonetworksPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ function getEdgeNodeCoordinates(net::HybridNetwork, useEdgeLength::Bool, useSimp
cur_edge = pop!(cladewise_queue); # deliberate choice over shift! for cladewise order
# increment spacing and add to node_y if leaf
if getChild(cur_edge).leaf
node_y[findfirst(x->x===getChild(cur_edge), net.node)] = nexty
ni = findfirst(x->x===getChild(cur_edge), net.node)
node_y[ni] = nexty
node_yB[ni] = nexty
node_yE[ni] = nexty
nexty -= 1
end

Expand Down
20 changes: 10 additions & 10 deletions test/test_phylonetworkPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
[1.0, 2.0, 3.0, 2.5, 4.0, 5.0, 5.0, 4.5, 3.5],
[3.5, 3.5, 2.5, 3.5, 3.5, 3.0, 2.5, 1.5, 1.0],
[1.0, 2.0, 2.5, 4.0, 5.0, 5.0, 4.5, 3.5, 2.25],
[0.0, 0.0, 2.0, 0.0, 0.0, 5.0, 4.0, 2.5, 1.0],
[0.0, 0.0, 3.0, 0.0, 0.0, 5.0, 5.0, 4.5, 3.5],
[1.0, 2.0, 2.0, 4.0, 5.0, 5.0, 4.0, 2.5, 1.0],
[1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 4.5, 3.5],
[3.0], [3.0], [3.0], [5.0], 1.0, 3.5, 1.0, 5.0)
@test PhyloPlots.getEdgeNodeCoordinates(net, true, true) == (
[1.0, 2.5, 2.5, 1.5, 2.5, 3.0, 2.5, 1.5, 1.0],
Expand All @@ -23,8 +23,8 @@
[1.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.5, 2.75],
[3.5, 3.5, 2.5, 3.5, 3.5, 3.0, 2.5, 1.5, 1.0],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.5, 2.75, 1.875],
[0.0, 0.0, 2.0, 0.0, 0.0, 4.0, 3.0, 2.0, 1.0],
[0.0, 0.0, 2.0, 0.0, 0.0, 4.0, 4.0, 3.5, 2.75],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.0, 2.0, 1.0],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.0, 3.5, 2.75],
[2.5], [3.0], [2.0], [4.0], 1.0, 3.5, 1.0, 4)
@test PhyloPlots.getEdgeNodeCoordinates(net, false, true) == (
[1.0, 3.0, 3.0, 2.0, 3.0, 4.0, 3.0, 2.0, 1.0],
Expand All @@ -33,8 +33,8 @@
[1.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.5, 2.75],
[5.0, 5.0, 3.0, 5.0, 5.0, 4.0, 3.0, 2.0, 1.0],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.5, 2.75, 1.875],
[0.0, 0.0, 2.0, 0.0, 0.0, 4.0, 3.0, 2.0, 1.0],
[0.0, 0.0, 2.0, 0.0, 0.0, 4.0, 4.0, 3.5, 2.75],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 3.0, 2.0, 1.0],
[1.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.0, 3.5, 2.75],
[3.0], [4.0], [2.0], [4.0], 1.0, 5.0, 1.0, 4)
dat = DataFrame(node=[-5,-3,-4,5,100],bs=["90","95","99","mytip","bogus"],edge=[8,9,4,6,200]);
@test_logs (:warn, "Some node numbers in the nodeLabel data frame are not found in the network:\n 100") PhyloPlots.checkNodeDataFrame(net, dat);
Expand Down Expand Up @@ -76,8 +76,8 @@
[5.0, 4.0, 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 6.0, 5.5, 4.25],
[6.0, 5.0, 4.0, 6.0, 6.0, 3.0, 6.0, 4.0, 2.0, 1.0],
[5.0, 5.0, 4.0, 2.0, 3.0, 3.0, 6.0, 5.5, 4.25, 2.625],
[0.0, 5.0, 4.0, 0.0, 0.0, 2.0, 0.0, 5.0, 3.0, 1.0],
[0.0, 5.0, 4.0, 0.0, 0.0, 4.0, 0.0, 6.0, 5.5, 4.25],
[5.0, 5.0, 4.0, 2.0, 3.0, 2.0, 6.0, 5.0, 3.0, 1.0],
[5.0, 5.0, 4.0, 2.0, 3.0, 4.0, 6.0, 6.0, 5.5, 4.25],
[5.0, 4.0], [5.0, 4.0], [4.0, 1.0], [5.0, 4.0],
1.0, 6.0, 1.0, 6.0)
net = readTopology("((((B)#H1:::0.2)#H2,((D,C,#H2)S1,(#H1,A)S2)S3)S4);")
Expand All @@ -89,8 +89,8 @@
[5.0, 1.0, 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 6.0, 5.5, 4.25],
[6.0, 5.0, 4.0, 6.0, 6.0, 3.0, 6.0, 4.0, 2.0, 1.0],
[5.0, 5.0, 1.0, 2.0, 3.0, 3.0, 6.0, 5.5, 4.25, 2.625],
[0.0, 5.0, 1.0, 0.0, 0.0, 2.0, 0.0, 5.0, 3.0, 1.0],
[0.0, 5.0, 1.0, 0.0, 0.0, 4.0, 0.0, 6.0, 5.5, 4.25],
[5.0, 5.0, 1.0, 2.0, 3.0, 2.0, 6.0, 5.0, 3.0, 1.0],
[5.0, 5.0, 1.0, 2.0, 3.0, 4.0, 6.0, 6.0, 5.5, 4.25],
[5.0, 4.0], [5.0, 4.0], [1.0, 4.0], [5.0, 1.0],
1.0, 6.0, 1.0, 6.0)
end

0 comments on commit 270808c

Please sign in to comment.