Taking subsequence of tree sequence object #2753
-
For reasons specific to issues I've encountered with the recombination and gene conversion parameters that I'm working with, I would like to use tskit tools to do the following: Suppose that I've generated a tree sequence object where initializeGenomicEelment() is given a length of 15kb. Given the output tree, I would like to create a new tree sequence object using only the middle 5 kb but retaining the tree structure. Is there a simple tskit function that will let me take a ts object and specify a subset/range of sites to consider? Thank you for any suggestions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
This may be what you are looking for. |
Beta Was this translation helpful? Give feedback.
Ah, you should probably add
simplify=False
to keep_intervals. Otherwise I think your populations may be renumbered as a result.This is quite confusing behaviour, I think you're not the first person to get tripped up on it! I seem to remember we had a discussion about this recently, but can't find it.