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

ENH: Allele mapping #32

Open
alimanfoo opened this issue Aug 6, 2019 · 0 comments
Open

ENH: Allele mapping #32

alimanfoo opened this issue Aug 6, 2019 · 0 comments

Comments

@alimanfoo
Copy link
Collaborator

Proposed to create functions to map genotypes, haplotypes and allele counts arrays between different allele indexing schemes.

Implementation plan

  • Add create_allele_mapping(from_alleles, to_alleles, dtype) public API function to create an allele index mapping given two sets of alleles.
  • Add genotypes_map_alleles(gt, mapping) public API function to transform a genotypes array using an allele mapping.
  • Add haplotypes_map_alleles(ht, mapping) public API function to transform a haplotypes array using an allele mapping.
  • Add allele_counts_map_alleles(ac, mapping) public API function to transform an allele counts array (either 2D or 3D) using an allele mapping.
  • Add numpy and dask backends.
  • Add unit tests.

Notes

This is a porting of functionality from scikit-allel version 1, see create_allele_mapping, haplotype_array_map_alleles, allele_counts_array_map_alleles.

Add tests to ensure map_alleles works with either fixed length string dtype or object dtype.

Use numba for numpy backend implementations of the ..._map_alleles functions.

@alimanfoo alimanfoo changed the title ENH: Allele mappings ENH: Allele mapping Aug 6, 2019
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

No branches or pull requests

1 participant