diff --git a/content/data/demo.trees b/content/data/demo.trees index 6537e0d..c460c3d 100644 Binary files a/content/data/demo.trees and b/content/data/demo.trees differ diff --git a/content/tskit.ipynb b/content/tskit.ipynb index 855b2b2..5748f6a 100644 --- a/content/tskit.ipynb +++ b/content/tskit.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4df88319-4951-4846-80ea-b8026c0eb096", + "id": "19a48cc0-ae22-4840-a9dd-2a73b665f32a", "metadata": {}, "source": [ "
| \n",
- " | \n",
- " |
|---|---|
| Trees | 1 811 |
| Sequence Length | 1 000 000 |
| Time Units | generations |
| Sample Nodes | 80 |
| Total Size | 375.2 KiB |
| Metadata | No Metadata | \n", - "
| Table | \n", - "Rows | \n", - "Size | \n", - "Has Metadata | \n", - "
|---|---|---|---|
| Edges | \n", - "6 979 | \n", - "218.1 KiB | \n", - "\n", - " \n", - " | \n", - "
| Individuals | \n", - "40 | \n", - "1.1 KiB | \n", - "\n", - " \n", - " | \n", - "
| Migrations | \n", - "0 | \n", - "8 Bytes | \n", - "\n", - " \n", - " | \n", - "
| Mutations | \n", - "989 | \n", - "35.8 KiB | \n", - "\n", - " \n", - " | \n", - "
| Nodes | \n", - "1 337 | \n", - "36.6 KiB | \n", - "\n", - " \n", - " | \n", - "
| Populations | \n", - "7 | \n", - "454 Bytes | \n", - "\n", - " ✅\n", - " | \n", - "
| Provenances | \n", - "3 | \n", - "4.5 KiB | \n", - "\n", - " \n", - " | \n", - "
| Sites | \n", - "989 | \n", - "24.2 KiB | \n", - "\n", - " \n", - " | \n", - "
| Provenance Timestamp | \n", - "Software Name | \n", - "Version | \n", - "Command | \n", - "Full record | \n", - "
|---|---|---|---|---|
| 13 January, 2026 at 12:17:04 PM | \n", - "msprime | \n", - "1.3.3.dev60+g1a86a021.d20250519 | \n", - "sim_mutations | \n", - "\n",
- " \n",
- " \n",
- " Details\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " schema_version: 1.0.0\n", - " \n",
- " software:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " name: msprimeversion: 1.3.3.dev60+g1a86a021.d2025051 9 \n", - " \n", - " \n",
- " parameters:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " command: sim_mutations\n", - " \n",
- " tree_sequence:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " __constant__: __current_ts__\n", - " rate: 5e-08 model: None start_time: None end_time: None discrete_genome: None keep: None random_seed: 123 \n", - " \n", - " \n",
- " environment:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " os:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " system: Darwinnode: Yans-M2.local release: 24.6.0 version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu- 11417.140.69~1/RELEASE_ARM64_T 8... machine: arm64 \n", - " \n", - " \n",
- " python:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " implementation: CPythonversion: 3.12.5 \n", - " \n", - " \n",
- " libraries:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " kastore:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 2.1.1\n", - " \n", - " \n",
- " tskit:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 1.0.0\n", - " \n", - " \n",
- " gsl:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 2.8\n", - " \n", - " \n", - " \n", - " | \n",
- "
| 13 January, 2026 at 12:17:04 PM | \n", - "tskit | \n", - "1.0.0 | \n", - "simplify | \n", - "\n",
- " \n",
- " \n",
- " Details\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " schema_version: 1.0.0\n", - " \n",
- " software:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " name: tskitversion: 1.0.0 \n", - " \n", - " \n",
- " parameters:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " command: simplifyTODO: add simplify parameters \n", - " \n", - " \n",
- " environment:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " os:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " system: Darwinnode: Yans-M2.local release: 24.6.0 version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu- 11417.140.69~1/RELEASE_ARM64_T 8... machine: arm64 \n", - " \n", - " \n",
- " python:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " implementation: CPythonversion: 3.12.5 \n", - " \n", - " \n",
- " libraries:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " kastore:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 2.1.1\n", - " \n", - " \n", - " \n", - " | \n",
- "
| 13 January, 2026 at 12:17:04 PM | \n", - "msprime | \n", - "1.3.3.dev60+g1a86a021.d20250519 | \n", - "sim_ancestry | \n", - "\n",
- " \n",
- " \n",
- " Details\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " schema_version: 1.0.0\n", - " \n",
- " software:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " name: msprimeversion: 1.3.3.dev60+g1a86a021.d2025051 9 \n", - " \n", - " \n",
- " parameters:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " command: sim_ancestrysamples: None \n", - " \n",
- " demography:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " populations:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 500growth_rate: 0.0 name: A description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: None initially_active: None id: 0 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 500growth_rate: 0.0 name: B description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: None initially_active: None id: 1 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 300growth_rate: 0.0 name: C description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: None initially_active: None id: 2 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 1000growth_rate: 0.0 name: D description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: None initially_active: None id: 3 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 500growth_rate: 0.0 name: pop_4 description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: 250.0 initially_active: False id: 4 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 500growth_rate: 0.0 name: pop_5 description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: 210.0 initially_active: False id: 5 __class__: msprime.demography.Population \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " initial_size: 500growth_rate: 0.0 name: pop_6 description: \n", - " \n",
- " extra_metadata:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "default_sampling_time: 400.0 initially_active: False id: 6 __class__: msprime.demography.Population \n", - " \n", - " \n", - " \n",
- " events:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " time: 210.0\n", - " \n",
- " derived:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " CD \n", - " ancestral: pop_5 __class__: msprime.demography.PopulationS plit \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " time: 250.0\n", - " \n",
- " derived:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " AB \n", - " ancestral: pop_4 __class__: msprime.demography.PopulationS plit \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " time: 400.0\n", - " \n",
- " derived:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " pop_4pop_5 \n", - " ancestral: pop_6 __class__: msprime.demography.PopulationS plit \n", - " \n", - " \n", - " \n",
- " migration_matrix:\n",
- " \n",
- " \n",
- " \n",
- " list\n", - " \n", - "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " list\n", - " 0.00.0 0.0 0.0 0.0 0.0 0.0 \n", - " \n", - " __class__: msprime.demography.Demography \n", - " sequence_length: 1000000.0 discrete_genome: None recombination_rate: 1e-07 gene_conversion_rate: None gene_conversion_tract_length: None population_size: None ploidy: None model: None \n", - " \n",
- " initial_state:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " __constant__: __current_ts__\n", - " start_time: None end_time: None record_migrations: None record_full_arg: None additional_nodes: None coalescing_segments_only: None num_labels: None random_seed: 123 replicate_index: 0 \n", - " \n", - " \n",
- " environment:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " os:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " system: Darwinnode: Yans-M2.local release: 24.6.0 version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:51 PDT 2025; root:xnu- 11417.140.69~1/RELEASE_ARM64_T 8... machine: arm64 \n", - " \n", - " \n",
- " python:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " implementation: CPythonversion: 3.12.5 \n", - " \n", - " \n",
- " libraries:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " \n", - "\n",
- " kastore:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 2.1.1\n", - " \n", - " \n",
- " tskit:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 1.0.0\n", - " \n", - " \n",
- " gsl:\n",
- " \n",
- " \n",
- " \n",
- " dict\n", - " version: 2.8\n", - " \n", - " \n", - " \n", - " | \n",
- "
sim_ancestry(), provided by msprime version 1.4.0, then simplified, with mutations finally added using the msprime sim_mutations() function.tskit.NULL (-1). Similarly although sample nodes are commonly paired into a diploid individuals, this is not a strict requirement for a valid tree sequence.