stuart-lab / signac

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

Error in TSSEnrichment with Seurat V5 object #1683

Closed danielcgingerich closed 7 months ago

danielcgingerich commented 7 months ago

When computing TSS enrichment with fast = FALSE using Signac with the new V5 object structure results in an error.

My object is a multiome assay. gene expression = seu[['rna']], chromatin accessibility = seu[['atac']]

seu
An object of class Seurat
83805 features across 764 samples within 2 assays
Active assay: atac (47217 features, 0 variable features)
 2 layers present: counts, data
 1 other assay present: rna

The command:

seu <- TSSEnrichment(object = seu, fast = FALSE)
Extracting TSS positions
Finding + strand cut sites
Finding - strand cut sites
Computing mean insertion frequency in flanking regions
Normalizing TSS score

Results in error message:

Error in slot(object = object, name = layer) :
  argument "slot" is missing, with no default

I've traced the error to the function SetAssayDatain the TSSEnrichment function's source code. The bug is at the very end of the function source code, right before completion:

object <- suppressWarnings(SetAssayData(object = object, 
                                        assay = assay, slot = "positionEnrichment", new.data = norm.matrix, 
                                        key = "TSS"))
return(object)
timoast commented 7 months ago

This issue is fixed in the latest release, please update Signac