MSKCC-Epi-Bio / gnomeR

Package to wrangle and visualize genomic data in R
https://mskcc-epi-bio.github.io/gnomeR/
Other
26 stars 19 forks source link

Add pathways function #154

Closed karissawhiting closed 2 years ago

karissawhiting commented 2 years ago

I removed the pathways argument from the binary matrix function, but we still have the custom_pathway() function. I'm thinking we should remove this as well and have one unified function called add_pathway() that can annotate pre-set pathways included in the package, or allow you to pass a custom pathway. It could be used as follows:

binary_matrix(mutation = mut, cna = cna,  fusions = fus) %>%
    add_pathway(pathway = "all")

Where the pathway argument would be "all" be default, allowing you to annotate all package-included pathways. (see gnomeR::pathways). Otherwise you could specify a specific pathway_id like "RTK-RAS".

binary_matrix(mutation = mut, cna = cna,  fusions = fus) %>%
    add_pathway(pathway = "RTK-RAS")

Additionally, you could add a custom pathway with:

binary_matrix(mutation = mut, cna = cna,  fusions = fus) %>%
    add_pathway(custom_pathway = c("TP53", "APC", "FGFR3"))

First step of this will be updating the gnomeR::pathways internal data which is currently incorrect. See pathways.R which pulls data from pathways.csv to create this internal data frame. You can update pathways.csv directly.

karissawhiting commented 2 years ago

@carokos let me know if you are interested in working on this, thanks!

karissawhiting commented 2 years ago

Need to test and add custom pathway function.

karissawhiting commented 2 years ago

@carokos I expanded this function a bit, allowing for custom pathways and also allowing annotation by gene or specific alteration. Please give it a test run if you can.

Thanks for your work on this! <3

carokos commented 2 years ago

I found a typo in the file I was using with the possible pathway alterations. When I get a minute, I'll update and push the corrected file.

karissawhiting commented 2 years ago

closed by #163