Skip to content

Subset does not take Motif positions with it #364

@skilpinen

Description

@skilpinen

Hi,

Encountered an issue where seurat object having chromatin assay and motif data within it subjected to subset leads to situation where there still is Motif data present in the object but not the @positions data. It becomes NULL in this case.

Original data:

head(Motifs(s.data[["peaks"]])@positions)
GRangesList object of length 6:
$Arnt_MA0004.1
GRanges object with 37214 ranges and 1 metadata column:
seqnames ranges strand | score
|
[1] chr1 3218627-3218632 + | 11.2289
[2] chr1 3218627-3218632 - | 11.2289
[3] chr1 4519629-4519634 + | 11.2289

Then

s.data.subset <-subset(s.data, idents=c("1","2","3","4"))

Then

head(Motifs(s.data.subset[["peaks"]])@positions)
NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions