Skip to content

Initial tskit conversion code #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

benjeffery
Copy link
Contributor

Stacked on #344, clean diff at 9f5ae9a

Copy link
Contributor

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Big validation of your general VCZ code.

self.num_records = self.ts.num_sites
self.positions = self.ts.sites_position

def _make_sample_mapping(self, ploidy):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it belongs in tskit. Let's file an issue there to support once we have something working committed here.


def iter_field(self, field_name, shape, start, stop):
if field_name == "position":
for pos in self.ts.tables.sites.position[start:stop]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.ts.sites_position - you're creating a copy of the tables every time here!


self.samples = [vcz.Sample(id=f"tsk_{j}") for j in range(self.num_samples)]

def iter_alleles(self, start, stop, num_alleles):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, it's a bit unfortunate we have to do this. I can see ways to work around though.

@coveralls
Copy link
Collaborator

coveralls commented Apr 8, 2025

Coverage Status

coverage: 98.226% (-0.6%) from 98.867%
when pulling 7ab49d4 on benjeffery:tskit
into 3dca18e on sgkit-dev:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants