Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in vectbl_assign(x[[j]], i, recycled_value[[j]]): DLL requires the use of native symbols #197

Open
stela2502 opened this issue Jul 19, 2024 · 6 comments

Comments

@stela2502
Copy link

Using numbat 1.4.0 (the most up to date version)
I get this output/error:

numbat version: 1.4.0
scistreer version: 1.2.0
hahmmr version: 1.0.0
Running under parameters:
t = 1e-05
alpha = 1e-04
gamma = 20
min_cells = 50
init_k = 3
max_cost = 3220.2
n_cut = 0
max_iter = 2
max_nni = 100
min_depth = 0
use_loh = auto
segs_loh = None
call_clonal_loh = FALSE
segs_consensus_fix = None
multi_allelic = TRUE
min_LLR = 5
min_overlap = 0.45
max_entropy = 0.5
skip_nj = FALSE
diploid_chroms = None
ncores = 4
ncores_nni = 4
common_diploid = TRUE
tau = 0.3
check_convergence = FALSE
plot = TRUE
genome = hg38
Input metrics:
10734 cells

Mem used: 3.24Gb

Warning message in asMethod(object):
“sparse->dense coercion: allocating vector of size 1.4 GiB”
Approximating initial clusters using smoothed expression ..

Mem used: 3.24Gb

number of genes left: 11266

running hclust...

Error in vectbl_assign(x[[j]], i, recycled_value[[j]]): DLL requires the use of native symbols
Traceback:

  1. numbat::run_numbat(as.matrix(mtx_ok), as.matrix(ok), fread(df_allele_ATC2),
    . genome = "hg38", t = 1e-05, ncores = 4, plot = TRUE, out_dir = paste(sep = "",
    . "./numbat_run_", sampleid))
  2. plot_exp_roll(gexp_roll_wide = clust$gexp_roll_wide, hc = hc,
    . k = init_k, gtf = gtf, n_sample = 10000)
  3. ggtree::ggtree(hc, size = 0.2)
  4. ggplot(tr, mapping = mapping, layout = layout, mrsd = mrsd, as.Date = as.Date,
    . yscale = yscale, yscale_mapping = yscale_mapping, ladderize = ladderize,
    . right = right, branch.length = branch.length, root.position = root.position,
    . hang = hang, ...)
  5. ggplot.default(tr, mapping = mapping, layout = layout, mrsd = mrsd,
    . as.Date = as.Date, yscale = yscale, yscale_mapping = yscale_mapping,
    . ladderize = ladderize, right = right, branch.length = branch.length,
    . root.position = root.position, hang = hang, ...)
  6. fortify(data, ...)
  7. fortify.hclust(data, ...)
  8. fortify.phylo(phylo, data, layout, ladderize, right, mrsd = mrsd,
    . ...)
  9. as_tibble(model) %>% mutate(isTip = !.data$node %in% .data$parent)
  10. mutate(., isTip = !.data$node %in% .data$parent)
  11. as_tibble(model)
  12. as_tibble.phylo(model)
  13. full_join(res, label.df, by = "node")
  14. full_join.data.frame(res, label.df, by = "node")
  15. join_mutate(x, y, by = by, type = "full", suffix = suffix, na_matches = na_matches,
    . keep = keep)
  16. [<-(*tmp*, new_rows, names(y_key), value = structure(list(
    . node = 10735L), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
    . -1L)))
  17. [<-.tbl_df(*tmp*, new_rows, names(y_key), value = structure(list(
    . node = 10735L), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
    . -1L)))
  18. tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
  19. tbl_subassign_row(xj, i, value, i_arg, value_arg)
  20. withCallingHandlers(for (j in seq_along(x)) {
    . x[[j]] <- vectbl_assign(x[[j]], i, recycled_value[[j]])
    . }, vctrs_error = function(cnd) {
    . vectbl_recycle_rhs_rows(value, length(i), i_arg, value_arg)
    . cnd_signal(error_assign_incompatible_type(x, recycled_value,
    . j, value_arg, cnd_message(cnd)))
    . })
  21. vectbl_assign(x[[j]], i, recycled_value[[j]])

This is the top lines of my reference:
A data.frame: 6 × 6 X0 X1 X2 X3 X4 X5

BX004987.1 0.0000000000 0.0000000000 0 0 0.0000000000 0
MAFIP 0.0000000000 0.0000000000 0 0 0.0000000000 0
AC145212.1 0.0000000000 0.0000000000 0 0 0.0000000000 0
AC011043.1 0.0000000000 0.0001322424 0 0 0.0000000000 0
AL354822.1 0.0001609134 0.0009256965 0 0 0.0003753307 0
AL592183.1 0.0000000000 0.0001322424 0 0 0.0000000000 0

And my data has genes on the rows and cells on the columns.
Would that be an problem if either the reference or the data has all zero lines?

@stela2502
Copy link
Author

Even if I filter all genes that are zero in either of these tables I still get the same error!

@stela2502
Copy link
Author

Seams an update.packages(ask = FALSE) Did do the trick at the end. Hope this helps somebody ;-)

@stela2502 stela2502 reopened this Jul 19, 2024
@stela2502
Copy link
Author

Sorry - had to re-open this. The same error persists even when after updating all packages. It does not matter whether I use my reference data or the inbuilt. The error about DLL usage persists. I am a little surprised it calls the libraries DLL on a linux system.

@stela2502
Copy link
Author

I am now debugging on my dev machine and have run into one issue here:
In your run_numbat function you are filtering for cells that have both count data and genomic data.
But you forget an important fact: R does make.names() on all column names. And therefore e.g. "ACCAAACCAGAACTAA-1" gets converted to "ACCAAACCAGAACTAA.1" which kills your check. The colnames(count_mat) have applied this function whereas the values in your cell column have not. Could you please apply that function on the values in the cell column before you compare the two datasets? Thank you!

@stela2502
Copy link
Author

The line that would be helpful is:

genomic[,'cell']@.Data[[1]] = make.names(genomic[,'cell']@.Data[[1]])

@stela2502
Copy link
Author

OK that did not help at all. Can you please fix this? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant