Convert CCLE data downloaded by depmap::depmap_TPM()
from long
data into wide matrix, with row names are gene names and column names are
depmap IDs.
ccle_2_wide(ccle)
CCLE data downloaded by depmap::depmap_TPM()
a matrix
data("ccle_crc_5")
ccle <- data.frame(
gene_name = rownames(ccle_crc_5),
ccle_crc_5$counts
) |>
tidyr::pivot_longer(
-gene_name,
names_to = "depmap_id",
values_to = "rna_expression"
)
ccle_wide <- ccle_2_wide(ccle)