Skip to content

calcscorematrix

Kai Schmid edited this page Mar 24, 2019 · 15 revisions

First of all, this script counts all common patients between each differential expression group of every gene. In this process, the interaction of the genes with themselves is omitted because only their communication with other genes is supposed to be observed. This is followed by steps of normalization.

The only parameter which is taken by this function is the table from readjsonsheet

matrix <-calcscorematrix(table = table)

Where e is the weight of the edge between the nodes r and s, Prs represents the counted number of common patients between the nodes, which is counted with the crossprod() function of the R-base environment while S is the number of patients, respectively the size of the node.

As the last component of the normalisation the fold change between the modalities is taken into account. In this process, the fold changes of each gene-gene interaction are summed up. To restrict the impact of this factor, a normalization step for this FCmatrix is performed. Because no negative effect is desired, all values are normalized between one and three by using the following equation:

The generated adjacency matrix contains the probability for every modality - modality interaction.