scikit-allel (version 2)

This is an early work in progress. scikit-allel version 2 will eventually replace version 1, however it will take some time to reach feature parity. In the mean time, see the documentation for scikit-allel (version 1) if you need a more complete set of capabilities.

If you want to try scikit-allel version 2, install with:

$ pip install --pre skallel

You can install scikit-allel version 2 alongside version 1, they will not interfere with each other. scikit-allel version 2 uses the new skallel namespace, whereas scikit-allel version 1 uses the allel namespace.

Contents

API docs

Data structures

Genotypes

skallel.genotypes_locate_hom(gt)

Locate homozygous genotype calls.

Parameters
gtarray_like, int
Returns
outarray_like, bool
skallel.genotypes_locate_het(gt)

Locate heterozygous genotype calls.

Parameters
gtarray_like, int
Returns
outarray_like, bool
skallel.genotypes_locate_call(gt, *, call)

Locate genotypes with the given call.

Parameters
gtarray_like, int
callarray_like, int
Returns
outarray_like, bool
skallel.genotypes_count_alleles(gt, *, max_allele)

Count the number of calls for each allele.

Parameters
gtarray_like, int
max_alleleint8
Returns
acarray_like, int
skallel.genotypes_to_called_allele_counts(gt)

Count non-missing alleles within genotype calls.

Parameters
gtarray_like, int
Returns
outarray_like, int
skallel.genotypes_to_missing_allele_counts(gt)

Count missing alleles within genotype calls.

Parameters
gtarray_like, int
Returns
outarray_like, bool
skallel.genotypes_to_allele_counts(gt, *, max_allele)

Convert genotypes to allele counts.

Parameters
gtarray_like, int
max_alleleint
Returns
acarray_like, int
skallel.genotypes_to_allele_counts_melt(gt, *, max_allele)

Convert genotypes to allele counts, melting each allele into a separate row.

Parameters
gtarray_like, int
max_alleleint
Returns
acarray_like, int
skallel.genotypes_to_major_allele_counts(gt, *, max_allele)

Convert genotypes to major allele counts.

Parameters
gtarray_like, int
max_alleleint
Returns
acarray_like, int
skallel.genotypes_to_haplotypes(gt)

TODO

Parameters
gtarray_like, int
Returns
htarray_like, int

Haplotypes

Allele counts

skallel.allele_counts_to_frequencies(ac)

TODO

skallel.allele_counts_allelism(ac)

TODO

skallel.allele_counts_max_allele(ac)

TODO

Selections

skallel.select_slice(o, *, start=None, stop=None, step=None, axis=0)

TODO

skallel.select_indices(o, indices, *, axis=0)

TODO

skallel.select_mask(o, mask, *, axis=0)

TODO

skallel.select_range(o, index, *, begin=None, end=None, axis=0)
skallel.select_values(o, index, query, *, axis=0)
skallel.concatenate(seq, *, axis=0)

Concatenate two or more objects along the given axis.

Parameters
seqsequence of group or array_like
axisint
Returns
outgroup or array_like

Variants

skallel.variants_to_dataframe(variants, *, columns=None)

Statistics

Distance

skallel.pairwise_distance(x, *, metric, **kwargs)

Compute pairwise distance between columns of x.

Parameters
xarray_like
metricstr
Returns
outarray_like, float

Condensed distance matrix.

Indices and tables