Closed DarioS closed 7 months ago
Hello, Sorry for the delay in getting back. Can you post your command? Does it happen when you manually provide colours for annotations?
I could not trigger it using a minimal example, so you'll need to load the attached R objects testData.zip The command is
load("testData.RData") # After unzipping.
oncoplot(MAF, colors = customColours, top = 50, showTumorSampleBarcodes = TRUE, removeNonMutated = FALSE,
clinicalFeatures = c("WGD", "TP53_LOH"), sortByAnnotation = TRUE, sortByMutation = TRUE,
annotationOrder = c("No", "Yes"), genesToIgnore = "TTN",
gene_mar = 6, barcode_mar = 11)
Just add altered = TRUE
to get the swapping of WGD legend.
Thanks for the data. I can reproduce it. I will take a look into it soon. Meanwhile you can use annotationColor
argument to define color codes which should maintain the correct color order.
oncoplot(
MAF,
colors = customColours,
top = 50,
showTumorSampleBarcodes = TRUE,
removeNonMutated = FALSE,
clinicalFeatures = c("WGD", "TP53_LOH"),
sortByAnnotation = TRUE,
sortByMutation = TRUE,
annotationOrder = c("No", "Yes"),
genesToIgnore = "TTN",
gene_mar = 6,
barcode_mar = 11,
altered = TRUE,
annotationColor = list(
WGD = c("Yes" = "red", "No" = "blue"),
TP53_LOH = c("Yes" = "red", "No" = "blue")
)
)
This issue is stale because it has been open for 60 days with no activity.
Swapping still happens in the latest release of maftools.
Hi, I'm on holidays. I'll fix them the next week.
This issue is stale because it has been open for 60 days with no activity.
Stale but important.
This issue is stale because it has been open for 60 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Changing nothing else apart from the value of
altered
, the clinical data colouring swaps labels (for WGD but not for the second variable).This seems unintended.