refine_ERs: Refines the ERs start and end points

Description Usage Arguments Details Value Examples

View source: R/refine-ERs.R

Description

Uses the junctions added by annotatERs to modify the starts and ends of the expressed regions. When a junction intersects an expressed region depending on whether it is the start or end or both, the regions corresponding starts and ends will be modified.

Usage

1
refine_ERs(annot_ers)

Arguments

annot_ers

ERs that have been annotated (result of annotatER)

Details

As junctions mark intron boundaries, the expressed region will be changed to either being one less or one more than the junction end.

Value

Genomic ranges with refined base pair starts and ends

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# create example set of ers to save runtime
ex_annot_ers <- GenomicRanges::GRanges(
    seqnames = S4Vectors::Rle(c("chr21"), c(3)),
    ranges = IRanges::IRanges(
        start = c(5093576, 5097663, 5162182),
        end = c(5093833, 5097762, 5162257)
    ),
    grl = GenomicRanges::GRangesList(
        GenomicRanges::GRangesList(
            GenomicRanges::GRanges(
                seqnames = S4Vectors::Rle(c("chr21"), c(1)),
                ranges = IRanges::IRanges(
                    start = c(5093712),
                    end = c(5093744)
                )
            ),
            GenomicRanges::GRanges(
                seqnames = S4Vectors::Rle(c("chr21"), c(1)),
                ranges = IRanges::IRanges(
                    start = c(5097642),
                    end = c(5097669)
                )
            ),
            GenomicRanges::GRanges(
                seqnames = S4Vectors::Rle(c("chr21"), c(1)),
                ranges = IRanges::IRanges(
                    start = c(5162249),
                    end = c(5162287)
                )
            )
        )
    ),
    annotation = c("intron", "intron", "intron")
)

refined_ers <- refine_ERs(ex_annot_ers)

refined_ers

eolagbaju/ODER documentation built on Dec. 20, 2021, 5:21 a.m.