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. |
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 |
dim()
Return dimensions of matrix
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.