Entering edit mode
9 months ago
nazaninhoseinkhan
▴
530
Dear all,
I faced the problem of conducting a survival analysis with the gene symbols having hyphens, such as HLA-DPA1. I get the following error:
esca_HLA-DPA1= esca_matrix_vst %>% as.data.frame() %>% rownames_to_column (var='gene_id') %>% gather (key='case_id', value='counts', -gene_id) %>%
left_join(. , gene_metadata, by="gene_id") %>%
filter(gene_name == "HLA-DPA1")
Error in esca_HLA - DPA1 = esca_matrix_vst %>% as.data.frame() %>% rownames_to_column(var = "gene_id") %>% :
object 'esca_HLA' not found
Can you advise me to change this code such that it can recognize the gene symbol?
Regards
Nazanin
Thank u so much for your comment. I will try it