Class: GenotypeCovarianceMatrix

fio~GenotypeCovarianceMatrix(matrix, variants, positions)

Class for storing genotype covariance matrices.

Assumptions:

  • Covariances should be oriented towards the minor allele.
  • Variances on the diagonal are absolute values (they are not directional.)

Constructor

new GenotypeCovarianceMatrix(matrix, variants, positions)

Parameters:
Name Type Description
matrix Array.<Array.<number>>

Pre-constructed matrix. Usually generated by the extractCovariance function in fio.

variants Map

Map of variants -> matrix position. Variants should be chr:pos_ref/alt format.

positions Map

Map of variant position -> matrix position. Both positions should be integers.

Source:

Methods

add(other)

Combine this covariance matrix with another. This operation happens in place; this matrix will be overwritten with the new one. Used in meta-analysis, see our wiki for more information.

Parameters:
Name Type Description
other GenotypeCovarianceMatrix

Another covariance matrix

Source:

dim()

Return dimensions of matrix

Source:

isComplete()

Determine whether matrix is complete. Can specify i, j which are actual indices, or positions pos_i, pos_j which represent the positions of the variants.

Source: