Skip to content

Commit

Permalink
ready for v0.1.1; check for non-missing edge lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane committed Jan 14, 2023
1 parent f192132 commit 82e0a52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "PhyloCoalSimulations"
uuid = "53f7b83a-06b5-4910-9a21-1896bf762ade"
authors = ["Cecile Ane <[email protected]>",
"John Fogg <[email protected]>"]
version = "0.1.0"
version = "0.1.1"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
2 changes: 2 additions & 0 deletions src/simulatecoalescent_network.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function simulatecoalescent(net::PN.HybridNetwork, nloci::Integer, nindividuals;
inheritancecorrelation <= 1.0 || error("the inheritance correlation should be <= 1")
independentlin = (inheritancecorrelation == 0.0)
alpha = (1-inheritancecorrelation)/inheritancecorrelation # correlation = 1/(1+alpha)
PN.check_nonmissing_nonnegative_edgelengths(net, "the coalescent process cannot be simulated")
for e in net.edge
e.hybrid && e.gamma == -1.0 && error("the network needs gamma values")
end
Expand Down Expand Up @@ -334,6 +335,7 @@ function simulatecoalescent(net::PN.HybridNetwork, nloci::Integer, nindividuals,
error("populationsize should be a number or dictionary")
end
# network with lengths in coalescent units
PN.check_nonmissing_nonnegative_edgelengths(net, "the coalescent process cannot be simulated")
net_coal = deepcopy(net)
for e in net_coal.edge
e.length = e.length / Neff[e.number]
Expand Down

2 comments on commit 82e0a52

@cecileane
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

new features:

option for correlated inheritanced: correlated parents for multiple lineages coming to a hybrid
iterator over degree-2 nodes mapping the gene tree into the species network

bug fixes:

check for non-missing edge lengths

@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/75700

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.1.1 -m "<description of version>" 82e0a52783edbeeb71bd3a00dd0c56ddd55ae57e
git push origin v0.1.1

Please sign in to comment.