get_opt_ers: Obtain set of non-overlapping exons

Description Usage Arguments Value Functions Examples

View source: R/optimise-ERs.R

Description

Downloads a well-defined set of exons to be used in obtaining the optimum set of Expressed regions. These exons are used in calculating the exon deltas.

Calculates the median exon delta and the number of ERs with an exon delta of 0 by comparing each combination of MCC and MRG with the optimum exons from the ensembl database.

Uses a delta calculating function and a well defined set of exons to find which combination of MCC and MRG gives the best definition of the Expressed regions.

Usage

1
2
3
4
5
get_exons(gtf, ucsc_chr, ignore.strand = TRUE, biotype = "Non-overlapping")

get_ers_delta(ers, opt_exons, delta_fun = NULL)

get_opt_ers(ers, ers_delta)

Arguments

gtf

Either a string containg the path to a .gtf file or a pre-imported gtf using rtracklayer::import .

ucsc_chr

logical scalar, determining whether to add "chr" prefix to the seqnames of non-overlapping exons and change "chrMT" -> "chrM". Note, if set to TRUE and seqnames already have "chr", it will not add another.

ignore.strand

logical value for input into findOverlaps, default is True.

biotype

Filters the GTF file passed in to what would be considered the "Gold Standard" exons. The Default is "Non-overlapping" but the options are: "Non-overlapping" (exons that don't intersect each other), "Three Prime" (3' UTR), "Five Prime" (5' UTR), "Internal" (Internal coding), "lncRNA" (Long Non-Coding RNA), "ncRNA" (Non-Coding RNA) and "Pseudogene"

ers

Sets of ERs across various MCCs/MRGs - output of get_ers.

opt_exons

GRanges object that contains the regions that ideally, you want the ER definitions to match - output of get_exons.

delta_fun

Function that calculates the delta between ERs and opt_exons. Takes as input a set of ERs from ers and opt_exons. Then outputs a tibble/dataframe containing the summarised delta scores for that set of one set of ERs.

ers_delta

tibble/dataframe containing summarised delta values. One row per set of ERs.

Value

GRanges object containing non-overlapping exons.

tibble/dataframe containing summarised delta values. One row per set of ERs.

list containing optimised ERs, optimal pair of MCC/MRGs and delta_df

Functions

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
gtf_url <- paste0(
    "http://ftp.ensembl.org/pub/release-103/gtf/",
    "homo_sapiens/Homo_sapiens.GRCh38.103.chr.gtf.gz"
)
gtf_path <- file_cache(gtf_url)

gtf_gr <- rtracklayer::import(gtf_path)

eg_opt_exons <- get_exons(
    gtf = gtf_gr,
    ucsc_chr = TRUE,
    ignore.strand = TRUE
)


eg_opt_exons
data(gtex_SRP012682_SRX222703_lung_ers_1, package = "ODER")

eg_ers_delta <- get_ers_delta(
    ers = gtex_SRP012682_SRX222703_lung_ers_1,
    opt_exons = eg_opt_exons
)

eg_ers_delta
data(gtex_SRP012682_SRX222703_lung_ers_1, package = "ODER")
opt_ers <- get_opt_ers(
    ers = gtex_SRP012682_SRX222703_lung_ers_1,
    ers_delta = eg_ers_delta
)
opt_ers

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