ldweight_edges {martini} | R Documentation

## Include linkage disequilibrium information in the network.

### Description

Include linkage disequilibrium information in the SNP network. The weight of the edges will be lower the higher the linkage is.

### Usage

    ldweight_edges(net, ld, method = "inverse")

### Arguments

`net` | A SNP network.
`ld` | A `dsCMatrix` or `dgCMatrix` containing linkage disequilibrium measures, like the output of `ld`.
`method` | How to incorporate linkage-disequilibrium values into the network.

### Value

An copy of net where the edges weighted according to linkage disequilibrium.

### Examples

    ld <- snpStats::ld(minigwas[['genotypes']], depth = 2, stats = "R.squared")
    # don't weight edges for which LD cannot be calculated
    ld[is.na(ld)] <- 0
    gi <- get_GI_network(minigwas, snpMapping = minisnpMapping, ppi = minippi)
    ldGi <- ldweight_edges(gi, ld)

[Package martini version 1.14.0 Index]