creer_graphe {SARP.compo}R Documentation

Create a graph using a set of p-values from pairwise tests

Description

These functions construct an undirected graph, using the igraph package, to represent and investigate the results of all testing of all ratios of components of a compositional vector.

Usage

grf.Mp( Mp, p = 0.05, reference = NULL, groupes = NULL,
        complement = FALSE )

grf.DFp( DFp, col.noms = c( 1, 2 ), p = 0.05, col.p = 'p',
         reference = NULL, groupes = NULL )

Arguments

Mp

A square, symmetric matrix containing p-values. Element in row i and line j should contain the p-value for testing the \frac{i}{j} ratio. The diagonal is ignored.

DFp

A data frame containing at least three columns: two with component names and one with p-values for the corresponding ratio.

col.noms

A length two vector giving the names of the two columns containing the components names.

p

The p-value cutoff for adding an edge between two nodes. See details.

col.p

The name of the column containing the p-values to use to create the graph.

reference

A character vector giving the names of nodes that should be displayed with a different color in the created graph. These names should match column names used in Mp. Typical use would be for reference genes in qRT-PCR experiments. By default, all nodes are displayed in palegreen; reference nodes, if any, will be displayed in orange.

groupes

A list of character vectors giving set of logically related nodes, defining groups of nodes that will share common color. Currently unimplemented.

complement

A logical. If TRUE, the complement of the graph is returned. It allows to construct graphs using equivalence tests, instead of difference tests (that is, to keep an edge between two nodes if the test is significant, instead of non-significant).

Details

Consider a compositional vector of n components. These n are seen as the nodes of a graph. Nodes i and j will be connected if and only if the p-value for the test of the \frac{i}{j} ratio is higher than the cutoff, p – that is, if the test is not significant at the level p.

Strongly connected sets of nodes will represent components that share a similar behaviour between the conditions tested, whereas unrelated sets of nodes will have a different behaviour.

Value

These function returns the created graph. It is an igraph object on which any igraph function can be applied, including plotting, and searching for graph components, cliques or communities.

Author(s)

Emmanuel Curis (emmanuel.curis@parisdescartes.fr)

See Also

creer.Mp to create a matrix of p-values for all possible ratios of a compositional vector.

creer.DFp to create a data.frame of p-values for all possible ratios of a compositional vector.

Examples

   # load the potery data set
   data( poteries )

   # Compute one-way ANOVA p-values for all ratios in this data set   
   Mp <- creer.Mp( poteries, c( 'Al', 'Na', 'Fe', 'Ca', 'Mg' ),
                   f.p = anva1.fpc, v.X = 'Site' )
   Mp

   # Make a graphe from it and plot it
   plot( grf.Mp( Mp ) )

[Package SARP.compo version 0.1.8 Index]