@@ -387,10 +387,10 @@ The tree sequence itself also has metadata stored as a byte array.
387
387
### Valid tree sequence requirements
388
388
389
389
Arbitrary data can be stored in tables using the classes in the
390
- {ref}` sec_tables_api ` . However, only a {class }` TableCollection `
391
- that fulfils a set of requirements represents
392
- a valid {class}` TreeSequence ` object which can be obtained
393
- using the {meth} ` TableCollection.tree_sequence ` method . In this
390
+ {ref}` sec_tables_api ` . The {meth }` TableCollection.tree_sequence ` method
391
+ can be used to turn such a {class} ` TableCollection ` into an immutable
392
+ {class}` TreeSequence ` object, but this requires the tables to
393
+ fulfil a specific set of requirements . In this
394
394
section we list these requirements, and explain their rationale.
395
395
Violations of most of these requirements are detected when the
396
396
user attempts to load a tree sequence via {func}` tskit.load ` or
@@ -598,6 +598,21 @@ can be used to create an index on a table collection if necessary.
598
598
Add more details on what the indexes actually are.
599
599
:::
600
600
601
+
602
+ (sec_data_model_saving)=
603
+
604
+ ### Saving to file
605
+
606
+ When serializing (storing a tree sequence on disk). the underlying tables are stored
607
+ along with the indexes * and other stuff* . When the tree sequence is loaded from file,
608
+ it is then guaranteed to be valid, with pre-calculated indexes and cached properties
609
+ immediately available.
610
+
611
+ If a TableCollection is saved to file, then any indexes are also stored in the
612
+ file. A TableCollection that has been loaded from a file is not, however, guaranteed
613
+ to be a valid tree sequence.
614
+
615
+
601
616
(sec_data_model_data_encoding)=
602
617
603
618
## Data encoding
0 commit comments