Skip to content

Error in if (abs(cor(slide$imagecol, slide$col)) > 0.99) {: missing value where TRUE/FALSE needed #38

Description

@forrwill

I create the slideseq object with stereoseq data, But when running the tool, I met the error as below

Filtered out 11542 genes with average expressions below or equal to 0.01.

2025-05-09 15:00:00.561311 Start.

Warning message in cor(slide$imagecol, slide$col):
“the standard deviation is zero”
Error in if (abs(cor(slide$imagecol, slide$col)) > 0.99) {: missing value where TRUE/FALSE needed
Traceback:

  1. spotclean.SpatialExperiment(spe, candidate_radius = 30, gene_cutoff = 0.01)
  2. .SpotClean(raw_data = raw_data, slide = slide, gene_keep = gene_keep,
    . maxit = maxit, tol = tol, candidate_radius = candidate_radius,
    . kernel = kernel, verbose = verbose)
  3. .handleSimpleError(function (cnd)
    . {
    . watcher$capture_plot_and_output()
    . cnd <- sanitize_call(cnd)
    . watcher$push(cnd)
    . switch(on_error, continue = invokeRestart("eval_continue"),
    . stop = invokeRestart("eval_stop"), error = NULL)
    . }, "missing value where TRUE/FALSE needed", base::quote(if (abs(cor(slide$imagecol,
    . slide$col)) > 0.99) {
    . lm_tmp <- lm(slide$imagecol ~ slide$col)
    . } else {
    . lm_tmp <- lm(slide$imagerow ~ slide$col)
    . }))

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