| LocalPeaks-class | R Documentation |
The LocalPeaks class is a container for the peaks for one or more marks for a set of samples in a specific genomic region of interest, as well as the genomic region itself, and the sample IDs. These components are needed to convert sets of peaks into rectangular feature-by-sample matrices which we can then use for downstream analysis - and in particular, as input to a clustering algorithm in order to call a chromatin state switch.
## S4 method for signature 'LocalPeaks'
region(x)
## S4 method for signature 'LocalPeaks'
samples(object)
## S4 method for signature 'LocalPeaks'
peaks(x)
x |
LocalPeaks object, as returned by |
object |
LocalPeaks object, as returned by |
LocalPeaks object
regionA GRanges object specifying one genomic region, the query region
peaksList of lists of GRanges objects. Each outer list stores peaks
for each sample for one mark in region.
samplesCharacter vector with sample identifiers.
region:Access region slot of LocalPeaks object.
samples:Access samples slot of LocalPeaks object.
peaks:Access peaks slot of LocalPeaks object.
# Assemble dataset
samples <- c("E068", "E071", "E074", "E101", "E102", "E110")
bedfiles <- system.file("extdata", paste0(samples, ".H3K4me3.bed"),
package = "chromswitch")
metadata <- data.frame(Sample = samples,
H3K4me3 = bedfiles,
stringsAsFactors = FALSE)
# Obtain a LocalPeaks object by retrieving the peaks in the query region
lpk <- retrievePeaks(H3K4me3,
metadata = metadata,
region = GRanges(seqnames = "chr19",
ranges = IRanges(start = 54924104, end = 54929104)))
# lpk now stores the query region, samples, and associated peaks overlapping
# the query region
# Get the samples from the object
samples(lpk)
# Get the query region associated with the object
region(lpk)
# Get the set of peaks in each sample which overlap with the query region
peaks(lpk)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.