This function relies on the `biomaRt“ package and connects to the ENSEMBL repository to retrieve the gene symbols. If ENSEMBL cannot be reached, another solution will be used. Since it is memory intensive, users can choose not to run it.

convert_human_mouse_genes(
  gene_expression_matrix,
  mirror = "www",
  other_annot = TRUE,
  convert_to = c("human", "mouse")
)

Arguments

gene_expression_matrix

a m x n matrix with m genes and n samples. Gene symbols must be the rownames of the matrix. If genes map to multiple gene symbols, the median expression will be returned. Can also be a m x 1 vector of the gene names. IN this case, only the converted genes will be returned.

mirror

the ensembl mirror to use. Possible choices are 'www' (default), 'uswest', 'useast', 'asia'

other_annot

boolean, wether to run the alternative conversion method

convert_to

one of 'human' or 'mouse'. Specifies the organism of the orthologs to look for

Value

the same matrix, with the counts for the corresponding human genes. This matrix can directly be used with the immunedeconv methods. A message will display the ratio of original genes which were converted.