Skip to content

Get peaks name according to the CoveragePlot #419

Answered by timoast
yuhanH asked this question in Q&A
Discussion options

You must be logged in to vote

In many cases you can treat a Seurat object with a ChromatinAssay as the active assay like a GRanges object, and use functions in the GenomicRanges package for interacting with the ranges (see here for more information). In this case you can find overlaps between the region of interest and the peaks to get the index of the overlapping peaks, then extract the actual ranges of those peaks, for example:

library(Signac)
library(GenomicRanges)

# obj is an example Seurat object containing a ChromatinAssay

overlap_peaks <- findOverlaps(obj, StringToGRanges("chr1-10000000-10010000"))
granges(obj)[queryHits(overlap_peaks)]

In this particular case, the region you highlighted in the box is part of…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by timoast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants