stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
330 stars 88 forks source link

Number of rows in provided matrix does not match the number of rows in the object #1753

Closed baptisteavot-ukdri closed 3 months ago

baptisteavot-ukdri commented 4 months ago
peaks <- CallPeaks(
        object = seurat_object@assays$ATAC,
        group.by="celltype",
        macs2.path = macs_path)

  mat<-FeatureMatrix(seurat_object@assays$ATAC@fragments,peaks)

  atac_assay<-CreateChromatinAssay(mat,
                                   annotation=peaks)

  new_seurat<-CreateSeuratObject(counts=atac_assay,assay='ATAC',meta.data = seurat_object@meta.data)

  seurat_out<-sprintf("%s/seurat/peaks_called.qs",outdir)`

The error is:

Error in SetAssayData.ChromatinAssay(object = object, slot = layer, new.data = value) : Number of rows in provided matrix does not match the number of rows in the object Calls: CallPeaksSignac ... LayerData<-.ChromatinAssay -> SetAssayData -> SetAssayData.ChromatinAssay

ChromatinAssay was working fine with the development version of signac

But now when I work in a separate conda environment, with the conda signac release I am getting this error.

I can see this is the same as this error: #230 - could it have anything to do with discrepancies between the conda release and the dev version?

My conda environment contains the following:

channels:

timoast commented 3 months ago

At which line are you getting this error?

timoast commented 3 months ago

closing since I haven't heard back, please reopen if you're still having problems