Learn R Programming

LANDD (version 1.1.0)

graph.kd: Find weights based on kernel density on the graph. There are three common ways to invoke graph.kd:
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('one'))
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('squareM'))
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('none'))

The first method is used when the total weight of all genes z is set to 'one'. In this way, those genes surrounded by more genes z will not take advantages over those surrounded by fewer genes. In contrast, the second method takes the number of genes around into consideration, the result of the first method will multiply the square of the number of genes around. The third method does not normalize the data. Thus genes with more neighbors are more likely to receive higher weights.

Description

Find weights based on kernel density on the graph. There are three common ways to invoke graph.kd:
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('one'))
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('squareM'))
  • graph.kd(relate_matrix, graph, smoothing.normalize=c('none'))

The first method is used when the total weight of all genes z is set to 'one'. In this way, those genes surrounded by more genes z will not take advantages over those surrounded by fewer genes. In contrast, the second method takes the number of genes around into consideration, the result of the first method will multiply the square of the number of genes around. The third method does not normalize the data. Thus genes with more neighbors are more likely to receive higher weights.

Usage

graph.kd(relate.matrix, network.graph, kernel.sd = 1, smoothing.normalize = c("one", "squareM", "none"))

Arguments

relate.matrix
The matrix returned by lascouting.
network.graph
The igraph object representing the gene network.
kernel.sd
standard deviation for kernel, default would be 1.
smoothing.normalize
Different ways to normalize the result, default would be "one".

Value

A matrix representing the weights calculated using kernel density for each gene. Each row is an ego gene, columns are the weights of potential scouting genes for the gene.

Examples

Run this code
## Not run: 
# relate.matrix <- lascouting(g,m,k=2,n.cores=4) 
# graph.kd(relate.matrix,g,smoothing.normalize = "one")## End(Not run)

Run the code above in your browser using DataLab