Skip to content

Commit 5a9394f

Browse files
authored
Merge pull request #51 from nossleinad/vitepress
Switch to vitepress docs
2 parents 91ed19b + ae8b310 commit 5a9394f

File tree

5 files changed

+122
-70
lines changed

5 files changed

+122
-70
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
33
Compose = "a81c6b42-2e10-5240-aca2-a61377ecd94b"
44
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
55
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
6+
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
67
FASTX = "c2308a5c-f048-11e8-3e8a-31650f418d12"
78
Fontconfig = "186bb1d3-e1f7-5a2c-a377-96d770f13627"
89
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"

docs/make.jl

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using MolecularEvolution
2-
using Documenter, Literate
2+
using Documenter, DocumenterVitepress, Literate
33
using Phylo, Distributions
44
using Plots
55
using Compose, Cairo, Fontconfig
@@ -32,23 +32,39 @@ makedocs(;
3232
authors = "Ben Murrell <[email protected]> and contributors",
3333
repo = "https://github.com/MurrellGroup/MolecularEvolution.jl/blob/{commit}{path}#{line}",
3434
sitename = "MolecularEvolution.jl",
35-
format = Documenter.HTML(;
36-
prettyurls = get(ENV, "CI", "false") == "true",
37-
canonical = "https://MurrellGroup.github.io/MolecularEvolution.jl",
38-
edit_link = "main",
35+
format = DocumenterVitepress.MarkdownVitepress(;
36+
repo = "https://github.com/MurrellGroup/MolecularEvolution.jl",
37+
#=prettyurls = get(ENV, "CI", "false") == "true",=#
38+
deploy_url = "https://MurrellGroup.github.io/MolecularEvolution.jl",
39+
devbranch = "main",
40+
devurl = "dev",
3941
assets = ["assets/favicon.ico"],
42+
#=for local hosting
43+
44+
md_output_path = ".",
45+
build_vitepress = false
46+
),
47+
clean = false,
48+
=#
4049
),
4150
pages = [
42-
"Home" => "index.md",
43-
"framework.md",
51+
"Core Concepts" => [
52+
"intro.md",
53+
"framework.md",
54+
"models.md",
55+
],
56+
"Methods & Algorithms" => [
57+
"simulation.md",
58+
"optimization.md",
59+
"ancestors.md",
60+
],
61+
"Extensions & Utilities" => [
62+
"IO.md",
63+
"generated/viz.md",
64+
"generated/update.md",
65+
],
4466
"examples.md",
45-
"IO.md",
46-
"models.md",
47-
"simulation.md",
48-
"optimization.md",
49-
"ancestors.md",
50-
"generated/viz.md",
51-
"generated/update.md",
67+
"api.md"
5268
],
5369
)
5470

docs/src/api.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Full API
2+
3+
## Index
4+
```@index
5+
```
6+
7+
## Docstrings
8+
```@autodocs
9+
Modules = [MolecularEvolution]
10+
```

docs/src/index.md

Lines changed: 37 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,40 @@
1-
```@meta
2-
CurrentModule = MolecularEvolution
3-
```
4-
5-
# MolecularEvolution
6-
7-
Documentation for [MolecularEvolution](https://github.com/MurrellGroup/MolecularEvolution.jl).
8-
9-
### A Julia package for the flexible development of phylogenetic models.
10-
11-
MolecularEvolution.jl exploits Julia's multiple dispatch, implementing a fully generic suite of likelihood calculations, branchlength optimization, topology optimization, and ancestral inference. Users can construct trees using already-defined data types and models. But users can define probability distributions over their own data types, and specify the behavior of these under their own model types, and can mix and match different models on the same phylogeny.
12-
13-
If the behavior you need is not already available in `MolecularEvolution.jl`:
14-
- If you have a new data type:
15-
- A `Partition` type that represents the uncertainty over your state.
16-
- `combine!()` that merges evidence from two `Partition`s.
17-
- If you have a new model:
18-
- A `BranchModel` type that stores your model parameters.
19-
- `forward!()` that evolves state distributions over branches, in the root-to-tip direction.
20-
- `backward!()` that reverse-evolves state distributions over branches, in the tip-to-root direction.
21-
22-
And then sampling, likelihood calculations, branch-length optimization, ancestral reconstruction, etc should be available for your new data or model.
23-
24-
### Design principles
25-
In order of importance, we aim for the following:
26-
- Flexibility and generality
27-
- Where possible, we avoid design decisions that limit the development of new models, or make it harder to develop new models.
28-
- We do not sacrifice flexibility for performance.
29-
- Scalability
30-
- Analyses implemented using `MolecularEvolution.jl` should scale to large, real-world datasets.
31-
- Performance
32-
- While the above take precedence over speed, it should be possible to optimize your `Partition`, `combine!()`, `BranchModel`, `forward!()` and `backward!()` functions to obtain competative runtimes.
33-
34-
### Authors:
35-
Venkatesh Kumar and Ben Murrell, with additional contributions by Sanjay Mohan, Alec Pankow, Hassan Sadiq, and Kenta Sato.
36-
37-
### Quick example: Likelihood calculations under phylogenetic Brownian motion:
38-
39-
```julia
40-
using MolecularEvolution, Plots
41-
42-
#First simulate a tree, using a coalescent process
43-
tree = sim_tree(n=200)
44-
internal_message_init!(tree, GaussianPartition())
45-
#Simulate brownian motion over the tree
46-
bm_model = BrownianMotion(0.0,1.0)
47-
sample_down!(tree, bm_model)
48-
#And plot the log likelihood as a function of the parameter value
49-
ll(x) = log_likelihood!(tree,BrownianMotion(0.0,x))
50-
plot(0.7:0.001:1.6,ll, xlabel = "variance per unit time", ylabel = "log likelihood")
1+
```@raw html
2+
---
3+
# https://vitepress.dev/reference/default-theme-home-page
4+
layout: home
5+
6+
hero:
7+
name: "MolecularEvolution.jl"
8+
text: "Phylogenetic Modeling Framework"
9+
tagline: "A Julia package for flexible development of phylogenetic models"
10+
image:
11+
src: '/logo.png'
12+
actions:
13+
- theme: brand
14+
text: Intro
15+
link: /intro
16+
- theme: alt
17+
text: API reference
18+
link: /api
19+
- theme: alt
20+
text: View on Github
21+
link: https://github.com/MurrellGroup/MolecularEvolution.jl
22+
features:
23+
- title: Flexible Model Development
24+
details: Create custom evolutionary models with your own data types and probability distributions while leveraging the existing infrastructure for tree operations and likelihood calculations.
25+
link: /framework
26+
- title: Rich Model Library
27+
details: Includes standard models like JC69, K80, GTR for nucleotides, JTT and WAG for amino acids, MG94 and GY94 for codons, plus Brownian motion for continuous traits.
28+
link: /models
29+
- title: Powerful Tree Operations
30+
details: Optimize branch lengths, infer ancestral states, perform tree rearrangements (NNI), and sample topologies with MCMC.
31+
link: /optimization
32+
- title: Simulation Tools
33+
details: Generate phylogenies using both coalescent and birth-death processes, and simulate sequence evolution on those trees.
34+
link: /simulation
35+
---
5136
```
52-
![](figures/quick_example.svg)
5337

54-
```@index
55-
```
56-
57-
```@autodocs
58-
Modules = [MolecularEvolution]
38+
```@meta
39+
CurrentModule = MolecularEvolution
5940
```

docs/src/intro.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Intro
2+
3+
MolecularEvolution.jl exploits Julia's multiple dispatch, implementing a fully generic suite of likelihood calculations, branchlength optimization, topology optimization, and ancestral inference. Users can construct trees using already-defined data types and models. But users can define probability distributions over their own data types, and specify the behavior of these under their own model types, and can mix and match different models on the same phylogeny.
4+
5+
If the behavior you need is not already available in `MolecularEvolution.jl`:
6+
- If you have a new data type:
7+
- A `Partition` type that represents the uncertainty over your state.
8+
- `combine!()` that merges evidence from two `Partition`s.
9+
- If you have a new model:
10+
- A `BranchModel` type that stores your model parameters.
11+
- `forward!()` that evolves state distributions over branches, in the root-to-tip direction.
12+
- `backward!()` that reverse-evolves state distributions over branches, in the tip-to-root direction.
13+
14+
And then sampling, likelihood calculations, branch-length optimization, ancestral reconstruction, etc should be available for your new data or model.
15+
16+
### Design principles
17+
In order of importance, we aim for the following:
18+
- Flexibility and generality
19+
- Where possible, we avoid design decisions that limit the development of new models, or make it harder to develop new models.
20+
- We do not sacrifice flexibility for performance.
21+
- Scalability
22+
- Analyses implemented using `MolecularEvolution.jl` should scale to large, real-world datasets.
23+
- Performance
24+
- While the above take precedence over speed, it should be possible to optimize your `Partition`, `combine!()`, `BranchModel`, `forward!()` and `backward!()` functions to obtain competative runtimes.
25+
26+
### Authors:
27+
Venkatesh Kumar and Ben Murrell, with additional contributions by Sanjay Mohan, Alec Pankow, Hassan Sadiq, and Kenta Sato.
28+
29+
### Quick example: Likelihood calculations under phylogenetic Brownian motion:
30+
31+
```julia
32+
using MolecularEvolution, Plots
33+
34+
#First simulate a tree, using a coalescent process
35+
tree = sim_tree(n=200)
36+
internal_message_init!(tree, GaussianPartition())
37+
#Simulate brownian motion over the tree
38+
bm_model = BrownianMotion(0.0,1.0)
39+
sample_down!(tree, bm_model)
40+
#And plot the log likelihood as a function of the parameter value
41+
ll(x) = log_likelihood!(tree,BrownianMotion(0.0,x))
42+
plot(0.7:0.001:1.6,ll, xlabel = "variance per unit time", ylabel = "log likelihood")
43+
```
44+
![](figures/quick_example.svg)

0 commit comments

Comments
 (0)