LDMatrix

class hail.LDMatrix(jldm)[source]

Represents a symmetric matrix encoding the Pearson correlation between each pair of variants in the accompanying variant list.

Methods

__init__
matrix Gets the distributed matrix backing this LD matrix.
to_local_matrix Converts the LD matrix to a local Spark matrix.
variant_list Gets the list of variants.
matrix()[source]

Gets the distributed matrix backing this LD matrix.

Returns:Matrix of Pearson correlation values.
Return type:IndexedRowMatrix
to_local_matrix()[source]

Converts the LD matrix to a local Spark matrix.

Caution

Only call this method when the LD matrix is small enough to fit in local memory on the driver.

Returns:Matrix of Pearson correlation values.
Return type:Matrix
variant_list()[source]

Gets the list of variants. The (i, j) entry of the matrix encodes the Pearson correlation between the ith and jth variants.

Returns:List of variants.
Return type:list of Variant