secondPC: Second order partial correlation

Description Usage Arguments Value

View source: R/secondPC.R


Second order PC is calcuated according to the edge connections in the input edgelist. The correlation of a pair of genes are calcuated as (a) correlation if they do not connect to the same neighbour genes; (b) first order PC if they only connect to one shared genes and (c) second order PC by removing the controls pair by pair if they connect to more than two shared neighbours genes. After that, the fdrtool is used to calculate the p-value, FDR and connection probability from the correlation.


secondPC(data.exp, edgelist, controlist = NULL, method = "pearson",
  progressbar = T)



gene expression data matrix with genes in columns and samples in rows.


an edge list for second order PC calculation. The PC values are calcuated over each pair of genes in the gene list.


list of vectors of neighbour genes for each pair of genes in edgelist. The vector order in the list must match to the order of corresponding paired genes in the input edgelist. For example the i element in controlist contains the shared neighbours of gene edgelist[i,1] and gene edgelist[i,2]. the i


estimators of correlation. Options are "pearson", "spearman" and "kendall".


If TRUE, a progressbar will show to indicate the code runing percentage.


secondPC returns a data frame with columns of regulators, target genes, edge correlation weigthes, p-values, FRD and connection probability.

wyguo/RLowPC documentation built on May 28, 2017, 7:34 a.m.