Skip to content

Intermittent NA Errors in dec_celltype() #53

Description

@YuxiZhang-0113

Many thanks for creating spaTalk and particularly its virtual single-cell generation functionality, which has become an essential component of our spatial transcriptomics analysis pipeline. However, we consistently encounter two technical challenges:

Issue 1: Intermittent NAs in dec_celltype() during spot generation

When running:

obj <- dec_celltype(obj, sc_data, sc_celltype, if_doParallel = TRUE, use_n_cores = 20, dec_result = dec_result) # pre-computed deconvolution

We intermittently receive:

Generating single-cell data for each spot
Error in sequence.default(n..1, from = seq.int(s.1, length(df), s.1), :
'from' contains NAs
Calls: dec_celltype ... as.matrix -> as.matrix -> as.matrix.dist -> sequence.default
In addition: Warning message:
In sequence.default(n..1, from = seq.int(s.1, length(df), s.1), :
NAs introduced by coercion to integer range
Execution halted
The error occurs inconsistently (same code may work or fail)

Issue 2: Performance bottlenecks with large datasets

dec_celltype() and dec_cci_all() run extremely slowly for Visium data with only ~2,500 spots

We greatly appreciate your insights on these matters!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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