Skip to content

Commit c2608b6

Browse files
Ben Jefferymergify[bot]
Ben Jeffery
authored andcommitted
Convert docs to jupyterbook
1 parent 90447f9 commit c2608b6

23 files changed

+326
-356
lines changed

.circleci/config.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ jobs:
9393
name: Build the distribution tarball.
9494
command: python setup.py sdist
9595

96-
- run:
97-
name: Test the docs will build on RTD minimal environment.
98-
command: |
99-
python -m venv docs-venv
100-
source docs-venv/bin/activate
101-
pip install -r requirements/readthedocs.txt
102-
make -C docs
103-
10496
- run:
10597
name: Install from the distribution tarball
10698
command: |

.github/workflows/docs.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Docs
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
tags:
8+
- '*'
9+
10+
env:
11+
COMMIT_EMAIL: [email protected]
12+
MAKE_TARGET: all
13+
OWNER: tskit-dev
14+
REPO: tsinfer
15+
16+
jobs:
17+
build-deploy-docs:
18+
name: Docs
19+
runs-on: ubuntu-18.04
20+
steps:
21+
- name: Cancel Previous Runs
22+
uses: styfle/[email protected]
23+
with:
24+
access_token: ${{ github.token }}
25+
26+
- uses: actions/checkout@v2
27+
# As we are using pull-request-target which uses the workflow from the base
28+
# of the PR, we need to be specific
29+
with:
30+
ref: ${{ github.event.pull_request.head.ref }}
31+
repository: ${{ github.event.pull_request.head.repo.full_name }}
32+
submodules: true
33+
34+
- uses: actions/setup-python@v2
35+
with:
36+
python-version: 3.8
37+
38+
- uses: actions/cache@v2
39+
id: cache
40+
with:
41+
path: venv
42+
key: docs-venv-v1-${{ hashFiles('requirements/CI-docs/requirements.txt') }}
43+
44+
- name: Build virtualenv
45+
if: steps.cache.outputs.cache-hit != 'true'
46+
run: python -m venv venv
47+
48+
- name: Install deps
49+
run: venv/bin/activate && pip install -r requirements/CI-docs/requirements.txt
50+
51+
- name: Build C module
52+
if: env.MAKE_TARGET
53+
run: venv/bin/activate && make $MAKE_TARGET
54+
55+
- name: Build Docs
56+
run: venv/bin/activate && cd docs && make dist
57+
58+
- name: Trigger docs site rebuild
59+
if: github.ref == 'refs/heads/main'
60+
run: |
61+
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \
62+
-H 'Accept: application/vnd.github.everest-preview+json' \
63+
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \
64+
--data '{"event_type":"build-docs"}'

CHANGELOG.rst renamed to CHANGELOG.md

Lines changed: 45 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,82 @@
1-
********************
2-
[0.2.4] - 2022-06-xx
3-
********************
1+
# Changelog
2+
3+
## [0.2.4] - 2022-06-xx
44

55
**Features**
66

77
- matching routines warn if no inference sites
8-
(:pr:`685`, :issue:`683` :user:`hyanwong`)
8+
({pr}`685`, {issue}`683` {user}`hyanwong`)
99

1010
**Fixes**
1111

12-
- sample_data.subset() now accepts a sequence_length (:pr:`681`, :user:`hyanwong`)
12+
- sample_data.subset() now accepts a sequence_length ({pr}`681`, {user}`hyanwong`)
1313

1414
**Breaking changes**:
1515

1616
- Inference now sets time_units on both ancestor and final tree sequences to
1717
tskit.TIME_UNITS_UNCALIBRATED, stopping accidental use of branch length
18-
calculations on the ts. (:pr:`680`, :user:`hyanwong`)
18+
calculations on the ts. ({pr}`680`, {user}`hyanwong`)
1919

20-
********************
21-
[0.2.3] - 2022-04-08
22-
********************
20+
## [0.2.3] - 2022-04-08
2321

2422
**Features**
2523

26-
- Added ``ancestor(id)`` to ``AncestorData`` class.
27-
(:pr:`570`, :issue:`569`, :user:`hyanwong`)
24+
- Added `ancestor(id)` to `AncestorData` class.
25+
({pr}`570`, {issue}`569`, {user}`hyanwong`)
2826

2927
**Fixes**
3028

31-
- Mark zarr 2.11.0, 2.11.1 and 2.11.2 as incompatible due to ``zarr-python``
29+
- Mark zarr 2.11.0, 2.11.1 and 2.11.2 as incompatible due to `zarr-python`
3230
bugs #965 and #967.
33-
(:issue:`643`, :pr:`657`, :user:`benjeffery`)
31+
({issue}`643`, {pr}`657`, {user}`benjeffery`)
3432

35-
********************
36-
[0.2.2] - 2022-02-23
37-
********************
33+
## [0.2.2] - 2022-02-23
3834

3935
**Bugfixes**:
4036

4137
- Mutations at non-inference sites are now guaranteed to be fully parsimonious.
4238
Previous versions required a mutation above the root when the input ancestral state
4339
disagreed with the ancestral state produced by the parsimony algorithm. Now fixed by
44-
using the new map_mutations code from tskit 0.3.7 (:pr:`557`, :user:`hyanwong`)
40+
using the new map_mutations code from tskit 0.3.7 ({pr}`557`, {user}`hyanwong`)
4541

4642
**New Features**:
4743

4844
**Breaking changes**:
4945

5046
- Oldest nodes in a standard inferred tree sequence are no longer set to frequencies ~2
5147
and ~3 (i.e. 2 or 3 times as old as all the other nodes), but are spaced above the
52-
others by the mean time between unique ancestor ages (:pr:`485`, :user:`hyanwong`)
48+
others by the mean time between unique ancestor ages ({pr}`485`, {user}`hyanwong`)
5349

54-
- The ``tsinfer.SampleData.from_tree_sequence()`` function now defaults to setting
55-
``use_sites_time`` and ``use_individuals_time`` to ``False`` rather than ``True``
56-
(:pr:`599`, :user:`hyanwong`)
50+
- The `tsinfer.SampleData.from_tree_sequence()` function now defaults to setting
51+
`use_sites_time` and `use_individuals_time` to `False` rather than `True`
52+
({pr}`599`, {user}`hyanwong`)
5753

58-
********************
59-
[0.2.1] - 2021-05-26
60-
********************
54+
## [0.2.1] - 2021-05-26
6155

6256
Bugfix release
6357

6458
**Bugfixes**:
6559

6660
- Fix a bug in the core LS matching algorithm in which the rate of recombination
67-
was being incorrectly computed (:issue:`493`, :pr:`514`, :user:`jeromekelleher`,
68-
:user:`hyanwong`).
61+
was being incorrectly computed ({issue}`493`, {pr}`514`, {user}`jeromekelleher`,
62+
{user}`hyanwong`).
6963

70-
- ``tsinfer.verify()`` no longer requires that non-ancestral alleles in a SampleData
71-
and Tree Sequence file are in the same order (:issue:`490`, :pr:`492`,
72-
:user:`hyanwong`).
64+
- `tsinfer.verify()` no longer requires that non-ancestral alleles in a SampleData
65+
and Tree Sequence file are in the same order ({issue}`490`, {pr}`492`,
66+
{user}`hyanwong`).
7367

7468
**New Features**:
7569

7670
- Inferred ancestral haplotypes may be truncated via
77-
``AncestorData.truncate_ancestors()`` to improve performance when inferring large
78-
datasets (:issue:`276`, :pr:`467`, :user:`awohns`).
71+
`AncestorData.truncate_ancestors()` to improve performance when inferring large
72+
datasets ({issue}`276`, {pr}`467`, {user}`awohns`).
7973

8074
**Breaking changes**:
8175

8276
- tsinfer now requires Python 3.7
8377

8478

85-
********************
86-
[0.2.0] - 2020-12-18
87-
********************
79+
## [0.2.0] - 2020-12-18
8880

8981
Major feature release, including some incompatible file format and API updates.
9082

@@ -101,17 +93,17 @@ Major feature release, including some incompatible file format and API updates.
10193
can now we be specified in the SampleData format. These will be included
10294
in the final tree sequence and allow for automatic decoding of JSON metadata.
10395

104-
- Map non-inference sites onto the tree by using the tskit ``map_mutations``
96+
- Map non-inference sites onto the tree by using the tskit `map_mutations`
10597
parsimony method. This allows us to support sites with > 2 alleles.
10698

10799
- Historical (non-contemporaneous) samples can now be accommodated in inference,
108100
assuming that the true dates of ancestors have been set, by using the concept
109101
of "proxy samples". This is done via the new function
110-
``AncestorData.insert_proxy_samples()``, then setting the new
111-
parameter ``force_sample_times=True`` when matching samples.
102+
`AncestorData.insert_proxy_samples()`, then setting the new
103+
parameter `force_sample_times=True` when matching samples.
112104

113-
- The default tree sequence returned after inference when ``simplify=True`` retains
114-
unary nodes (i.e. simplify is done with ``keep_unary=True``.
105+
- The default tree sequence returned after inference when `simplify=True` retains
106+
unary nodes (i.e. simplify is done with `keep_unary=True`.
115107

116108

117109
**Breaking changes**:
@@ -120,18 +112,18 @@ Major feature release, including some incompatible file format and API updates.
120112
0/1 values as before.
121113

122114
- Times for undated sites now use frequencies (0..1), not as counts (1..num_samples),
123-
and are now stored as ``tskit.UNKNOWN_TIME``, then calculated on the fly in the
115+
and are now stored as `tskit.UNKNOWN_TIME`, then calculated on the fly in the
124116
variants() iterator.
125117

126-
- The SampleData file no longer accepts the ``inference`` argument to add_site.
127-
This functionality has been replaced by the ``exclude_positions`` argument
128-
to the ``infer`` and ``generate_ancestors`` functions.
118+
- The SampleData file no longer accepts the `inference` argument to add_site.
119+
This functionality has been replaced by the `exclude_positions` argument
120+
to the `infer` and `generate_ancestors` functions.
129121

130122
- The SampleData format is now at version 5, and older versions cannot be read.
131123
Users should rerun their data ingest pipelines.
132124

133-
- Users can specify variant ages, via ``sample_data.add_sites(... , time=user_time)``.
134-
If not ``None``, this overrides the default time position of an ancestor, otherwise
125+
- Users can specify variant ages, via `sample_data.add_sites(... , time=user_time)`.
126+
If not `None`, this overrides the default time position of an ancestor, otherwise
135127
ancestors are ordered in time by using the frequency of the derived variant (#143).
136128

137129
- Change "age" to "time" to match tskit/msprime notation, and to avoid confusion
@@ -140,37 +132,31 @@ Major feature release, including some incompatible file format and API updates.
140132

141133
- Add the ability to record user-specified times for individuals, and therefore
142134
the samples contained in them (currently ignored during inference). Times are
143-
added using ``sample_data.add_individual(... , time=user_time)`` (#190).
135+
added using `sample_data.add_individual(... , time=user_time)` (#190).
144136

145-
- Change ``tsinfer.UNKNOWN_ALLELE`` to ``tskit.MISSING_DATA`` for marking unknown regions
137+
- Change `tsinfer.UNKNOWN_ALLELE` to `tskit.MISSING_DATA` for marking unknown regions
146138
of ancestral haplotypes (#188) . This also involves changing the allele storage to a
147-
signed int from ``np.uint8`` which matches the tskit v0.2 format for allele storage
139+
signed int from `np.uint8` which matches the tskit v0.2 format for allele storage
148140
(see https://github.com/tskit-dev/tskit/issues/144).
149141

150142
**Bugfixes**:
151143

152144
- Individuals and populations in the SampleData file are kept in the returned tree
153145
sequence, even if they are not referenced by any sample. The individual and population
154146
ids are therefore guaranteed to stay the same between the sample data file and the
155-
inferred tree sequence. (:pr:`348`)
147+
inferred tree sequence. ({pr}`348`)
156148

157-
********************
158-
[0.1.4] - 2018-12-12
159-
********************
149+
## [0.1.4] - 2018-12-12
160150

161151
Bugfix release.
162152

163153
- Fix issue caused by upstream changes in numcodecs (#136).
164154

165-
********************
166-
[0.1.3] - 2018-11-02
167-
********************
155+
## [0.1.3] - 2018-11-02
168156

169157
Release corresponding to code used in the preprint.
170158

171-
********************
172-
[0.1.2] - 2018-06-18
173-
********************
159+
## [0.1.2] - 2018-06-18
174160

175161
Minor update to take advantage of msprime 0.6.0's Population and Individual
176162
objects and fix various bugs.
@@ -182,7 +168,7 @@ objects and fix various bugs.
182168
of individuals and populations. Older SampleData files will not be
183169
readable and must be regenerated.
184170

185-
- Changed the order of the ``alleles`` and ``genotypes`` arguments to
171+
- Changed the order of the `alleles` and `genotypes` arguments to
186172
SampleData.add_site.
187173

188174
**New features**:

CITATION.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(sec_citation)=
2+
3+
# Citing tsinfer
4+
5+
If you use `tsinfer` in your work, please cite the
6+
[2019 Nature Genetics paper](<https://doi.org/10.1038/s41588-019-0483-y>):
7+
8+
> Jerome Kelleher, Yan Wong, Anthony W. Wohns,
9+
> Chaimaa Fadil, Patrick K. Albers & Gil McVean (2019)
10+
> *Inferring whole-genome histories in large population datasets*,
11+
> Nature Genetics, Volume 51, 1330–1338. https://doi.org/10.1038/s41588-019-0483-y
12+
13+
Bibtex record:
14+
15+
```bibtex
16+
17+
@article{Kelleher2019,
18+
doi = {10.1038/s41588-019-0483-y},
19+
url = {https://doi.org/10.1038/s41588-019-0483-y},
20+
year = {2019},
21+
month = sep,
22+
publisher = {Springer Science and Business Media {LLC}},
23+
volume = {51},
24+
number = {9},
25+
pages = {1330--1338},
26+
author = {Jerome Kelleher and Yan Wong and Anthony W. Wohns and Chaimaa Fadil and Patrick K. Albers and Gil McVean},
27+
title = {Inferring whole-genome histories in large population datasets},
28+
journal = {Nature Genetics}
29+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# tsinfer <img align="right" width="145" height="90" src="https://raw.githubusercontent.com/tskit-dev/tsinfer/main/docs/tsinfer_logo.svg">
22

3-
[![CircleCI](https://circleci.com/gh/tskit-dev/tsinfer.svg?style=svg)](https://circleci.com/gh/tskit-dev/tsinfer) [![Build Status](https://travis-ci.org/tskit-dev/tsinfer.svg?branch=main)](https://travis-ci.org/tskit-dev/tsinfer) [![Documentation Status](https://readthedocs.org/projects/tsinfer/badge/?version=latest)](http://tsinfer.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/tskit-dev/tsinfer/branch/main/graph/badge.svg)](https://codecov.io/gh/tskit-dev/tsinfer)
3+
[![CircleCI](https://circleci.com/gh/tskit-dev/tsinfer.svg?style=svg)](https://circleci.com/gh/tskit-dev/tsinfer) [![Build Status](https://travis-ci.org/tskit-dev/tsinfer.svg?branch=main)](https://travis-ci.org/tskit-dev/tsinfer) [![Docs Build](https://github.com/tskit-dev/tsinfer/actions/workflows/docs.yml/badge.svg)](https://tskit.dev/tsinfer/docs/stable/introduction.html) [![codecov](https://codecov.io/gh/tskit-dev/tsinfer/branch/main/graph/badge.svg)](https://codecov.io/gh/tskit-dev/tsinfer)
44

55

66
Infer a tree sequence from genetic variation data
77

8-
The [documentation](http://tsinfer.readthedocs.io/en/latest/) contains details of how to use this software, including [installation instructions](https://tsinfer.readthedocs.io/en/latest/installation.html).
8+
The [documentation](https://tskit.dev/tsinfer/docs/stable) contains details of how to use this software, including [installation instructions](https://tskit.dev/tsinfer/docs/stable/installation.html).
99

1010
The algorithm, its rationale, and results from testing on simulated and real data are described in the following [Nature Genetics paper](https://doi.org/10.1038/s41588-019-0483-y):
1111

README.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

docs/CITATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CITATION.md

0 commit comments

Comments
 (0)