xmuhuanglab / eNet

10 stars 7 forks source link

Error: is(object = cds, class2 = "CellDataSet") is not TRUE #4

Closed fork16 closed 2 years ago

fork16 commented 2 years ago

Hello, I got another bug in

conns <- FindEdge(peaks.mat=cre.mat,  # peak-cell matrix
                  GPPair=GPPair, # A list of enhancer cluster, the output of Step.2
                  cellinfo=metadata,  # A data frame containing attributes of individual cells.
                  k=50, # Number of cells to aggregate per bin when generate an aggregated input CDS for cicero
                  coords=dcluster_coords, # A data frame with columns representing the coordinates of each cell in reduced dimension space (generally 2-3 dimensions).
                  genome='hg19' # reference genome, must be one of "hg19", "mm10", or "hg38"
)

The line where the bug occurs in function FindEdge() is cicero_cds <- make_cicero_cds(input_cds, reduced_coordinates = dcluster_coords, k = k)

Error: is(object = cds, class2 = "CellDataSet") is not TRUE

It comes from packages cicero .Could it be a version problem? Because I use the example data of cicero to run the function make_cicero_cds() also is wrong.

Here is my sessionInfo()

sessionInfo() R version 4.0.5

(2021-03-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS

Matrix products: default BLAS/LAPACK: /root/miniconda3/envs/r405/lib/libopenblasp-r0.3.20.so

locale: [1] C

attached base packages: [1] grid splines stats4 parallel stats graphics grDevices [8] utils datasets methods base

other attached packages: [1] doParallel_1.0.17 iterators_1.0.14
[3] foreach_1.5.2 TFBSTools_1.28.0
[5] cicero_1.8.1 Gviz_1.34.1
[7] monocle_2.18.0 DDRTree_0.1.5
[9] irlba_2.3.5 VGAM_1.1-6
[11] ggplot2_3.3.6 monocle3_1.0.0
[13] SingleCellExperiment_1.12.0 Matrix_1.4-1
[15] SummarizedExperiment_1.20.0 Biobase_2.50.0
[17] GenomicRanges_1.42.0 GenomeInfoDb_1.26.4
[19] MatrixGenerics_1.2.1 matrixStats_0.62.0
[21] dplyr_1.0.9 reshape2_1.4.4
[23] sp_1.5-0 SeuratObject_4.1.0
[25] Seurat_4.1.1 IRanges_2.24.1
[27] S4Vectors_0.28.1 BiocGenerics_0.36.0
[29] Signac_1.2.1

xmuhuanglab commented 2 years ago

Hello, I got another bug in

conns <- FindEdge(peaks.mat=cre.mat,  # peak-cell matrix
                 GPPair=GPPair, # A list of enhancer cluster, the output of Step.2
                 cellinfo=metadata,  # A data frame containing attributes of individual cells.
                 k=50, # Number of cells to aggregate per bin when generate an aggregated input CDS for cicero
                 coords=dcluster_coords, # A data frame with columns representing the coordinates of each cell in reduced dimension space (generally 2-3 dimensions).
                 genome='hg19' # reference genome, must be one of "hg19", "mm10", or "hg38"
)

The line where the bug occurs in function FindEdge() is cicero_cds <- make_cicero_cds(input_cds, reduced_coordinates = dcluster_coords, k = k)

Error: is(object = cds, class2 = "CellDataSet") is not TRUE

It comes from packages cicero .Could it be a version problem? Because I use the example data of cicero to run the function make_cicero_cds() also is wrong.

Here is my sessionInfo()

sessionInfo() R version 4.0.5

(2021-03-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 20.04.1 LTS Matrix products: default BLAS/LAPACK: /root/miniconda3/envs/r405/lib/libopenblasp-r0.3.20.so locale: [1] C attached base packages: [1] grid splines stats4 parallel stats graphics grDevices [8] utils datasets methods base other attached packages: [1] doParallel_1.0.17 iterators_1.0.14 [3] foreach_1.5.2 TFBSTools_1.28.0 [5] cicero_1.8.1 Gviz_1.34.1 [7] monocle_2.18.0 DDRTree_0.1.5 [9] irlba_2.3.5 VGAM_1.1-6 [11] ggplot2_3.3.6 monocle3_1.0.0 [13] SingleCellExperiment_1.12.0 Matrix_1.4-1 [15] SummarizedExperiment_1.20.0 Biobase_2.50.0 [17] GenomicRanges_1.42.0 GenomeInfoDb_1.26.4 [19] MatrixGenerics_1.2.1 matrixStats_0.62.0 [21] dplyr_1.0.9 reshape2_1.4.4 [23] sp_1.5-0 SeuratObject_4.1.0 [25] Seurat_4.1.1 IRanges_2.24.1 [27] S4Vectors_0.28.1 BiocGenerics_0.36.0 [29] Signac_1.2.1

Cicero uses monocle 3 as one of its dependencies, you could try it.

fork16 commented 2 years ago

Yes,it comes from monocle 3. I have found the problem which is in input_cds <- suppressWarnings(new_cell_data_set(indata, ell_metadata = metadata, gene_metadata = peakinfo)) in FindEdge(). The class of input_cds is 'cell_data_set', but cicero_cds <- make_cicero_cds(input_cds, reduced_coordinates = dcluster_coords, k = k) requires the class of input_cds is 'CellDataSet' . They are the same object but different class and I can`t change the command in packages cicero_1.8.1 . Please tell me your version of monocle3 and cicero. Thanks a lot! @xmuhuanglab

xmuhuanglab commented 2 years ago

cicero_1.3.4.10 monocle3_0.2.1

fork16 commented 2 years ago

I have used conda to install the cicero and monocle3, which make bug frequently. The correct way to download software is devtools::install_github("cole-trapnell-lab/cicero-release", ref = "monocle3") . Using this way to download cicero will not build the error like 'Error: is(object = cds, class2 = "CellDataSet") is not TRUE'.