Skip to content

Commit 7a5ed4e

Browse files
authored
Merge pull request #435 from hyanwong/extras
Add note on mutational posteriors for unphased singletons
2 parents fb8c726 + 4ebc4b7 commit 7a5ed4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tsdate/variational.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,13 +906,18 @@ def node_posteriors(self):
906906

907907
def mutation_posteriors(self):
908908
"""
909-
Return parameters specifying the inferred posterior distribution of mutation
909+
Returns parameters specifying the inferred posterior distribution of mutation
910910
times which can be e.g. read into a ``pandas.DataFrame`` for further analysis.
911911
These are calculated as the midpoint distribution of the posterior node time
912912
distributions of the node above and below the mutation. Note that this means
913913
it is possible for a mean mutation time not to lie between the mean values of
914914
its parent and child nodes.
915915
916+
.. note::
917+
For unphased singletons, the posterior mutation time is integrated over
918+
the two possible haploid genomes on which the singleton could be placed,
919+
accounting for the relative branch lengths above each genome.
920+
916921
:return: The distribution of posterior mutation times as a structured array
917922
of mean and variance. Row ``i`` gives the mean and variance of inferred
918923
mutations times for mutation ``i``.

0 commit comments

Comments
 (0)