Description Usage Arguments Value Author(s) Examples
View source: R/BioTIP_update_4_09282020_v3.R
This function runs over all states which are grouped samples.
For each state, this function splits the correlation network generated from
the function getNetwork
into several sub-networks (which we
called 'module'). The network nodes will be defined by the end-user. For
transcriptome analysis, network nodes can be the expressed transcripts. The
outputs of this function include the module IDs and node IDs per module.
1 2 3 4 5 | getCluster_methods(
igraphL,
method = c("rw", "hcm", "km", "pam", "natural"),
cutoff = NULL
)
|
igraphL |
A list of numerical matrices or a list of igraph objects. The list of igraph objects can be the output from the getNetwork function. |
method |
A mathematical clustering model for analyzing network nodes. Default is a random walk ('rw'). A method could be 'rw', 'hcm', 'km', 'pam', or 'natural', where:
|
cutoff |
A numeric value, default is NULL. For each method it means:
|
When method=rw: A list of communities
objects of R package
igraph, whose length is the length of the input object igraphL
.
These communities
objects can be used for
visualization when being assigned to the 'mark.groups' parameter of the
plot.igraph
function of the igraph package. Otherwise this
function returns a list of vectors, whose length is the length of the input
object igraphL
. The names of each vector are the pre-selected
transcript IDs by th function sd_selection
. Each vector,
whose length is the number of pre-selected transcript in a state, contains
the module IDs.
Zhezhen Wang zhezhen@uchicago.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | test = list('state1' = matrix(sample(1:10, 6), 3, 3), 'state2' =
matrix(sample(1:10, 6), 3, 3), 'state3' = matrix(sample(1:10, 6), 3, 3))
#assign colnames and rownames to the matrix
for(i in names(test)){
colnames(test[[i]]) = 1:3
row.names(test[[i]]) = 1:3}
#using 'rw' or 'natural' method
igraphL <- getNetwork(test, fdr=1)
#[1] "state1:3 nodes"
#[1] "state2:3 nodes"
#[1] "state3:3 nodes"
cl <- getCluster_methods(igraphL)
#using 'km', 'pam' or 'hcm'
cl <- getCluster_methods(test, method = 'pam', cutoff=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.