Skip to content

Commit

Permalink
🔤 Added documentation for time-dependent transcriptional relations; r…
Browse files Browse the repository at this point in the history
…emoved some stray print statements
  • Loading branch information
jjmccollum committed Apr 24, 2024
1 parent 5ea65e9 commit 04e9630
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 20 additions & 0 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,26 @@ summing multiple rates if more than one tag is specified for a transition.
All transitions not covered by a ``relation`` element (e.g., a transition from reading 3 to reading 1, which is not covered in the example above) will be assigned the "default" rate of 1.
Accordingly, if no ``listRelation`` for transcriptional change categories is specified at all, then the substitution model for a variation unit with *k* substantive readings will default to the Lewis Mk model.

In many cases, certain transcriptional explanations are applicable only at certain times.
For instance, assimilation to a popular text that arose at a later point in the tradition's history (modeled with the ``Byz`` class in the above example) would only be available as a transcriptional explanation after this point.
Skips of the eye may be empirically more common for earlier scribes than for later ones.
Certain paleographic confusions may only be possible for earlier scripts or later ones.
Specific orthodox corruptions of sacred texts may have only become plausible after certain theological conflicts or developments had taken place to inspire them.
If you wish to encode such transcriptional possibilities as time-dependent, you can do so by adding ``@notBefore`` and ``@notAfter`` attributes to the corresponding ``relation`` element:

.. code:: xml
<listRelation type="transcriptional">
<relation active="1 2 3" passive="4" ana="#Harm"/>
<relation active="1" passive="2 3 4" ana="#Clar"/>
<relation active="2" passive="1" ana="#VisErr"/>
<relation active="2" passive="3" ana="#Clar #Harm"/>
<relation active="3" passive="4" ana="#Clar"/>
<relation active="1 2 4" passive="3" ana="#Byz" notBefore="500"/>
</listRelation>
If you tag certain transcriptional ``relation`` elements in this way, ``teiphy`` will map the ``listRelation`` to an ``EpochSubstitutionModel`` instance consisting of multiple substitution models that apply at the corresponding points in time.

Logging for Ancestral State Reconstructions
-------------------------------------------

Expand Down
2 changes: 0 additions & 2 deletions teiphy/collation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,6 @@ def get_beast_origin_span(self, tip_date_range):
# If the lower bound on the date of the work's composition is defined, then set the upper bound on the height of the origin using it and the latest tip date:
if self.origin_date_range[0] is not None:
origin_span[1] = tip_date_range[1] - self.origin_date_range[0]
print(self.origin_date_range)
print(origin_span)
return tuple(origin_span)

def get_beast_date_map(self, taxlabels):
Expand Down

0 comments on commit 04e9630

Please sign in to comment.