Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build-gcc
.DS_Store
python/benchmark/*.trees
python/benchmark/*.arg
python/benchmark/*.json
python/benchmark/*.html
.venv
Expand Down
2 changes: 1 addition & 1 deletion c/examples/cpp_sorting_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int
main(int argc, char **argv)
{
if (argc != 3) {
std::cerr << "Usage: " << argv[0] << " input.trees output.trees\n";
std::cerr << "Usage: " << argv[0] << " input.arg output.arg\n";
std::exit(0);
}
const char *infile = argv[1];
Expand Down
4 changes: 2 additions & 2 deletions c/tskit/tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -4001,7 +4001,7 @@ Options can be specified by providing one or more of the following bitwise

int ret;
tsk_table_collection_t tables;
ret = tsk_table_collection_load(&tables, "data.trees", 0);
ret = tsk_table_collection_load(&tables, "data.arg", 0);
if (ret != 0) {
fprintf(stderr, "Load error:%s\n", tsk_strerror(ret));
exit(EXIT_FAILURE);
Expand Down Expand Up @@ -4096,7 +4096,7 @@ and well formed files will be written.
error_check(ret);
tables.sequence_length = 1.0;
// Write out the empty tree sequence
ret = tsk_table_collection_dump(&tables, "empty.trees", 0);
ret = tsk_table_collection_dump(&tables, "empty.arg", 0);
error_check(ret);

@endrst
Expand Down
2 changes: 1 addition & 1 deletion c/tskit/trees.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ that function's documentation for details and options.

int ret;
tsk_treeseq_t ts;
ret = tsk_treeseq_load(&ts, "data.trees", 0);
ret = tsk_treeseq_load(&ts, "data.arg 0);
if (ret != 0) {
fprintf(stderr, "Load error:%s\n", tsk_strerror(ret));
exit(EXIT_FAILURE);
Expand Down
8 changes: 4 additions & 4 deletions docs/c-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Do I need the C API?
The ``tskit`` C API is generally useful in the following situations:

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

Expand Down Expand Up @@ -909,15 +909,15 @@ normally.

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

$ cat tmp1.trees tmp2.trees | ./build/streaming > no_mutations.trees
$ cat tmp1.arg tmp2.arg | ./build/streaming > no_mutations.arg
Tree sequence 0 had 38 mutations
Tree sequence 1 had 132 mutations

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

$ ./build/streaming < no_mutations.trees > /dev/null
$ ./build/streaming < no_mutations.arg > /dev/null
Tree sequence 0 had 0 mutations
Tree sequence 1 had 0 mutations

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If we have a tree sequence file the
convenient way to convert to VCF:

:::{code-block} bash
$ tskit vcf example.trees > example.vcf
$ tskit vcf example.arg > example.vcf
:::

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

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

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

If you need more control over the form of the output (or want to work
Expand Down
4 changes: 2 additions & 2 deletions docs/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ data on file in a columnar, binary format. The format is based on the
key-value store for numerical data. There is a one-to-one correspondence
between the tables described above and the arrays stored in these files.

By convention, these files are given the `.trees` suffix (although this
is not enforced in any way), and we will sometimes refer to them as ".trees"
By convention, these files are given the `.arg` suffix (although this
is not enforced in any way), and we will sometimes refer to them as ".arg"
files. We also refer to them as "tree sequence files".
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a "note" call out here or something noting that we changed the convention from .trees to .arg, also with some reassurances that you can keep any .trees or .ts files if you want, it doesn't make any actual difference.


:::{todo}
Expand Down
8 changes: 4 additions & 4 deletions docs/provenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This documentation serves two distinct purposes:
1. For developers using `tskit` in their own applications, it provides normative documentation
for how provenance information should be stored.
2. For end-users of `tskit`, it provides documentation to allows them to inspect and interpret
the provenance information stored in `.trees` files.
the provenance information stored in `.arg` files.

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

```bash
$ supersim --sample-size=10 --do-some-stuff -O out.trees
$ supersim --sample-size=10 --do-some-stuff -O out.arg
```

We recommend encoding the parameters provenance as follows (other fields omitted
Expand All @@ -177,7 +177,7 @@ for clarity):
{
"parameters": {
"command": "supersim",
"args": ["--sample-size=10", "--do-some-stuff", "-O", "out.trees"],
"args": ["--sample-size=10", "--do-some-stuff", "-O", "out.arg"],
"random_seed": 56789
}
}
Expand Down Expand Up @@ -245,7 +245,7 @@ account for resource usage across pipelines of tools.
## Full schema

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

```{eval-rst}
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def basic_sim():
recombination_rate=1e-7,
random_seed=665)
ts = msprime.sim_mutations(ts, rate=2e-7, random_seed=123)
ts.dump("data/basic_tree_seq.trees")
ts.dump("data/basic_tree_seq.arg")

def create_notebook_data():
basic_sim()
Expand All @@ -53,7 +53,7 @@ sites.
```{code-cell}
import tskit

ts = tskit.load("data/basic_tree_seq.trees") # Or generate using e.g. msprime.sim_ancestry()
ts = tskit.load("data/basic_tree_seq.arg") # Or generate using e.g. msprime.sim_ancestry()
ts # In a Jupyter notebook this displays a summary table. Otherwise use print(ts)
```

Expand Down
24 changes: 12 additions & 12 deletions python/benchmark/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ benchmarks:
- code: ts = tskit.load("{filename}")
parameters:
filename: &files
- "tiny.trees"
- "bench.trees"
- "tiny.arg"
- "bench.arg"

- code: ts.dump("/dev/null");"{filename}"
setup: |
Expand All @@ -18,7 +18,7 @@ benchmarks:
#, site_mask=site_mask, sample_mask=sample_mask)
setup: |
import numpy
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tables = ts.tables
tables.migrations.clear()
ts = tables.tree_sequence()
Expand All @@ -37,7 +37,7 @@ benchmarks:
tree.seek(pos)
pos = 0 if pos == 500_000 else 500_000
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tree = ts.first()
pos = 500_000

Expand All @@ -48,7 +48,7 @@ benchmarks:

- code: tree.{array}
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tree = ts.first()
parameters:
array: &tree_arrays
Expand All @@ -62,7 +62,7 @@ benchmarks:

- code: tree.{array}(42);
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tree = ts.first()
parameters:
array:
Expand All @@ -76,7 +76,7 @@ benchmarks:

- code: tree.{traversal_order}()
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tree = ts.first()
parameters:
traversal_order: &traversal_orders
Expand All @@ -102,7 +102,7 @@ benchmarks:
filename: *files

- code: "for row in ts.{table}(): pass"
setup: ts = tskit.load("bench.trees")
setup: ts = tskit.load("bench.arg")
parameters:
table: &tables
- nodes
Expand All @@ -128,7 +128,7 @@ benchmarks:

- code: ts.{table}(1)
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
parameters:
table:
- node
Expand All @@ -141,18 +141,18 @@ benchmarks:
- provenance

- code: ts.tables
setup: ts = tskit.load("bench.trees")
setup: ts = tskit.load("bench.arg")

- code: tables.{table}
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tables = ts.tables
parameters:
table: *tables

- code: x = {table}.{column}
setup: |
ts = tskit.load("bench.trees")
ts = tskit.load("bench.arg")
tables = ts.tables
{table} = tables.{table}
parameters: &table_columns
Expand Down
4 changes: 2 additions & 2 deletions python/benchmark/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def system_info():


def make_file():
benchmark_trees = tskit_dir / "benchmark" / "bench.trees"
benchmark_trees = tskit_dir / "benchmark" / "bench.arg"
if not os.path.exists(benchmark_trees):
print("Generating benchmark trees...")
demography = msprime.Demography()
Expand Down Expand Up @@ -70,7 +70,7 @@ def make_file():
record_provenance=True,
)
ts = msprime.sim_mutations(ts, rate=0.001, random_seed=42)
ts.dump(tskit_dir / "benchmark" / "tiny.trees")
ts.dump(tskit_dir / "benchmark" / "tiny.arg")


def autotime(setup, code):
Expand Down
2 changes: 1 addition & 1 deletion python/tests/data/SLiM/minimal-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ initialize() {
sim.addSubpop("p1", 5);
}
3 {
sim.treeSeqOutput("tests/data/SLiM/minimal-example.trees");
sim.treeSeqOutput("tests/data/SLiM/minimal-example.arg");
sim.simulationFinished();
}
2 changes: 1 addition & 1 deletion python/tests/data/SLiM/single-locus-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ initialize() {
sim.addSubpop("p1", 5);
}
3 {
sim.treeSeqOutput("tests/data/SLiM/single-locus-example.trees");
sim.treeSeqOutput("tests/data/SLiM/single-locus-example.arg");
sim.simulationFinished();
}
2 changes: 1 addition & 1 deletion python/tests/ibd.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def passes_filters(self, a, b, left, right):
"""
A simple CLI for running IBDFinder on a command line from the `python`
subdirectory. Basic usage:
> python3 ./tests/ibd.py --infile test.trees
> python3 ./tests/ibd.py --infile test.arg
"""

parser = argparse.ArgumentParser(
Expand Down
Loading
Loading