Skip to content
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

site.alleles() method? #2380

Closed
hyanwong opened this issue Jul 4, 2022 · 1 comment · Fixed by #2385
Closed

site.alleles() method? #2380

hyanwong opened this issue Jul 4, 2022 · 1 comment · Fixed by #2385
Labels
enhancement New feature or request Python API Issue is about the Python API

Comments

@hyanwong
Copy link
Member

hyanwong commented Jul 4, 2022

I just realised that I can't get the alleles defined at a site. I'd prefer not to use the variants() method to do this. Is there any reason why we can't define a helper function:

class Site:
    def alleles(self):
        alleles = set((m.derived_state for m in self.mutations))
        alleles.add(self.ancestral_state)
        return alleles
@jeromekelleher
Copy link
Member

Seems reasonable.

@benjeffery benjeffery added enhancement New feature or request Python API Issue is about the Python API labels Jul 5, 2022
@hyanwong hyanwong mentioned this issue Jul 6, 2022
3 tasks
@mergify mergify bot closed this as completed in #2385 Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Python API Issue is about the Python API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants