uclahs-cds / package-CancerEvolutionVisualization

Publication Quality Phylogenetic Tree Plots
https://cran.r-project.org/web/packages/CancerEvolutionVisualization/
GNU General Public License v2.0
2 stars 0 forks source link

Bug in auto-scaling? #122

Closed whelena closed 5 months ago

whelena commented 6 months ago

I'm generating the plot for this data: /hot/project/disease/SarcomaTumor/SARC-000155-OrganoidDrugSensitivity/SRC_analysis/emulsiphy/Battenberg/SGSALASC000015/SGSALASC000015_phylogeny.tsv

I'm using the most recent version of SRCGrob from the main branch.

Code:

phy.dt <- fread('/hot/project/disease/SarcomaTumor/SARC-000155-OrganoidDrugSensitivity/SRC_analysis/emulsiphy/Battenberg/SGSALASC000015/SGSALASC000015_phylogeny.tsv');
CEV.dt  <- convert.CEV(phy.dt[!is.na(parent), ]);
CEV.dt[, length1 := log10(length1)];
y.lab <- expression(paste('log' [10], '(# of SNV)'));
patient <- paste0(patient, '_log10');

########################################################################################################
plt <- SRCGrob(
    CEV.dt,
    main = paste(patient, 'Tree'),
    horizontal.padding = 3,
    scale1 = 2,
    yaxis1.label = y.lab,
    add.normal = TRUE
    );

png(
    file = plot.path[['CEV-tree']],
    width = 15,
    height = 10,
    units = 'in',
    res = 500
    );
grid.draw(plt);
dev.off();

Result

Screenshot 2024-03-12 at 1 47 09 PM