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

OncoPrint in a Shiny app #23

Closed
msquatrito opened this issue Nov 23, 2015 · 2 comments
Closed

OncoPrint in a Shiny app #23

msquatrito opened this issue Nov 23, 2015 · 2 comments

Comments

@msquatrito
Copy link

Hi Zuguang,
I'm not sure this is a problem of your package (most probably not!), but I'm having issues with using the oncoPrint function inside a Shiny app.
Run the code below for an example

library(shiny)
runGist("84cdc8af0a2b3e219883")

and here is the code for it: https://gist.github.com/msquatrito/84cdc8af0a2b3e219883

I've no problems in plotting mutation data only, but I've noticed inconsistencies when I combine them with copy number alteration data. Some of the mutations disappear when you select multiple genes at the same time and then reappear if you remove some of them. I know, it's hard to understand it in this way, maybe if you would have time to test it yourself you could see what is the issue. Try to type EGFR PTEN TP53 ATRX, and then start to remove them one by one. I know that the mutations are there, because if I make the color transparent I can see them. I guess it might be a problem at the time when the multiple layers of the plot are called.

Most probably it is an issue of my code, on the way a create the matrix with the mutation and copy number data, but I was wondering if you could have any suggestion on how to solve it.

Thanks in advance!
Massimo

@jokergoo
Copy link
Owner

In line #83, you changed the order of functions in alter_fun_list. In your case, when you add the copy number layer, the order becomes:

[1] "background" "HETLOSS"    "MUT"        "GAIN"       "AMP"
[6] "HOMDEL"

which means 'GAIN' layer will overlap 'MUT' layer.

add:

# make a subset but still keep the original order
alt = intersect(names(alter_fun_list), alt)

just above line #83 will solve this problem.

@msquatrito
Copy link
Author

YES!! it solved it!!
Thank you so much.
Best,
Massimo

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

2 participants