tskit
tskit copied to clipboard
Population-scale genomics
The implementation of the $f_2$-statistic for data with multiallelic sites is not symmetric (as would be expected from the definition of the statistic), I narrowed it down to the following...
with: [afs_error.trees.gz](https://github.com/tskit-dev/tskit/files/14940747/afs_error.trees.gz) ```python import tskit print(tskit.__version__) # '0.5.7.dev0' ts = tskit.load("afs_error.trees") ts.allele_frequency_spectrum() # works ts.allele_frequency_spectrum(sample_sets=[[x for x in range(64)]]) # segfaults # Bug detected in lib/tskit/trees.c at line 2721. If...
This just took me way to long to do: ```python def node_is_sample(ts): sample_flag = np.full_like(ts.nodes_flags, tskit.NODE_IS_SAMPLE) return np.bitwise_and(ts.nodes_flags, sample_flag) != 0 ``` Tests: ```python class TestNodeIsSample: def test_simple_example(self): ts =...
Since we developed the GitHub workflows there has been quite a bit of stuff done to avoid the repetition we currently have. Our Python-only projects really should have more or...
It would be nice to implement the things like ```python # What is the reference base at position 12345? ts.reference_sequence[12345] # What are the bases between position a and b?...
For numpy2 checks etc.
Use a thin space to indicate groups of 1000s.
## Description Add mid property to the Interval and Tree class, as requested in #2903 # PR Checklist: - [x] Tests that fully cover new/changed functionality. - [x] Documentation including...
I don't think we do anything with the benchmarks @benjeffery - shall we drop them, in the interest of simplifying our CI setup? We can probably drop the benchmark code...