Extract data from Signac RegionMatrix?
2
0
Entering edit mode
17 months ago

I'm trying to extract the data matrix computed by Signac r package when running RegionMatrix(). I know I can plot the data with RegionHeatmap(), but I want to plot the data with another package. So, if I created a region matrix like this:

my_object <- RegionMatrix(my_object
                        , key = "my_region_matrix"
                        , regions = StringToGRanges(top_cluster_genes$gene)
                        , upstream = 2500, downstream = 2500)

How do I go about extracting the data stored within the object under the key "my_region_matrix"? I know it's a pretty basic question, but I've been browsing the returned object and can't find any assay/matrix with that key name.

Signac r seurat sc-atac • 902 views
ADD COMMENT
1
Entering edit mode
17 months ago

Just got back an answer from the Signac team, the way to do this is:

mat <- GetAssayData(object = object, slot = "positionEnrichment")[["my_region_matrix"]]
ADD COMMENT
0
Entering edit mode
15 months ago
Chironex ▴ 50
object@assays$ATAC@positionEnrichment$my_region_matrix

and also

object@assays$ATAC@positionEnrichment$my_region_matrix$condition_of_interest
ADD COMMENT

Login before adding your answer.

Traffic: 3664 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6