prep_cnv_dat {SlideCNA} | R Documentation |
Prepare data for CNV heat map
Description
This function caps CNV scores, adds annotation columns for plotting, performs hierarchical clustering of bins based on similar CNV score, and plots nUMI per bin
Usage
prep_cnv_dat(
dat_bin,
lower = 0.6,
upper = 1.4,
hc_function = "ward.D2",
plot_directory
)
Arguments
dat_bin |
data.table of CNV scores per bin |
lower |
numeric float to represent the lower cap for CNV scores |
upper |
numeric float to represent the upper cap for CNV scores |
hc_function |
character for which hierarchical clustering function to use |
plot_directory |
output plot directory path |
Value
A list object for downstream cnv plotting and analysis all = data.table of CNV scores of all bins x (metadata + genes) malig = data.table of CNV scores of just malignant bins x (metadata + genes) all_wide = data.frame in wide format of CNV scores of all bins x (metadata + genes) malig_wide = data.frame in wide format of CNV scores of just malignant bins x (metadata + genes) hcl = hclust object that describes the hierarchical clustering for malignant bins hcl_all = hclust object that describes the hierarchical clustering for all bins