Skip to content

Commit b2c9942

Browse files
committed
Prepping for release
1 parent 55b167b commit b2c9942

16 files changed

Lines changed: 488 additions & 172 deletions

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
## Overview
44

5-
Tskit enables performant storage, manipulation, and analysis of ancestral
5+
`Tskit` enables performant storage, manipulation, and analysis of ancestral
66
recombination graphs (ARGs) using succinct tree sequence encoding.
77
See https://tskit.dev for project news, documentation, and tutorials.
8-
Tskit provides Python, C, and Rust APIs. The Python API can be called from R
9-
via the `reticulate` R package to seamlessly load and analyse a tree sequence,
10-
as described at https://tskit.dev/tutorials/RcppTskit.html.
8+
`Tskit` provides Python, C, and Rust application programming interfaces (APIs).
9+
The Python API can be called from R via the `reticulate` R package to
10+
seamlessly load and analyse a tree sequence, as described at
11+
https://tskit.dev/tutorials/RcppTskit.html.
1112
`RcppTskit` provides R access to the `tskit` C API for use cases where the
1213
`reticulate` option is not optimal. For example, for high-performance and
1314
low-level work with tree sequences. Currently, `RcppTskit` provides a limited

RcppTskit/.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
^\.covrignore$
1111
^\.github$
1212
^codecov\.yaml$
13+
^cran-comments\.md$
1314
^inst/examples/create_test\.trees\.R$
1415
^inst/examples/create_test\.trees\.py$
1516
^notes_pkg_dev\.Rmd$

RcppTskit/DESCRIPTION

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
Type: Package
22
Package: RcppTskit
3-
Title: R access to the tskit C API
3+
Title: R Access to the Tskit C API
44
Version: 0.1.0
5-
Date: 2026-01-2607
6-
Authors@R:
7-
person("Gregor", "Gorjanc", , "gregor.gorjanc@gmail.com", role = c("aut", "cre"),
8-
comment = c(ORCID = "0000-0001-8008-2787"))
9-
Description: Tskit enables performant storage, manipulation, and analysis
10-
of ancestral recombination graphs (ARGs) using succinct tree sequence
11-
encoding. See https://tskit.dev for project news, documentation, and
12-
tutorials. Tskit provides Python, C, and Rust APIs. The Python API
13-
can be called from R via the `reticulate` R package to seamlessly load
14-
and analyse a tree sequence as described at
15-
https://tskit.dev/tutorials/RcppTskit.html. `RcppTskit` provides R
5+
Date: 2026-01-27
6+
Authors@R: c(
7+
person("Gregor", "Gorjanc", , "gregor.gorjanc@gmail.com", role = c("aut", "cre", "cph"),
8+
comment = c(ORCID = "0000-0001-8008-2787")),
9+
person("Tskit Developers", role = "cph",
10+
comment = "Authors of included tskit C library")
11+
)
12+
Description: `Tskit` enables performant storage, manipulation, and
13+
analysis of ancestral recombination graphs (ARGs) using succinct tree
14+
sequence encoding. See https://tskit.dev for project news,
15+
documentation, and tutorials. `Tskit` provides Python, C, and Rust
16+
application programming interfaces (APIs). The Python API can be
17+
called from R via the `reticulate` R package to seamlessly load and
18+
analyse a tree sequence as described at
19+
https://tskit.dev/tutorials/tskitr.html. `RcppTskit` provides R
1620
access to the `tskit` C API for use cases where the `reticulate`
1721
option is not optimal. For example, for high-performance and low-level
1822
work with tree sequences. Currently, `RcppTskit` provides a limited

RcppTskit/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
YEAR: 2025
1+
YEAR: 2026
22
COPYRIGHT HOLDER: Gregor Gorjanc

RcppTskit/LICENSE.note

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The tskit C library is distributed under the MIT license.
2+
Full copies of the license are included in `inst/include/tskit/LICENSE` and `src/tskit/LICENSE.

RcppTskit/R/Class-TreeSequence.R

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ TreeSequence <- R6Class(
7171
},
7272

7373
#' @description Alias for \code{\link[=TreeSequence]{TreeSequence$dump}}.
74-
#' @param file see
75-
#' @param options see
74+
#' @param file see \code{\link[=TreeSequence]{TreeSequence$dump}}.
75+
#' @param options see \code{\link[=TreeSequence]{TreeSequence$dump}}.
7676
write = function(file, options = 0L) {
7777
self$dump(file = file, options = options)
7878
},
@@ -120,107 +120,137 @@ TreeSequence <- R6Class(
120120
},
121121

122122
#' @description Get the number of provenances in a tree sequence.
123+
#' @examples
123124
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
124125
#' ts <- ts_load(ts_file)
125-
#' ts_num_provenances(ts)
126+
#' ts$num_provenances()
126127
num_provenances = function() {
127128
ts_num_provenances_ptr(self$pointer)
128129
},
129130

130131
#' @description Get the number of populations in a tree sequence.
132+
#' @examples
131133
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
132134
#' ts <- ts_load(ts_file)
133-
#' ts_num_populations(ts)
135+
#' ts$num_populations()
134136
num_populations = function() {
135137
ts_num_populations_ptr(self$pointer)
136138
},
137139

138140
#' @description Get the number of migrations in a tree sequence.
141+
#' @examples
139142
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
140143
#' ts <- ts_load(ts_file)
141-
#' ts_num_migrations(ts)
144+
#' ts$num_migrations()
142145
num_migrations = function() {
143146
ts_num_migrations_ptr(self$pointer)
144147
},
145148

146149
#' @description Get the number of individuals in a tree sequence.
150+
#' @examples
147151
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
148152
#' ts <- ts_load(ts_file)
149-
#' ts_num_individuals(ts)
153+
#' ts$num_individuals()
150154
num_individuals = function() {
151155
ts_num_individuals_ptr(self$pointer)
152156
},
153157

154158
#' @description Get the number of samples (of nodes) in a tree sequence.
159+
#' @examples
155160
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
156161
#' ts <- ts_load(ts_file)
157-
#' ts_num_samples(ts)
162+
#' ts$num_samples()
158163
num_samples = function() {
159164
ts_num_samples_ptr(self$pointer)
160165
},
161166

162167
#' @description Get the number of nodes in a tree sequence.
168+
#' @examples
163169
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
164170
#' ts <- ts_load(ts_file)
165-
#' ts_num_nodes(ts)
171+
#' ts$num_nodes()
166172
num_nodes = function() {
167173
ts_num_nodes_ptr(self$pointer)
168174
},
169175

170176
#' @description Get the number of edges in a tree sequence.
177+
#' @examples
171178
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
172179
#' ts <- ts_load(ts_file)
173-
#' ts_num_edges(ts)
180+
#' ts$num_edges()
174181
num_edges = function() {
175182
ts_num_edges_ptr(self$pointer)
176183
},
177184

178185
#' @description Get the number of trees in a tree sequence.
186+
#' @examples
179187
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
180188
#' ts <- ts_load(ts_file)
181-
#' ts_num_trees(ts)
189+
#' ts$num_trees()
182190
num_trees = function() {
183191
ts_num_trees_ptr(self$pointer)
184192
},
185193

186194
#' @description Get the number of sites in a tree sequence.
195+
#' @examples
187196
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
188197
#' ts <- ts_load(ts_file)
189-
#' ts_num_sites(ts)
198+
#' ts$num_sites()
190199
num_sites = function() {
191200
ts_num_sites_ptr(self$pointer)
192201
},
193202

194203
#' @description Get the number of mutations in a tree sequence.
204+
#' @examples
195205
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
196206
#' ts <- ts_load(ts_file)
197-
#' ts_num_mutations(ts)
207+
#' ts$num_mutations()
198208
num_mutations = function() {
199209
ts_num_mutations_ptr(self$pointer)
200210
},
201211

202212
#' @description Get the sequence length.
213+
#' @examples
203214
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
204215
#' ts <- ts_load(ts_file)
205-
#' ts_sequence_length(ts)
216+
#' ts$sequence_length()
206217
sequence_length = function() {
207218
ts_sequence_length_ptr(self$pointer)
208219
},
209220

210221
#' @description Get the time units string.
222+
#' @examples
211223
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
212224
#' ts <- ts_load(ts_file)
213-
#' ts_time_units(ts)
225+
#' ts$time_units()
214226
time_units = function() {
215227
ts_time_units_ptr(self$pointer)
216228
},
217229

230+
#' @description Get the min time in node table and mutation table.
231+
#' @examples
232+
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
233+
#' ts <- ts_load(ts_file)
234+
#' ts$min_time()
235+
min_time = function() {
236+
ts_min_time_ptr(self$pointer)
237+
},
238+
239+
#' @description Get the max time in node table and mutation table.
240+
#' @examples
241+
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
242+
#' ts <- ts_load(ts_file)
243+
#' ts$max_time()
244+
max_time = function() {
245+
ts_max_time_ptr(self$pointer)
246+
},
247+
218248
#' @description Get the length of metadata in a tree sequence and its tables.
219249
#' @return A named list with the length of metadata.
220250
#' @examples
221-
#'ts_file <- system.file("examples/test.trees", package = "RcppTskit")
251+
#' ts_file <- system.file("examples/test.trees", package = "RcppTskit")
222252
#' ts <- ts_load(ts_file)
223-
#'ts$metadata_length()
253+
#' ts$metadata_length()
224254
metadata_length = function() {
225255
ts_metadata_length_ptr(self$pointer)
226256
}

RcppTskit/R/RcppExports.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ ts_metadata_length_ptr <- function(ts) {
9595
.Call(`_RcppTskit_ts_metadata_length_ptr`, ts)
9696
}
9797

98-
ts_grow <- function(ts) {
99-
.Call(`_RcppTskit_ts_grow`, ts)
100-
}
101-
10298
test_tsk_bug_assert_c <- function() {
10399
invisible(.Call(`_RcppTskit_test_tsk_bug_assert_c`))
104100
}

RcppTskit/R/RcppTskit-package.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Contains the package description and .onLoad() function
22

33
#' @description
4-
#' Tskit enables performant storage, manipulation, and analysis of
4+
#' `Tskit` enables performant storage, manipulation, and analysis of
55
#' ancestral recombination graphs (ARGs) using succinct tree sequence encoding.
66
#' See https://tskit.dev for project news, documentation, and tutorials.
7-
#' Tskit provides Python, C, and Rust APIs. The Python API can be called from R
8-
#' via the `reticulate` R package to seamlessly load and analyse a tree sequence
9-
#' as described at https://tskit.dev/tutorials/tskitr.html.
7+
#' `Tskit` provides Python, C, and Rust application programming interfaces (APIs).
8+
#' The Python API can be called from R via the `reticulate` R package to
9+
#' seamlessly load and analyse a tree sequence as described at
10+
#' https://tskit.dev/tutorials/tskitr.html.
1011
#' `RcppTskit` provides R access to the `tskit` C API for use cases where the
1112
#' `reticulate` option is not optimal. For example, for high-performance
1213
#' and low-level work with tree sequences. Currently, `RcppTskit` provides a

RcppTskit/cran-comments.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## R CMD check results
2+
3+
0 errors | 0 warnings | 1 note
4+
5+
* This is a new release.

RcppTskit/man/RcppTskit-package.Rd

Lines changed: 14 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)