ldweight_edges: Include linkage disequilibrium information in the network.

Description Usage Arguments Value Examples

View source: R/ld.R

Description

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

Usage

1
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

1
2
3
4
5
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)

martini documentation built on Nov. 8, 2020, 5:39 p.m.