Linnorm.Cor: Linnorm-gene correlation network analysis.

Description Usage Arguments Details Value Examples

View source: R/Linnorm.Cor.R


This function first performs Linnorm transformation on the dataset. Then, it will perform correlation network analysis on the dataset.


Linnorm.Cor(datamatrix, RowSamples = FALSE, input = "Raw",
  method = "pearson", MZP = 0.5, sig.q = 0.05, plotNetwork = TRUE,
  plotNumPairs = 5000, plotdegree = 0, plotname = "networkplot",
  plotformat = "png", plotVertexSize = 1, plotFontSize = 1,
  plot.Pos.cor.col = "red", plot.Neg.cor.col = "green",
  vertex.col = "cluster", plotlayout = "kk",
  clusterMethod = "cluster_edge_betweenness", ...)



The matrix or data frame that contains your dataset. Each row is a feature (or Gene) and each column is a sample (or replicate). Raw Counts, CPM, RPKM, FPKM or TPM are supported. Undefined values such as NA are not supported. It is not compatible with log transformed datasets.


Logical. In the datamatrix, if each row is a sample and each row is a feature, set this to TRUE so that you don't need to transpose it. Linnorm works slightly faster with this argument set to TRUE, but it should be negligable for smaller datasets. Defaults to FALSE.


Character. "Raw" or "Linnorm". In case you have already transformed your dataset with Linnorm, set input into "Linnorm" so that you can put the Linnorm transformed dataset into the "datamatrix" argument. Defaults to "Raw".


Character. "pearson", "kendall" or "spearman". Method for the calculation of correlation coefficients. Defaults to "pearson".


Double >=0, <= 1. Minimum non-Zero Portion Threshold for this function. Genes not satisfying this threshold will be removed for correlation calculation. For exmaple, if set to 0.3, genes without at least 30 percent of the samples being non-zero will be considered for this study. Defaults to 0.5.


Double >=0, <= 1. Only gene pairs with q values less than this threshold will be included in the "Results" data frame. Defaults to 0.05.


Logical. Should the program output the network plot to a file? An "igraph" object will be included in the output regardless. Defaults to TRUE.


Integer >= 50. Number of gene pairs to be used in the network plot. Defaults to 5000.


Integer >= 0. In the network plot, genes (vertices) without at least this number of degree will be removed. Defaults to 0.


Character. Name of the network plot. File extension will be appended to it. Defaults to "networkplot".


Character. "pdf" or "png". Network plot output format. Defaults to "png".


Double >0. Controls vertex Size in the network plot. Defaults to 1.


Double >0. Controls font Size in the network plot. Defaults to 1.


Character. Color of the edges of positively correlated gene pairs. Defaults to "red".


Character. Color of the edges of negatively correlated gene pairs. Defaults to "green".


Character. "cluster" or a color. This controls the color of the vertices. Defaults to "cluster".


Character. "kk" or "fr". "kk" uses Kamada-Kawai algorithm in igraph to assign vertex and edges. It scales edge length with correlation strength. However, it can cause overlaps between vertices. "fr" uses Fruchterman-Reingold algorithm in igraph to assign vertex and edges. It prevents overlatps between vertices better than "kk", but edge lengths are not scaled to correlation strength. Defaults to "kk".


Character. "cluster_edge_betweenness", "cluster_fast_greedy", "cluster_infomap", "cluster_label_prop", "cluster_leading_eigen", "cluster_louvain", "cluster_optimal", "cluster_spinglass" or "cluster_walktrap". These are clustering functions from the igraph package. Defaults to "cluster_edge_betweenness".


arguments that will be passed into Linnorm's transformation function.


This function performed gene correlated study in the dataset by using Linnorm transformation


This function will output a list with the following objects:

  • Results: A data frame containing the results of the analysis, showing only the significant results determined by "sig.q" (see below).

  • Cor.Matrix: The resulting correlation matrix between each gene.

  • q.Matrix: A matrix of q values of each of the correlation coefficient from Cor.Matrix.

  • Cluster: A data frame that shows which gene belongs to which cluster.

  • igraph: The igraph object for users who want to draw the network plot manually.

  • Linnorm: Linnorm transformed data matrix.

The "Results" data frame has the following columns:

  • Gene1: Name of gene 1.

  • Gene2: Name of gene 2.

  • Cor: Correlation coefficient between the two genes.

  • p.value: p value of the correlation coefficient.

  • q.value: q value of the correlation coefficient.


#Analysis on Islam2011 embryonic stem cells
results <- Linnorm.Cor(Islam2011[,1:48])

Linnorm documentation built on May 20, 2017, 10:58 p.m.

Search within the Linnorm package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.