When get_gene_expression is run with a vector of Hugo_Symbol or Ensembl_ID provided as factors (instead of a character vector) it doesn't work properly. Behind the scenes the factor levels (as numeric values) are used in the grep instead of the actual gene names. This should be an easy fix. I suggest we explicitly cast the genes vector to a character vector in the function using as.character().
Here's the output I see if I provide Hugo_Symbol directly from the bundled wright_genes data frame.
When get_gene_expression is run with a vector of Hugo_Symbol or Ensembl_ID provided as factors (instead of a character vector) it doesn't work properly. Behind the scenes the factor levels (as numeric values) are used in the grep instead of the actual gene names. This should be an easy fix. I suggest we explicitly cast the genes vector to a character vector in the function using
as.character()
.Here's the output I see if I provide Hugo_Symbol directly from the bundled wright_genes data frame.