CmmD_from_community_structure: CmmD_from_community_structures

CmmD_from_community_structures()R Documentation

CmmD_from_community_structures

Description

Compute CmmD analysis for network community structure over precomputed MolTi community detection algorithm outputs (Didier et al. 2018)

Usage

CmmD_from_community_structures(nodelist=NULL,community_structures,resolution_start,resolution_end,interval)

Arguments

nodelist

Optional. If given, a list with the unique nodes that we want to appear in the final output. If not given, all nodes of the multiplex will be in the final output (nodelist= NULL)

community_structures

A vector with the paths where the output community structures from MolTi are saved. Easy example: c("Molti_Output/0.5.csv","Molti_Output/1.csv")

resolution_start

Numeric, a real number determining the first gamma resolution parameter used to generate the different MolTi's outputs

resolution_end

Numeric, a real number determining the last gamma resolution parameter used to generate the different MolTi's outputs

interval

Numeric, a real number determining the interval of the resolution parameter used to generate the different MolTi's outputs

distmethod

String, A distance method metric to use to compute the trajectories. Defaults to "hamming" for hamming distance, but accepts any other metric supplied by parallelDist package.

threads

Numeric, the number of threads to use for the computation of the distance matrix.

Details

Compute CmmD multilayer community trajectory analysis for a set of given community structures generated with MolTi (or have MolTi's format) (Núñez-Carpintero et al. 2021) (Didier et al. 2018).

Value

gene_community_matrix

A matrix where the rows correspond to the unique nodes of all layers and the colums identify the resolution parameter used in each analysis. The values in the matrix describe the ID of the community where the node is found in each analysis. Each of the columns have its own way of naming the communities found, as a result of the difference in the number of communities found. Therefore, being at community "2" at resolution parameter 2.5 and being at community "2" at resolution parameter 5 does not mean that the node is kept within the same community during the analysis.

l_constant

A list of vectors with the nodes that are consistently found in the same community through all the analysis. In each vector of the list, you will have nodes that are always found in the same community in all analyzed values of resolution parameter. The name of the vector describes the communities where the nodes are found. The order of the IDs is the same as in colnames(output$gene_community_matrix).

distance_matrix

A dist object of dimensions N(nodes) x N(nodes). The hamming distance values between all nodes of the multiplex network. This hamming distance represent the number of analysis where the pair nodes ARE NOT FOUND within the same community.

Author(s)

Iker Nuñez-Carpintero <iker.nunez@bsc.es>

References

Núñez-Carpintero, I., Petrizzelli, M., Zinovyev, A., Cirillo, D. & Valencia, A. 2021. The multilayer community structure of medulloblastoma. iScience 24. Didier, G., Valdeolivas, A., Baudot, A., 2018. Identifying communities from multiplex biological networks by randomized optimization of modularity. F1000Res 7. https://doi.org/10.12688/f1000research.15486.2

Examples

#### Example of use:
#### 1. Create a vector with the paths where the community structures are located:
structures <- c("Molti_Output/0.5.csv","Molti_Output/1.csv")

#### 2. In order to analyze the range of resolution parameter 0 to 30, at intervals of 0.5 (e.g: c(0.5,1,1.5,2,2.5,3...,30)):
CmmD_from_community_structures(nodelist=NULL, community_structures=estructuras,resolution_start=0.5,resolution_end=4, interval=0.5)

### Note: The function already gives different names identifying the values of the resolution parameter to each of the community structures generated by MolTi, we highly recommend not to give a prefix to this files apart from the path where you want this files to be saved.

#### OPTIONAL: If you have a specific set of nodes to analyze, you can create a vector with the node names and give it in the argument 'NODELIST':
nodes_to_analyze <- c("A","B","C","D")
CmmD_from_community_structures(nodelist=nodes_to_analyze, community_structures=structures,resolution_start=0.5,resolution_end=4, interval=0.5)

ikernunezca/CmmD documentation built on Aug. 29, 2024, 12:35 a.m.