pafway_meta: Compare the frequency of observed edges of a specific type...

Description Usage Arguments Value Examples

View source: R/metapafway.R

Description

Compare the frequency of observed edges of a specific type and the expected frequency of these edges, given the presence of a different edge type

Usage

1
pafway_meta(GO, edges, GOtypes)

Arguments

GO

A vector of Strings, equal to the length of all the nodes. The names of the vector should be the names of the nodes. The values should either be the functional annotations, or a concatenation of the functional annotations, separated by a "_" symbol.

edges

A matrix of Strings, with at least two columns. Each row will represent an edge, linking the node in the first column to the node in the second column. Please make sure the node names are the same as those in "GO"

GOtypes

This is a vector that contains the functional annotations or GO terms that are of interest

Value

A matrix that has the same number of rows and columns as length(GOtypes)*length(GOtypes). The value at position [i,j] will contain ratio between the observed and expected frequency of edges of type i, based on the frequency of edges of type j.

Examples

1
2
3
4
5
GO=c(rep('A,C', 5), rep('A', 5), rep('C', 5), rep('B,D', 5), rep('B', 5), rep('D', 5))
names(GO)=paste("node", 1:length(GO))
edges=cbind(names(GO)[1:(length(GO)/2)], names(GO)[(length(GO)/2+1):length(GO)])
GOtypes=c('A', "B", "C", "D")
pafway_meta(GO, edges, GOtypes)

PAFway documentation built on Feb. 6, 2020, 5:13 p.m.