Skip to content

Commit

Permalink
Node data type in loglikelihood
Browse files Browse the repository at this point in the history
  • Loading branch information
jangevaare committed Apr 3, 2020
1 parent d9b6d04 commit d2707c4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
changelog: |
## {{ package }} {{ version }}
{% if custom %}
{{ custom }}
{% endif %}
{% if previous_release %}
[Diff since {{ previous_release }}]({{ compare_url }})
{% endif %}
20 changes: 20 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ "description": "<p>Genetic sequence simulation and loglikelihood calculations of phylogenetic trees using Felsenstein's (1981) tree pruning algorithm with Julia</p>",
"language": "eng",
"license": "MIT",
"upload_type": "software",
"creators": [
{
"orcid": "0000-0002-3373-5009",
"affiliation": "University of Guelph",
"name": "Angevaare, Justin"
},
{
"affiliation": "University of Guelph",
"name": "Feng, Zeny"
},
{
"affiliation": "University of Calgary",
"name": "Deardon, Rob"
}
]
}
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PhyloModels"
uuid = "6465ae08-de3a-5dbe-bda8-3920f6a01ab7"
authors = ["Justin Angevaare <justinangevaare@gmail.com>"]
version = "0.3.1"
version = "0.3.2"

[deps]
GeneticBitArrays = "5d6f8c34-7f74-4dab-a49b-48b3414fbfce"
Expand Down
12 changes: 10 additions & 2 deletions src/loglikelihood.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
"""
Calculate the loglikelihood of a rooted phylogenetic tree. Genetic
sequences for each leaf must be provided in a Dict, using Node ID as
the key
"""
function loglikelihood(tree::Tree,
mod::T,
node_data::N;
output_calculations::Bool=false) where {T <: NASM, N <: Union{NodeDNA, NodeRNA}}
node_data::ND;
output_calculations::Bool=false) where {
T <: NASM,
N <: Union{NodeDNA, NodeRNA},
ND <: Dict{Int64, N}}
# Error checking
if !all(map(x -> x in keys(node_data), findleaves(tree)))
error("Some leaves are missing sequence data")
Expand Down

2 comments on commit d2707c4

@jangevaare
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

  • Fix type specification in loglikelihood calculation

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/12104

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.2 -m "<description of version>" d2707c445ecba924ffbc1b1206fc25f846541462
git push origin v0.3.2

Please sign in to comment.