Open cedricvanm opened 5 years ago
By default the TvTi plot should go off the levels of the sample column. Here is a quick example:
# load genvisr
library(GenVisR)
# define a sample order
sample_order <- unique(brcaMAF$Tumor_Sample_Barcode)
sample_order <- rev(sample_order)
# set the sample column, which is a fator, to that sample order
brcaMAF$Tumor_Sample_Barcode <- factor(brcaMAF$Tumor_Sample_Barcode, levels=sample_order)
# plot the result
TvTi(brcaMAF, type='Frequency',
palette=c("#77C55D", "#A461B4", "#C1524B", "#93B5BB", "#4F433F", "#BFA753"),
lab_txtAngle=60, fileType="MAF")
So as long as the sample_order above is in the same order as the Waterfall plot it should be fine. Unfortunately it is not straight forward to add this to the waterfall plot yet. I am working on an update to make this easier but for now if users would want this they would have to manually convert/parse/align the grob objects themselves.
Great, this indeed does the job perfectly! Many thanks for your quick answer.
All the best, Cedric
I just updated the GeneVisR package and the previous code generates the following warning. Any suggestion?
Warning messages: 1: In data.table::melt(mutation_counts) : The melt generic in data.table has been passed a table and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(mutation_counts). In the next version, this warning will become an error. 2: In data.table::dcast(x, sample ~ gene, fun.aggregate = length, value.var = "trv_type") : The dcast generic in data.table has been passed a data.frame and will attempt to redirect to the reshape2::dcast; please note that reshape2 is deprecated, and this redirection is now deprecated as well. Please do this redirection yourself like reshape2::dcast(x). In the next version, this warning will become an error.
@2waybene Do you not get a plot back? These warnings "should" be harmless, but I do need to update the code to avoid future problems. Sounds like fixing this is becoming more critical though, I'll try and find time to tackle it next week
Hi, Zachary,
Yes, I was able to get the plot. But, I am just scared if these warning do become errors.
Thanks.
Jianying
On Wed, Aug 11, 2021 at 10:36 AM Zachary Skidmore @.***> wrote:
@2waybene https://github.com/2waybene Do you not get a plot back? These warnings "should" be harmless, but I do need to update the code to avoid future problems. Sounds like fixing this is becoming more critical though, I'll try and find time to tackle it next week
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/griffithlab/GenVisR/issues/351#issuecomment-896882355, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4RSUQAF6DMPNWUHWNF4IDT4KDFLANCNFSM4GNF4JPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Hi,
a reviewer asks me to put the tvti graph of my samples in relation to the waterfall plot, but couldn't figure how to get the same order of samples. Or maybe even better, is there a way to put the tvti graph in the waterfall plot, as it could replace the mutburden plot ?
Thanks! Cedric