Skip to content

Error in if (tolower(filter) == "novar") { : missing value where TRUE/FALSE needed #134

Description

@Moonerss

Thanks for this awesome package.

When I use it with a dataset contain about 190,000 cells,I got an error:

Error in if (tolower(filter) == "novar") { : missing value where TRUE/FALSE needed

I think it maybe caused by the judgment condition not matching the condition content when run applyMicroClustering in poolCells.

## code in poolCells
if (is.null(object@params$latentSpace[["projectionGenes"]])){
        filterInput <- object@params$latentSpace$projectionGenesMethod
    } else {
        filterInput <- object@params$latentSpace$projectionGenes
    }

    if (length(object@Pools) == 0) {
        pools <- applyMicroClustering(
            object@exprData,
            cellsPerPartition = object@params$micropooling$cellsPerPartition,
            filterInput = filterInput,
            filterThreshold = object@params$latentSpace$threshold,
            latentSpace = object@LatentSpace,
            K = object@params$numNeighbors)

        object@Pools <- pools
    }

Below is the code I run:

> vis <- Vision(cpm_mat, signatures = pathway_gmt, meta = cpm_seurat@meta.data)
Loading data from /public/home/ezhao/qian_lab/raw_data/myself/analysis/metabolism/data/raw_data/latest_main_metabolism_pathway.gmt ...

Using 17620/17638 genes detected in 0.10% of cells for signature analysis.
See the `sig_gene_threshold` input to change this behavior.

Over 100000 input cells detected.  Enabling micropooling with max 10 cells per pool.
> vis <- analyze(vis)
Beginning Analysis

Performing micro-pooling on 185621 cells with a target pool size of 10
    Computing a latent space for microclustering using PCA...
    Determining lateng space genes...
Error in if (tolower(filter) == "novar") { :
  missing value where TRUE/FALSE needed

sessioninfo

R version 4.3.2 (2023-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /public/home/ezhao/software/base_use_conda/lib/libopenblasp-r0.3.25.so;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Asia/Shanghai
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] AUCell_1.24.0      fgsea_1.28.0       Seurat_5.0.1       SeuratObject_5.0.0
 [5] sp_2.1-2           lubridate_1.9.3    forcats_1.0.0      stringr_1.5.1
 [9] dplyr_1.1.4        purrr_1.0.2        readr_2.1.4        tidyr_1.3.1
[13] tibble_3.2.1       ggplot2_3.5.0      tidyverse_2.0.0    VISION_3.0.2

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions