Skip to content

CoveragePlot error on ATAC data #1236

@Bojung2540

Description

@Bojung2540

Hello, @timoast .
I have doubts about using the CoveragePlot() function of the Signac package version 1.8.0.

The code that I used is as shown here.

CoveragePlot(object = coembed.atac,
region = rownames(da_peaks_A)[1],
extend.upstream = 1000,
extend.downstream = 1000)

Where rownames(da_peaks_A)[1] = "Chr1-12933056-12940246"

And I get the error as follows:

Error in `colnames<-`(`*tmp*`, value = start(x = region):end(x = region)) :
attempt to set 'colnames' on an object with less than two dimensions

Here is the traceback:

6. stop("attempt to set 'colnames' on an object with less than two dimensions")
5. `colnames<-`(`*tmp*`, value = start(x = region):end(x = region))
4. SingleCoveragePlot(object = object, region = region[[x]], features = features,
expression.assay = expression.assay, expression.slot = expression.slot,
show.bulk = show.bulk, annotation = annotation, peaks = peaks,
peaks.group.by = peaks.group.by, ranges = ranges, ranges.group.by = ranges.group.by, ...
3. FUN(X[[i]], ...)
2. lapply(X = seq_along(region), FUN = function(x) {
SingleCoveragePlot(object = object, region = region[[x]],
features = features, expression.assay = expression.assay,
expression.slot = expression.slot, show.bulk = show.bulk, ...
1. CoveragePlot(object = coembed.atac, region = rownames(da_peaks_A)[1],
extend.upstream = 1000, extend.downstream = 1000)

Here is the assay that I use:

coembed.atac[['ATAC']]
ChromatinAssay data with 22749 features for 1004 cells
Variable features: 0
Genome:
Annotation present: TRUE
Motifs present: TRUE
Fragment files: 0

I'm not sure if the error that's occurring is a result of this ChromatinAssay lacking a fragment file.

I apologize if this question has been raised previously.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Q1 2023

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions