Skip to content

problem: dec_cci and dec_cci_all #10

@jinyuanchun

Description

@jinyuanchun

Hi, When I used dec_cci and dec_cci_all to analysis my data about cell-cell communications
and it pops errors
dec_cci error :

Error in intI(j, n = d[2L], dn[[2L]], give.dn = FALSE): invalid character indexing
Traceback:

1. dec_cci(object = obj, celltype_sender = "Vascular", celltype_receiver = "Differentiated_like", 
 .     use_n_cores = 4)
2. .lr_distance_doParallel(st_data, cell_pair, lrdb, celltype_sender, 
 .     celltype_receiver, per_num, pvalue)
3. st_data[lrdb$ligand, cell_pair$cell_sender]
4. st_data[lrdb$ligand, cell_pair$cell_sender]
5. callGeneric(x, i = i, j = j, drop = TRUE)
6. eval(call, parent.frame())
7. eval(call, parent.frame())
8. x[i = i, j = j, drop = TRUE]
9. x[i = i, j = j, drop = TRUE]
10. subCsp_ij(x, i, j, drop = drop)
11. intI(j, n = d[2L], dn[[2L]], give.dn = FALSE)
12. stop("invalid character indexing")

dec_cci_all error
Note: there are 6 cell types and 30 pair-wise cell pairs
Begin to find LR pairs
Error in {: task 1 failed - "invalid character indexing"
Traceback:

  1. dec_cci_all(object = obj, use_n_cores = 4)
  2. foreach::foreach(i = 1:nrow(celltype_pair), .packages = c("Matrix",
    . "reshape2"), .export = c(".get_cellpair", ".lr_distance",
    . ".get_tf_res", ".get_score")) %dopar% {
    . celltype_sender <- celltype_pair$celltype_sender[i]
    . celltype_receiver <- celltype_pair$celltype_receiver[i]
    . cell_pair <- .get_cellpair(celltype_dist, st_meta, celltype_sender,
    . celltype_receiver, n_neighbor)
    . cell_sender <- st_meta[st_meta$celltype == celltype_sender,
    . ]
    . cell_receiver <- st_meta[st_meta$celltype == celltype_receiver,
    . ]
    . cell_pair_all <- nrow(cell_sender) * nrow(cell_receiver)/2
    . if (nrow(cell_pair) > min_pairs) {
    . if (nrow(cell_pair) > cell_pair_all * min_pairs_ratio) {
    . lrdb <- object@lr_path$lrpairs
    . lrdb <- .lr_distance(st_data, cell_pair, lrdb, celltype_sender,
    . celltype_receiver, per_num, pvalue)
    . max_hop <- object@para$max_hop
    . receptor_tf <- NULL
    . if (nrow(lrdb) > 0) {
    . receptor_tf <- .get_tf_res(celltype_sender, celltype_receiver,
    . lrdb, ggi_tf, cell_pair, st_data, max_hop,
    . co_exp_ratio)
    . if (!is.null(receptor_tf)) {
    . lrdb <- .get_score(lrdb, receptor_tf)
    . }
    . else {
    . lrdb <- NULL
    . }
    . }
    . if (is.data.frame(lrdb)) {
    . if (nrow(lrdb) > 0) {
    . list(lrdb = lrdb, receptor_tf = receptor_tf,
    . cell_pair = cell_pair)
    . }
    . }
    . }
    . }
    . }
  3. e$fun(obj, substitute(ex), parent.frame(), e$data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions