Replace Ensembl ID with gene symbol
Source:R/pathway_enrichment_networks.R
replace_ensembl_with_symbol.Rd
Function is used internally in enrichment_network_vis()
.
Arguments
- x
character, comma-separated Ensembl IDs
- map
data table, mapping between Ensembl IDs and gene symbols. Must include the columns "ensembl_gene" and "gene_symbol".
- return_N
boolean, whether to prepend the concatenated gene symbols with the number of unique gene symbols.
TRUE
by default.- collapse
boolean, whether to collapse the gene symbols into a comma-separated string. If not, return a vector of unique gene symbols.
TRUE
by default.
Value
either a string of comma-separated gene symbols,
a vector of unique gene symbols,
or a named list with two values ("N" and "genes")
depending on the values of return_N
and collapse
.