Interactions: Calculating the species interactions

Description Usage Arguments Details Value See Also Examples

Description

Calculating the metabolic complementarity index and complementarity index of based on species metabolic network.

Usage

1
2
3
4
5
complementarityIndex(g1, g2, seed.set1, seed.set2, threshold = 0, p = FALSE,
  nperm = 1000)

competitionIndex(g1, g2, seed.set1, seed.set2, threshold = 0, p = FALSE,
  nperm = 1000)

Arguments

g1,

igraph object, a species-specific metabolic network.

g2,

igraph object, a species-specific metabolic network, the complementary network of g1

seed.set1,

seeds slot of a seed-set object, seeds of the metabolic network g1, more details see seedset-class.

seed.set2,

seeds slot of a seed-set object, seeds of the metabolic network g2, more details see seedset-class.

threshold,

the cutoff of confidence score to be serve as a seed set, default is 0.

p,

a logical value which determins whether the calculated index is statistical or biological significant. default is FALSE.

nperm,

the number of permuations of metabolic network node labes, which is used for complementarity index's P value calculating, default is 1000.

Details

Metabolic competition index is defined as the fraction of compounds in a species seed set of metabolic network that are also included in its partner; However, metabolic complementarity index is the fraction of compounds in one species seed set of metabolic network appearing in the metabolic network but not in the seed set of its partner. However, seed compounds are associated with a confidence score (1/size of SCC), so this fraction is calculated as a normalized weighted sum.

Based on the metabolic network and seed sets of species, this functions help us to predict the species interactions of species1 on the presence of species2.

Value

a two length list: complementarity index or competition index: range from 0 to 1, p value of complementarity index. Or a single value of complementarity or competition index while p is FALSE.

See Also

getSeedSets, calculateCooperationIndex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
## metabolic network reconstruction and seed set identity of sample data anno.species
net <- lapply(anno.species,reconstructGsMN)
seed.sets <- lapply(net, getSeedSets) 
seed.sets <- lapply(seed.sets, function(x)x@seeds)

## calculate the complementarity index of the first species
complementarity.index <- complementarityIndex(net[[1]],net[[2]], 
 seed.sets[[1]], seed.sets[[2]])
competition.index <- competitionIndex(net[[1]],net[[2]], 
 seed.sets[[1]], seed.sets[[2]])

## End(Not run)

yiluheihei/RevEcoR documentation built on July 31, 2019, 9:17 a.m.