get_exp_cor_edges {PFP} | R Documentation

## get co-expression genes

### Description

compute the correlation coefficient of gene expression data, return the most related genes

### Usage

    get_exp_cor_edges(
      gene_list,
      data_std,
      method = "spearman",
      num = 5,
      cor_threshold = NULL
    )

### Arguments

`gene_list,` | a vector of characters
`data_std,` | a matrix of data, such as gene expression data, whose rownames are gene names or ids and colnames are sample names
`method,` | a chareater, which method to compare the correlation of gene expression data it could be "pearson", "kendall", "spearman", "spearman" is default
`num,` | an integer, the top number of co-expressed genes to choose, 5 is default
`cor_threshold,` | a numeric, the threshold of the correlation coefficient to choose, default is NULL

### Details

This function computes the correlation coefficient of gene expression data between `gene_list` and `data_std`, it will return a data.frame which can be translated a graph or network. In the data.frame, `source` refers to the genes in `gene_list`, `target` refers to the top coexpressed genes, `weight` refers to the correlated coefficient of genes in `source` and `target`, `pathway` is "uncertain" and `edge_type` is "coexp".Note, when choosing the top co-expressed genes, we will use the `num` param if the `cor_threshold` param is NULL. If not, we will choose the `cor_threshold` param.

### Value

the coexp of edges.

### Examples

    data(data_std)
    data(PFP_test1)
    rank1 <- rank_PFP(object = PFP_test1,total_rank = TRUE)
    pathway_select <- refnet_info(rank1)[1,"id"]
    gene_test <- pathways_score(rank1)$genes_score[[pathway_select]]$ENTREZID
    edges_coexp <- get_exp_cor_edges(gene_test,data_std)

[Package PFP version 1.2.0 Index]