network_shared_annotations: Calculate shared annotations between network nodes

Description Usage Arguments Value Examples

View source: R/network_shared_annotations.R

Description

Calculate the number of shared annotations between each pair of genes or proteins in a network, and append this value to the input data frame as an extra column.

Usage

1
network_shared_annotations(network, shared, col_name = "shared")

Arguments

network

a data.frame with nodes (genes) in the first two columns

shared

a matrix containing the number of shared annotations, e.g. GO terms, between each pair of proteins (as output by 'shared_annotations')

col_name

the name of the new column to create; defaults to "coexpr"

Value

the input network, with an extra column containing the number of shared annotations (e.g., GO terms)

Examples

1
2
3
4
5
6
# read network
net <- read.delim("mouse-network.tsv.gz")
# get proteome-wide shared annotations
shared <- shared_annotations(ann)
# calculate number of shared GO terms for each edge the network
net.shared <- network_shared_go(net, shared)

skinnider/flavin documentation built on May 6, 2019, 10:49 a.m.