Skip to content

TSSEnrichment() fails  #244

@Seandelao

Description

@Seandelao

Hello,

Great package. I am running Signac on my data, and am running into an issue at the TSSEnrichment step. When running the function, I get the following error:

Error in SetAssayData.ChromatinAssay(object = object[[assay]], slot = slot, :
Position enrichment must be provided as a matrix or sparseMatrix

I am able to follow the Vignette fine, so it's something with my data. Here is my code:

counts <- Read10X_h5(filename = "/Users/seandelao/Desktop/Signac/12wpc_epcam/filtered_peak_bc_matrix.h5")
metadata <- read.csv(file = "/Users/seandelao/Desktop/Signac/12wpc_epcam/singlecell.csv",
                     header = TRUE,
                     row.names = 1
)

chrom_assay <- CreateChromatinAssay(
  counts = counts,
  sep = c(":", "-"),
  genome = 'hg38',
  fragments = "/Users/seandelao/Desktop/Signac/12wpc_epcam/fragments.tsv.gz",
  min.cells = 10,
  min.features = 200
)

pbmc <- CreateSeuratObject(
  counts = chrom_assay,
  assay = "peaks",
  meta.data = metadata
)
pbmc
pbmc[['peaks']]
granges(pbmc)

annotations <- GetGRangesFromEnsDb(ensdb = EnsDb.Hsapiens.v75)

seqlevelsStyle(annotations) <- 'UCSC'
genome(annotations) <- "hg38"

Annotation(pbmc) <- annotations

pbmc <- NucleosomeSignal(object = pbmc)
pbmc

pbmc <- TSSEnrichment(object = pbmc, fast = FALSE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions