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)

Arguments

ccle

CCLE data downloaded by depmap::depmap_TPM()

Value

a matrix

Examples

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)