R: Rename genes in the differential network analysis

rename_genes {dnapath} | R Documentation

## Rename genes in the differential network analysis

### Description

Rename genes in the differential network analysis

### Usage

    rename_genes(x, gene_mat = NULL, to = NULL, species = NULL, ...)

### Arguments

`x` | A 'dnapath_list' or 'dnapath' object from `dnapath`, a pathway list, or a vector of gene names.
`gene_mat` | (Optional) A matrix of key value pairs. The first column should contain current gene names, and the second column the new names. Any genes that are not in this matrix will retain their current names. This can be any user-defined mapping, or the mapping obtained using `entrez_to_symbol` or `symbol_to_entrez`.
`to` | (Optional) Setting `to = "symbol"` will rename entrezgene IDs to gene symbols; this will automatically call the `entrez_to_symbol()` function to obtain the mapping for `gene_mat`. The `species` argument must also be specified when `to` is used.
`species` | (Optional) Must be specified when setting `to = "symbol"`. This argument is passed into `entrez_to_symbol`.
`...` | Additional arugments are passed into `entrez_to_symbol` in the case that `to` and `species` are specified. This may be useful to specify the `dir_save` argument to save the mapping obtained from biomaRt for offline use.

### Value

Returns `x` with all gene names updated according to `gene_mat`.

### Note

Internet connection is required to connect to use `entrez_to_symbol` or `symbol_to_entrez`.

### See Also

`entrez_to_symbol`, `symbol_to_entrez`

### Examples

    data(meso)
    data(p53_pathways)
    set.seed(0)
    results <- dnapath(x = meso$gene_expression, pathway_list = p53_pathways,
                       group_labels = meso$groups, n_perm = 10)
    summary(results[[1]])  # Summary of pathway 1; note that it uses entrezgene IDs.

    # Rename the entrezgene IDs into gene symbols.
    results_sym <- rename_genes(results, to = "symbol", species = "human")
    summary(results_sym[[1]]) # Now the summary uses gene symbols.

[Package dnapath version 0.7.4 Index]