limix.qc.unique_variants

limix.qc.unique_variants(X)[source]

Filters out variants with the same genetic profile.

Parameters

X (array_like) – Samples-by-variants matrix of genotype values.

Returns

genotype – Genotype array with unique variants.

Return type

ndarray

Example

>>> from numpy.random import RandomState
>>> from numpy import kron, ones, sort
>>> from limix.qc import unique_variants
>>> random = RandomState(1)
>>>
>>> N = 4
>>> X = kron(random.randn(N, 3) < 0, ones((1, 2)))
>>>
>>> print(X)  
[[0. 0. 1. 1. 1. 1.]
 [1. 1. 0. 0. 1. 1.]
 [0. 0. 1. 1. 0. 0.]
 [1. 1. 0. 0. 1. 1.]]
>>>
>>> print(unique_variants(X))  
[[0. 1. 1.]
 [1. 1. 0.]
 [0. 0. 1.]
 [1. 1. 0.]]