Skip to content

Commit

Permalink
Merge pull request #96 from EcoJulia/rr/show
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
richardreeve authored Apr 24, 2024
2 parents bbf4476 + 1343de3 commit edfc934
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# NEWS

- v0.5.2
- Bugfix in displaying node names
- Link fix
- v0.5.1
- Allow export of trees to nexus and newick format
- Overload Base.write() and Base.parse()
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "aea672f4-3940-5932-aa44-993d1c3ff149"
author = ["Richard Reeve <Richard.Reeve@glasgow.ac.uk>",
"Michael Krabbe Borregaard <mkborregaard@sund.ku.dk>",
"Claire Harris <Claire.Harris@defra.gov.uk>"]
version = "0.5.1"
version = "0.5.2"

[deps]
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ installed with `add`. For example:
(@v1.9) pkg> add Phylo
Resolving package versions...
Updating `~/.julia/environments/v1.9/Project.toml`
[aea672f4] + Phylo v0.5.0
[aea672f4] + Phylo v0.5.2
Updating `~/.julia/environments/v1.9/Manifest.toml`

(@v1.9) pkg>
Expand Down Expand Up @@ -400,6 +400,6 @@ julia> d = DataFrame(nodename=getnodename.(tree, traversal(tree, preorder)), tra
[zenodo-badge]: https://zenodo.org/badge/93447241.svg
[zenodo-url]: https://zenodo.org/badge/latestdoi/93447241

[issues-url]: https://github.com/EcoJuli/Phylo.jl/issues
[issues-url]: https://github.com/EcoJulia/Phylo.jl/issues
[pr-url]: https://github.com/EcoJulia/Phylo.jl/pulls
[diversity-url]: https://github.com/EcoJulia/Diversity.jl/
8 changes: 4 additions & 4 deletions src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function outputnode!(io::IO, tree::TREE, node, ::CompactOutput,
String}}
od = outdegree(tree, node)
opening = hasinbound(tree, node) ?
(od > 0 ? "root node" : "unattached node") :
(od > 0 ? "internal node" : "leaf node")
(od > 0 ? "internal node" : "leaf node") :
(od > 0 ? "root node" : "unattached node")
print(io, "$opening \"$(getnodename(tree, node))\"")
return nothing
end
Expand All @@ -48,8 +48,8 @@ function outputnode!(io::IO, tree::TREE, node, ::CompactOutput,
<:Number}}
od = outdegree(tree, node)
opening = hasinbound(tree, node) ?
(od > 0 ? "root node" : "unattached node") :
(od > 0 ? "internal node" : "leaf node")
(od > 0 ? "internal node" : "leaf node") :
(od > 0 ? "root node" : "unattached node")
print(io, "$opening $(getnodename(tree, node))")
return nothing
end
Expand Down

0 comments on commit edfc934

Please sign in to comment.