Skip to content

Split complexes in RL map #176

@snag-gh

Description

@snag-gh

CellphoneDB has interactions with complexes. We can split the complexes so each component gene is part of its own interaction.

cpdb_rl_map <- readRDS(here::here("results", "cellphoneDB_RL_map", "cpdb_rl_map_with_collagen_integrin.rds"))

cpdb_rl_map_expanded <- cpdb_rl_map %>%
  mutate(name_A = gene_A) %>%
  separate_longer_delim(c("name_A", "uniprot_A", "gene_A"), delim = ",")

cpdb_rl_map_expanded <- cpdb_rl_map_expanded %>%
  mutate(name_B = gene_B) %>%
  separate_longer_delim(c("name_B", "uniprot_B", "gene_B"), delim = ",")

cpdb_rl_map_expanded <- cpdb_rl_map_expanded %>%
  mutate(int_pair = paste0(name_A, " & ", name_B)) %>%
  #distinct(pick(int_pair, name_A, uniprot_A, gene_A, type_A, name_B, uniprot_B, gene_B, type_B, database_name)) ->
  distinct(int_pair, .keep_all = TRUE)
  

saveRDS(cpdb_rl_map_expanded, here::here("results", "cellphoneDB_RL_map", "cpdb_rl_map_with_collagen_integrin.expanded_complexes.rds")) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions