filter_loci_by_location: Remove loci by overlap with a 'GRanges' object

View source: R/filter_loci_by_location.R

filter_loci_by_locationR Documentation

Remove loci by overlap with a GRanges object

Description

A function to remove loci from a BSseq object based on intersection with loci in a GRanges object.

Usage

filter_loci_by_location(bs, gr)

Arguments

bs

a BSseq object.

gr

a GRanges object.

Value

A BSseq object with loci intersecting gr removed.

Examples

data(bsseq_stranded, package = 'methylSig')
regions = GenomicRanges::GRanges(
    seqnames = c('chr1','chr1','chr1','chr1'),
    ranges = IRanges::IRanges(
        start = c(5,25,45,70),
        end = c(15,40,55,80)
    )
)
filtered = filter_loci_by_location(bs = bsseq_stranded, gr = regions)


sartorlab/methylSig documentation built on March 26, 2023, 10:04 a.m.