Closed sjspielman closed 2 years ago
My only comment is that the legend ordering in the supplemental figure is not the same as in the oncoprint display (I think this wasn't coordinated previously, but since it was mentioned on the previous main oncoprint PR, I wanted to mention this and ask if we want to update here as well).
Yeah, this wasn't previously coordinated. The way to do it would be hardcoding the legend order I think. I'll have a go.
@jharenza I was able to get the legend matching the plot, but I'm not sure I like this...
The reason this script handles legends separately is because legends cannot be ordered on maftools::oncoprint()
. The annotation legend will always be alphabetical. However, samples can be ordered, so in this version the legend matches the annotation row, but the cancer group annotations are not in descending order in terms of the number of samples.
I can have the legend handled for this supp figure separately, similar to how main text legends are handled, but I'll have to rearrange the script quite a bit to get there.
@jharenza I was able to get the legend matching the plot, but I'm not sure I like this...
Eh, being a supplement and not many samples, I think this could be ok. It is up to you if you want to put more work into a separate legend
I'd rather not re-work the script too dramatically for just this one supplementary legend. I'm definitely ok with it as it is now!
Closes #1548
This PR fixes the oncoprint problems! Overall it turned out to be not too many coding differences, so I've kept everything in one PR. I have done the following:
oncoprint_main
, which isTRUE
if the group is designated for main text andFALSE
if it should head to the supplement. While I was coding, I found this variable name easier to follow, so I use this instead ofoncoprint_include
.n_per_cancer_group
files. This problem was caused by a filtering bug in the oncoprint script. I confirmed the cancer groups in the "primary-only" file match those in the landscape plots.oncoprint_main
for the supp figure. Since the supp panel usescancer_group
and notcancer_group_display
, I had to slightly update a function in this script to handle the different cases.