Skip to content

Commit 7d64905

Browse files
committed
Clarify docs on allowing mixed node types
1 parent d732eb6 commit 7d64905

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

python/CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
[0.6.4] - 2025-XX-XX
33
--------------------
44

5+
**Changes**
6+
7+
- Allow mixed sample and non-sample nodes to be output by ``write_vcf``.
8+
and for individuals without nodes to be specified for output, although
9+
they will not appear in the VCF. Individuals without nodes no longer
10+
raise an error and are instead ignored, except in the case where they
11+
are explicitly specified in the ``individuals`` argument.
12+
(:user:`benjeffery`, :pr:`3157`)
13+
514
**Features**
615

716
- Add ``TreeSequence.sample_nodes_by_ploidy`` method to return the sample nodes

python/tskit/trees.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6432,14 +6432,9 @@ def write_vcf(
64326432
with sample nodes are included in increasing order of individual ID.
64336433
64346434
Subsets or permutations of the sample individuals may be specified
6435-
using the ``individuals`` argument. It is an error to specify any
6436-
individuals that are not associated with any nodes, or whose
6437-
nodes are not all samples.
6438-
6439-
Mixed-sample individuals (e.g., those associated with one node
6440-
that is a sample and another that is not) in the data model will
6441-
result in an error by default. However, such individuals can be
6442-
excluded using the ``individuals`` argument.
6435+
using the ``individuals`` argument. An individual specified that
6436+
is not associated with any nodes will be ignored and not included in the
6437+
output.
64436438
64446439
If there are no individuals in the tree sequence,
64456440
synthetic individuals are created by combining adjacent samples, and

0 commit comments

Comments
 (0)