Skip to content

Commit ddeb321

Browse files
authored
updated references (#28)
also: v0.5.1; now tested on windows; github actions
1 parent 80c2359 commit ddeb321

File tree

10 files changed

+140
-79
lines changed

10 files changed

+140
-79
lines changed

.github/workflows/ci.yml

+15-49
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,38 @@
11
name: CI
22
on:
3-
pull_request:
4-
branches:
5-
- master
63
push:
74
branches:
85
- master
9-
tags: '*'
6+
tags: ['*']
7+
pull_request:
8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1013
jobs:
1114
test:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
15+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
1316
runs-on: ${{ matrix.os }}
1417
strategy:
1518
fail-fast: false
1619
matrix:
1720
version:
18-
- '1' # will expand to the latest stable 1.x release of Julia.
21+
- '1'
1922
os:
2023
- ubuntu-latest
2124
- macos-latest
22-
arch:
23-
- x64
25+
- windows-latest
2426
steps:
2527
- uses: actions/checkout@v2
26-
- uses: julia-actions/setup-julia@v1
28+
- uses: julia-actions/setup-julia@v2
2729
with:
2830
version: ${{ matrix.version }}
29-
arch: ${{ matrix.arch }}
30-
- uses: actions/cache@v1
31-
env:
32-
cache-name: cache-artifacts
33-
with:
34-
path: ~/.julia/artifacts
35-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
36-
restore-keys: |
37-
${{ runner.os }}-test-${{ env.cache-name }}-
38-
${{ runner.os }}-test-
39-
${{ runner.os }}-
31+
- uses: julia-actions/cache@v2
4032
- uses: julia-actions/julia-buildpkg@v1
4133
- uses: julia-actions/julia-runtest@v1
4234
- uses: julia-actions/julia-processcoverage@v1
43-
- uses: codecov/codecov-action@v2
35+
- uses: codecov/codecov-action@v4
4436
with:
45-
file: lcov.info
46-
docs:
47-
name: Documentation
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v2
51-
- uses: julia-actions/setup-julia@v1
52-
with:
53-
version: '1'
54-
- uses: julia-actions/julia-buildpkg@v1
55-
- name: install dependencies
56-
run: |
57-
julia --project=docs -e '
58-
using Pkg
59-
Pkg.develop(PackageSpec(path=pwd()))
60-
Pkg.instantiate()
61-
Pkg.build("QuartetNetworkGoodnessFit")'
62-
- name: doc tests
63-
run: |
64-
julia --project=docs -e '
65-
using Documenter: doctest
66-
using QuartetNetworkGoodnessFit
67-
doctest(QuartetNetworkGoodnessFit)'
68-
- name: build and deploy doc
69-
run: julia --project=docs docs/make.jl
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
37+
files: lcov.info
38+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/doccleanup.yml

+18-13
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ on:
44
pull_request:
55
types: [closed]
66

7+
# ensure that only one "doc preview cleanup" workflow is force-pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
712
jobs:
813
doc-preview-cleanup:
914
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
1017
steps:
1118
- name: Checkout gh-pages branch
12-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
1320
with:
1421
ref: gh-pages
15-
16-
- name: Delete preview and history
22+
- name: delete preview and history + push changes
1723
run: |
18-
git config user.name "Documenter.jl"
19-
git config user.email "[email protected]"
20-
git rm -rf "previews/PR$PRNUM"
21-
git commit -m "delete preview"
22-
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "[email protected]"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
2332
env:
24-
PRNUM: ${{ github.event.number }}
25-
26-
- name: Push changes
27-
run: |
28-
git push --force origin gh-pages-new:gh-pages
33+
preview_dir: previews/PR${{ github.event.number }}

.github/workflows/documentation.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documenter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
Documenter:
12+
name: documentation
13+
permissions:
14+
contents: write
15+
pull-requests: read
16+
statuses: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: julia-actions/setup-julia@v2
21+
with:
22+
version: '1'
23+
- uses: julia-actions/cache@v2
24+
- uses: julia-actions/julia-buildpkg@latest
25+
- uses: julia-actions/julia-docdeploy@latest
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

CITATION.bib

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
% reference for the package
2+
@misc{PhyloGaussianBeliefProp.jl,
3+
author = {Cécile Ané <cecileane@users.noreply.github.com> and
4+
contributors},
5+
title = {QuartetNetworkGoodnessFit.jl: Julia package for phylogenetic networks analyses using four-taxon subsets},
6+
url = {https://github.com/cecileane/QuartetNetworkGoodnessFit.jl},
7+
version = {v0.0.1},
8+
year = {2023},
9+
}
10+
% reference for the goodness-of-fit test
11+
@article{2021CaiAne,
12+
author = {Ruoyi Cai & Cécile Ané},
13+
title = {Assessing the fit of the multi-species network coalescent to multi-locus data},
14+
year = {2021},
15+
journal = {Bioinformatics},
16+
volume = {37},
17+
number = {5},
18+
pages = {634-641},
19+
doi = {10.1093/bioinformatics/btaa863},
20+
}
21+
% reference for the algorithm to calculate expected quartet concordance factors
22+
@article{2024AFABR-anomalous,
23+
author = {Cécile Ané and John Fogg and Elizabeth S. Allman and Hector Baños and John A. Rhodes},
24+
title = {Anomalous networks under the multispecies coalescent: theory and prevalence},
25+
year = {2024},
26+
journal = {Journal of Mathematical Biology},
27+
volume = {88},
28+
pages = {29},
29+
doi = {10.1007/s00285-024-02050-7},
30+
}
31+
% reference for the simulation package and the correlated inheritance model
32+
@article{2023fogg_phylocoalsimulations,
33+
author = {Fogg, John and Allman, Elizabeth S and An{\'e}, C{\'e}cile},
34+
title = {{PhyloCoalSimulations}: A simulator for network multispecies coalescent
35+
models, including a new extension for the inheritance of gene flow},
36+
journal = {Systematic Biology},
37+
year = {2023},
38+
volume = {72},
39+
number = {5},
40+
pages = {1171-1179},
41+
doi = {10.1093/sysbio/syad030},
42+
}

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "QuartetNetworkGoodnessFit"
22
uuid = "1382f7fc-2744-4d9d-8ec6-1e3efdec0746"
33
authors = ["Cecile Ane <[email protected]>"]
4-
version = "0.5.0"
4+
version = "0.5.1"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"

README.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
[![doc: stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/stable)
2+
[![doc: dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/dev)
13
[![Build status](https://github.com/cecileane/QuartetNetworkGoodnessFit.jl/workflows/CI/badge.svg?branch=master)](https://github.com/cecileane/QuartetNetworkGoodnessFit.jl/actions)
2-
[![Coverage Status](https://coveralls.io/repos/cecileane/QuartetNetworkGoodnessFit.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/cecileane/QuartetNetworkGoodnessFit.jl?branch=master)
3-
[![codecov.io](http://codecov.io/github/cecileane/QuartetNetworkGoodnessFit.jl/coverage.svg?branch=master)](http://codecov.io/github/cecileane/QuartetNetworkGoodnessFit.jl?branch=master)
4+
[![Coverage](https://codecov.io/gh/cecileane/QuartetNetworkGoodnessFit.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/cecileane/QuartetNetworkGoodnessFit.jl)
5+
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
6+
[![PkgEval](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/Q/QuartetNetworkGoodnessFit.svg)](https://JuliaCI.github.io/NanosoldierReports/pkgeval_badges/report.html)
47

58
## overview
69

@@ -11,5 +14,6 @@ goodness of fit of a phylogenetic network to data on subsets of 4 tips.
1114
It depends on the [PhyloNetworks](https://github.com/crsl4/PhyloNetworks.jl)
1215
package.
1316

14-
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/stable)
15-
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/dev)
17+
## citing
18+
19+
See [`CITATION.bib`](CITATION.bib) for the relevant reference(s).

docs/make.jl

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ using QuartetNetworkGoodnessFit
44
DocMeta.setdocmeta!(QuartetNetworkGoodnessFit, :DocTestSetup, :(using QuartetNetworkGoodnessFit); recursive=true)
55

66
makedocs(
7+
modules = [QuartetNetworkGoodnessFit],
78
sitename = "QGoF",
89
authors = "Cécile Ané and Ruoyi Cai",
9-
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), # easier local build
10-
modules = [QuartetNetworkGoodnessFit],
10+
format = Documenter.HTML(;
11+
prettyurls = get(ENV, "CI", nothing) == "true", # easier local build
12+
canonical="https://cecileane.github.io/QuartetNetworkGoodnessFit.jl/stable/",
13+
edit_link="master",
14+
assets=String[]
15+
),
1116
pages = [
1217
"home" => "index.md",
1318
"manual" => [
@@ -25,4 +30,5 @@ makedocs(
2530
deploydocs(
2631
repo = "github.com/cecileane/QuartetNetworkGoodnessFit.jl.git",
2732
push_preview = true,
33+
devbranch="master",
2834
)

docs/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
## what to update
1919

20-
- check Julia version in `.github/workflows/ci.yml`, docs section
20+
- check Julia version in `.github/workflows/documentation.yml`
2121
- update Documenter version in `docs/Project.toml`, and fix
2222
anything that the update might have broken.
2323

docs/src/index.md

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ References:
3131
An example using the inbreeding plant species *Arabidopsis thaliana* (L.) Heynh. [Systematic Biology](https://doi.org/10.1093/sysbio/syv039), 64(5):809-823.
3232
- [Addendum](http://www.stat.wisc.edu/~ane/publis/2015Stenz_TICR_addendum.pdf)
3333
describing a modification to the model in the original TICR test.
34+
- for the simulation software:\
35+
John Fogg, Elizabeth S. Allman, and Cécile Ané (2023). PhyloCoalSimulations: A simulator for network multispecies coalescent models, including a new extension for the inheritance of gene flow.
36+
[Systematic Biology](https://doi.org/10.1093/sysbio/syad030),
37+
72(5):1171–1179.
38+
- for the algorithm to get quartet concordance factors expected from a network:\
39+
C. Ané, J. Fogg, E.S. Allman, H. Baños and J.A. Rhodes (2024).
40+
Anomalous networks under the multispecies coalescent: theory and prevalence.
41+
[J. Math. Biol.](https://doi.org/10.1007/s00285-024-02050-7) 88:29.
3442

3543
## functions
3644

src/quarnetGoF.jl

+11-9
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ Note that `net` is **not** modified.
6767
- `quartetstat`: the test statistic used to obtain an outlier p-value for
6868
each four-taxon set, which is then compared to a chi-squared distribution
6969
with 2 degrees of freedom to get a p-value.
70-
The default is `:LRT` for the likelihood ratio:
71-
``2n_\mathrm{genes} \sum_{j=1}^3 {\hat p}_j (\log{\hat p}_j - \log p_j)`` where ``p_j``
72-
is the quartet CF expected from the network, and ``{\hat p}_j`` is the
73-
quartet CF observed in the data.
74-
Alternatives are `:Qlog` for the Qlog statistics (Lorenzen, 1995):
75-
``2n_\mathrm{genes} \sum_{j=1}^3 \frac{({\hat p}_j - p_j)^2}{p_j (\log{\hat p}_j - \log p_j)}``
76-
and `:pearson` for Pearon's chi-squared statistic, which behaves poorly when
77-
the expected count is low (e.g. less than 5):
78-
``n_\mathrm{genes} \sum_{j=1}^3 \frac{({\hat p}_j - p_j)^2 }{p_j}``
70+
* `:LRT` is the default, for the likelihood ratio:
71+
``2n_\mathrm{genes} \sum_{j=1}^3 {\hat p}_j (\log{\hat p}_j - \log p_j)``
72+
where ``p_j``
73+
is the quartet CF expected from the network, and ``{\hat p}_j`` is the
74+
quartet CF observed in the data.
75+
* `:Qlog` for the Qlog statistics (Lorenzen, 1995):
76+
``2n_\mathrm{genes} \sum_{j=1}^3 \frac{({\hat p}_j - p_j)^2}{p_j (\log{\hat p}_j - \log p_j)}``
77+
and
78+
* `:pearson` for Pearon's chi-squared statistic, which behaves poorly when
79+
one or more expected counts are low (e.g. less than 5):
80+
``n_\mathrm{genes} \sum_{j=1}^3 \frac{({\hat p}_j - p_j)^2 }{p_j}``
7981
- `correction=:simulation` to correct for dependence across 4-taxon.
8082
Use `:none` to turn off simulations and the correction for dependence.
8183
- `seed=1234`: master seed to control the seeds for gene tree simulations.

0 commit comments

Comments
 (0)