Skip to content

Commit 0b135e9

Browse files
committed
Use .arg instead of .trees
1 parent b6d7eab commit 0b135e9

24 files changed

Lines changed: 120 additions & 122 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build-gcc
22
.DS_Store
3-
python/benchmark/*.trees
3+
python/benchmark/*.arg
44
python/benchmark/*.json
55
python/benchmark/*.html
66
.venv

c/examples/cpp_sorting_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ int
7373
main(int argc, char **argv)
7474
{
7575
if (argc != 3) {
76-
std::cerr << "Usage: " << argv[0] << " input.trees output.trees\n";
76+
std::cerr << "Usage: " << argv[0] << " input.arg output.arg\n";
7777
std::exit(0);
7878
}
7979
const char *infile = argv[1];

c/tskit/tables.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4001,7 +4001,7 @@ Options can be specified by providing one or more of the following bitwise
40014001
40024002
int ret;
40034003
tsk_table_collection_t tables;
4004-
ret = tsk_table_collection_load(&tables, "data.trees", 0);
4004+
ret = tsk_table_collection_load(&tables, "data.arg", 0);
40054005
if (ret != 0) {
40064006
fprintf(stderr, "Load error:%s\n", tsk_strerror(ret));
40074007
exit(EXIT_FAILURE);
@@ -4096,7 +4096,7 @@ and well formed files will be written.
40964096
error_check(ret);
40974097
tables.sequence_length = 1.0;
40984098
// Write out the empty tree sequence
4099-
ret = tsk_table_collection_dump(&tables, "empty.trees", 0);
4099+
ret = tsk_table_collection_dump(&tables, "empty.arg", 0);
41004100
error_check(ret);
41014101
41024102
@endrst

c/tskit/trees.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ that function's documentation for details and options.
338338
339339
int ret;
340340
tsk_treeseq_t ts;
341-
ret = tsk_treeseq_load(&ts, "data.trees", 0);
341+
ret = tsk_treeseq_load(&ts, "data.arg 0);
342342
if (ret != 0) {
343343
fprintf(stderr, "Load error:%s\n", tsk_strerror(ret));
344344
exit(EXIT_FAILURE);

docs/c-api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Do I need the C API?
2323
The ``tskit`` C API is generally useful in the following situations:
2424

2525
- You want to use the ``tskit`` API in a larger C/C++ application (e.g.,
26-
in order to output data in the ``.trees`` format);
26+
in order to output data in the ``.arg`` format);
2727
- You need to perform lots of tree traversals/loops etc. to analyse some
2828
data that is in tree sequence form.
2929

@@ -909,15 +909,15 @@ normally.
909909

910910
Running this program on some tree sequence files we might get::
911911

912-
$ cat tmp1.trees tmp2.trees | ./build/streaming > no_mutations.trees
912+
$ cat tmp1.arg tmp2.arg | ./build/streaming > no_mutations.arg
913913
Tree sequence 0 had 38 mutations
914914
Tree sequence 1 had 132 mutations
915915

916916
Then, running this program again on the output of the previous command,
917917
we see that we now have two tree sequences with their mutations removed
918-
stored in the file ``no_mutations.trees``::
918+
stored in the file ``no_mutations.arg``::
919919

920-
$ ./build/streaming < no_mutations.trees > /dev/null
920+
$ ./build/streaming < no_mutations.arg > /dev/null
921921
Tree sequence 0 had 0 mutations
922922
Tree sequence 1 had 0 mutations
923923

docs/export.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If we have a tree sequence file the
4141
convenient way to convert to VCF:
4242

4343
:::{code-block} bash
44-
$ tskit vcf example.trees > example.vcf
44+
$ tskit vcf example.arg > example.vcf
4545
:::
4646

4747
See the {ref}`sec_export_vcf_compression` section for information
@@ -137,14 +137,14 @@ The simplest way to compress the VCF output is to use the
137137
and pipe the output to `bgzip`:
138138

139139
:::{code-block} bash
140-
$ tskit vcf example.trees | bgzip -c > example.vcf.gz
140+
$ tskit vcf example.arg | bgzip -c > example.vcf.gz
141141
:::
142142
A general way to convert VCF data to various formats is to pipe the text
143143
produced by ``tskit`` into ``bcftools`` using the command
144144
line interface:
145145

146146
:::{code-block} bash
147-
$ tskit vcf example.trees | bcftools view -O b > example.bcf
147+
$ tskit vcf example.arg | bcftools view -O b > example.bcf
148148
:::
149149

150150
If you need more control over the form of the output (or want to work

docs/file-formats.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ data on file in a columnar, binary format. The format is based on the
2929
key-value store for numerical data. There is a one-to-one correspondence
3030
between the tables described above and the arrays stored in these files.
3131

32-
By convention, these files are given the `.trees` suffix (although this
33-
is not enforced in any way), and we will sometimes refer to them as ".trees"
32+
By convention, these files are given the `.arg` suffix (although this
33+
is not enforced in any way), and we will sometimes refer to them as ".arg"
3434
files. We also refer to them as "tree sequence files".
3535

3636
:::{todo}

docs/provenance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This documentation serves two distinct purposes:
3030
1. For developers using `tskit` in their own applications, it provides normative documentation
3131
for how provenance information should be stored.
3232
2. For end-users of `tskit`, it provides documentation to allows them to inspect and interpret
33-
the provenance information stored in `.trees` files.
33+
the provenance information stored in `.arg` files.
3434

3535
Provenance information is encoded using [JSON](https://www.json.org/).
3636
To standardise the provenance information produced by different software and improve
@@ -167,7 +167,7 @@ here even though it was automatically generated.
167167
Consider the following invocation of a hypothetical command line program:
168168

169169
```bash
170-
$ supersim --sample-size=10 --do-some-stuff -O out.trees
170+
$ supersim --sample-size=10 --do-some-stuff -O out.arg
171171
```
172172

173173
We recommend encoding the parameters provenance as follows (other fields omitted
@@ -177,7 +177,7 @@ for clarity):
177177
{
178178
"parameters": {
179179
"command": "supersim",
180-
"args": ["--sample-size=10", "--do-some-stuff", "-O", "out.trees"],
180+
"args": ["--sample-size=10", "--do-some-stuff", "-O", "out.arg"],
181181
"random_seed": 56789
182182
}
183183
}
@@ -245,7 +245,7 @@ account for resource usage across pipelines of tools.
245245
## Full schema
246246

247247
This schema is formally defined using [JSON Schema](http://json-schema.org/) and
248-
given in full here. Developers writing provenance information to `.trees` files
248+
given in full here. Developers writing provenance information to `.arg` files
249249
should validate the output JSON against this schema.
250250

251251
```{eval-rst}

docs/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def basic_sim():
2727
recombination_rate=1e-7,
2828
random_seed=665)
2929
ts = msprime.sim_mutations(ts, rate=2e-7, random_seed=123)
30-
ts.dump("data/basic_tree_seq.trees")
30+
ts.dump("data/basic_tree_seq.arg")
3131
3232
def create_notebook_data():
3333
basic_sim()
@@ -53,7 +53,7 @@ sites.
5353
```{code-cell}
5454
import tskit
5555
56-
ts = tskit.load("data/basic_tree_seq.trees") # Or generate using e.g. msprime.sim_ancestry()
56+
ts = tskit.load("data/basic_tree_seq.arg") # Or generate using e.g. msprime.sim_ancestry()
5757
ts # In a Jupyter notebook this displays a summary table. Otherwise use print(ts)
5858
```
5959

0 commit comments

Comments
 (0)