get_GM_network: Get gene membership network.

View source: R/networks.R

get_GM_networkR Documentation

Get gene membership network.

Description

Creates a network of SNPs where each SNP is connected as in the GS network and, in addition, to all the other SNPs pertaining to the same gene. Corresponds to the gene membership (GM) network described by Azencott et al.

Usage

get_GM_network(
  gwas,
  organism = 9606,
  snpMapping = snp2ensembl(gwas, organism),
  col_genes = c("snp", "gene")
)

Arguments

gwas

A SnpMatrix object with the GWAS information.

organism

Tax ID of the studied organism. The default is 9606 (human).

snpMapping

A data.frame informing how SNPs map to genes. It contains minimum two columns: SNP id and a gene it maps to. Each row corresponds to one gene-SNP mapping. Unless column names are specified using col_genes, involved columns must be named 'snp' and 'gene'.

col_genes

Optional, length-2 character vector with the names of the two columns involving the SNP-gene mapping. The first element is the column of the SNP, and the second is the column of the gene.

Value

An igraph network of the GM network of the SNPs.

References

Azencott, C. A., Grimm, D., Sugiyama, M., Kawahara, Y., & Borgwardt, K. M. (2013). Efficient network-guided multi-locus association mapping with graph cuts. Bioinformatics, 29(13), 171-179. https://doi.org/10.1093/bioinformatics/btt238

Examples

get_GM_network(minigwas, snpMapping = minisnpMapping)

hclimente/martini documentation built on Feb. 26, 2024, 6:23 p.m.