Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use convert_gene_names() function in analysis_notebooks/ESTIMATE_tumor_purity.Rmd #92

Open
envest opened this issue Jan 10, 2025 · 0 comments

Comments

@envest
Copy link
Collaborator

envest commented Jan 10, 2025

There is a function in utils/convert_gene_names.R called convert_gene_names() that converts gene names from X to Y format. Use that here instead of relying on processed_data/gene_map.tsv file and left_join().

# read in gene map
# includes ENSEMBL, ENTREZID, and SYMBOL columns for gene name conversion
gene_map_df <- readr::read_tsv(gene_map_df_filename,
show_col_types = FALSE)
# convert gene names
genex_df_SYMBOL <- genex_df %>%
tibble::rownames_to_column(var = "ENSEMBL") %>%
dplyr::left_join(gene_map_df %>% # do not include ENTREZID here
dplyr::select(ENSEMBL, SYMBOL),
by = "ENSEMBL") %>%
dplyr::filter(!duplicated(ENSEMBL),
!duplicated(SYMBOL),
!is.na(SYMBOL)) %>%
dplyr::select(SYMBOL, tidyselect::everything(), -ENSEMBL)
readr::write_tsv(x = genex_df_SYMBOL,
file = estimate_input_filename)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant