Skip to content

Error when source/target has regex special characters for circos plot #4

@pwwang

Description

@pwwang
library(CCPlotR)

data(toy_data, toy_exp, package = 'CCPlotR')

# works fine
cc_circos(toy_data, option = 'B', n_top_ints = 10)
toy_data$source <- ifelse(toy_data$source == "CD8 T", "CD8+ T", toy_data$source)
toy_data$target <- ifelse(toy_data$target == "CD8 T", "CD8+ T", toy_data$target)

CCPlotR::cc_circos(toy_data, option = 'B', n_top_ints = 10)
# errored

Error: Cannot find sector: NA.
Traceback:

1. CCPlotR::cc_circos(toy_data, option = "B", n_top_ints = 10)
2. circlize_plot()
3. highlight.sector(segments[str_detect(segments, paste0("^", l))], 
 .     track.index = 2, col = cell_cols[l])
4. get.cell.meta.data("cell.top.radius", sector.index.vector[1], 
 .     track.index.vector[1])
5. stop_wrap("Cannot find sector: ", sector.index, ".")
6. stop(x, call. = FALSE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions