uclahs-cds / project-method-AlgorithmEvaluation-BNCH-000082-SRCRNDSeed

GNU General Public License v2.0
1 stars 0 forks source link

Phils add plot subclones box #102

Closed philsteinberg closed 1 year ago

philsteinberg commented 1 year ago

Description

Script for creating boxplots of number of subclones called by sample x seed x pipeline x mode. Script that contains plotting accessories such as colour schemes, seed, samples.

Closes #101

Analysis Results

Takes in parsed pipeline file: 2023-04-23_num_subclones_mutect2_battenberg_phylowgs_sr.tsv with header format:

DPClust and PyClone-VI output each have 10 n_clones per sample. PhyloWGS has 10 or less n_clones per sample because some sample x seed combinations error (#95, #56, #63).

Command to generate plot:

module load R

Rscript ./plot_num_subclones_box.R \
-f /hot/project/method/AlgorithmEvaluation/BNCH-000082-SRCRNDSeed/pipeline-call-src/run-mutect2-battenberg-phylowgs/output/2023-04-23_num_subclones_mutect2_battenberg_pyloWGS_sr.tsv \
-p Mutect2-Battenberg-PhyloWGS \
-m sr \
-o /hot/project/method/AlgorithmEvaluation/BNCH-000082-SRCRNDSeed/pipeline-call-src/plots/boxplot/

Example output for PyClone-VI (sr): Screen Shot 2023-04-24 at 11 39 43 AM

Example output for PhyloWGS (sr):

Screen Shot 2023-04-24 at 11 39 56 AM

Example output for DPClust (sr):

Screen Shot 2023-04-24 at 11 42 22 AM

Checklist

philsteinberg commented 1 year ago

Looks great!

For publication, I don't think the long title of each plot is necessary, maybe only keep the name of the pipeline (SNV-CNA-SRC)? Also your examples show some inconsistecies in main

I also think just Patient is probably fine for the x-axis for publication, and the figures don't need to be so wide (since we are going to put together quite a number of these in the same figure panel)

Would I add a section with the "reduced" plots for publication in the same script? Or can I just make these modifications when I use the layout software (remove the titles and crop the figure etc.).

Plots with the latest commit modifications:

2023-04-24_proj-seed_Mutect2-Battenberg-PhyloWGS_sr_subclones_box 2023-04-24_proj-seed_Mutect2-Battenberg-PyClone-VI_mr_subclones_box

philsteinberg commented 1 year ago

It bothers me that the points are not in front of the box. I remember us 'hacking' the code by changing the alpha of the colors, but that does not fix the foreground/background issue.

lydiayliu commented 1 year ago

Would I add a section with the "reduced" plots for publication in the same script? Or can I just make these modifications when I use the layout software (remove the titles and crop the figure etc.).

Usually the best practices is to do as much as possible in a script and as little as possible manually, but to a point. The trade-off is always that you need to invest more time setting up a script, but it is easier to update later on. There are quite a few options 1) the most manual: take current figures and assemble them into panels, adjust axes manually 2) the hybrid: use create.multipanelplot to make one figure out of all the sr figures, and one figure out of all the mr figures, then assemble the two figures manually (this is typically my approach, I script at each "panel" level) 3) the most scripted: you can further use something like cowplot to assemble multipanelplots together, so the output of the script is exactly what you want in the paper (complete with the little a and b and stuff). I've never tried this myself because it looks like a lot of work but I know it can be done

In this case I would just modify the scripts directly, as the simplified versions of the figures are still pretty interpretable. Also since we are still exploring how the figure is going to look, I think it's OK to play around with assembling the panels manually

It bothers me that the points are not in front of the box. I remember us 'hacking' the code by changing the alpha of the colors, but that does not fix the foreground/background issue.

I totally get it!! I like the black right now, and anyways people know that everything >1 is polyclonal. Could you open an issue at the bpg repo for this? I think it might be adjustable

Also good to merge :) I'm not going to review the code again.