Skip to content

Error in restrictCorpus() in default settings. #61

@lelandwilliams

Description

@lelandwilliams

Following the blog post "10x Visium spatial transcriptomics data analysis with STdeconvolve in R" with my own data, I created gexp2.

This code fails:

> corpus <- restrictCorpus(gexp2)
Removing 2 genes present in 100% or more of pixels...
18083 genes remaining...
Removing 6422 genes present in 5% or less of pixels...
11661 genes remaining...
Restricting to overdispersed genes with alpha = 0.05...
Calculating variance fit ...
Using gam with k=5...
1272 overdispersed genes ... 
 Using top 1000 overdispersed genes.

Error in .subscript.2ary(x, i, , drop = TRUE) : subscript out of bounds

But when I set nTopOD, it succeeds:

> corpus <- restrictCorpus(gexp2, nTopOD = NA)
Removing 2 genes present in 100% or more of pixels...
18083 genes remaining...
Removing 6422 genes present in 5% or less of pixels...
11661 genes remaining...
Restricting to overdispersed genes with alpha = 0.05...
Calculating variance fit ...
Using gam with k=5...
1272 overdispersed genes ... 
Genes in corpus > 1000 (1272). This may cause model fitting to take a while. Consider reducing the number of genes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions