makeTravisCoordsFromTxDb: makeTravisCoordsFromTxDb

Usage Arguments Examples

View source: R/makeTravisCoordsFromTxDb.R

Usage

1
makeTravisCoordsFromTxDb(txdb, maximalAmbiguity = 3, minimalComponentLength = 100, minimalNcRNALength = 300, noBins = 100)

Arguments

txdb
maximalAmbiguity
minimalComponentLength
minimalNcRNALength
noBins

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (txdb, maximalAmbiguity = 3, minimalComponentLength = 100, 
    minimalNcRNALength = 300, noBins = 100) 
{
    parameter = list()
    parameter$txdb <- txdb
    parameter$maximalAmbiguity <- maximalAmbiguity
    parameter$minimalComponentLength <- minimalComponentLength
    parameter$minimalNcRNALength <- minimalNcRNALength
    parameter$noBins <- noBins
    component <- .extractComponent(parameter)
    side <- .get2sides(component)
    print("Building Travis Coordinates. It may take a few minutes ...")
    utr3_bin <- makeTravisCoordsFromGRangesList(component[["utr3"]], 
        parameter$noBins)
    utr5_bin <- makeTravisCoordsFromGRangesList(component[["utr5"]], 
        parameter$noBins)
    cds_bin <- makeTravisCoordsFromGRangesList(component[["cds"]], 
        parameter$noBins)
    ncRNA_bin <- makeTravisCoordsFromGRangesList(component[["ncRNA"]], 
        parameter$noBins)
    mRNA_front_bin <- makeTravisCoordsFromGRangesList(side[["mrna_front"]], 
        parameter$noBins)
    mRNA_back_bin <- makeTravisCoordsFromGRangesList(side[["mrna_back"]], 
        parameter$noBins)
    ncRNA_front_bin <- makeTravisCoordsFromGRangesList(side[["ncrna_front"]], 
        parameter$noBins)
    ncRNA_back_bin <- makeTravisCoordsFromGRangesList(side[["ncrna_back"]], 
        parameter$noBins)
    print("Travis Coordinates Built ...")
    mcols(utr3_bin) <- data.frame(mcols(utr3_bin), comp = "UTR3", 
        category = "mRNA")
    mcols(utr3_bin)$pos <- mcols(utr3_bin)$pos + 3
    mcols(utr5_bin) <- data.frame(mcols(utr5_bin), comp = "UTR5", 
        category = "mRNA")
    mcols(utr5_bin)$pos <- mcols(utr5_bin)$pos + 1
    mcols(cds_bin) <- data.frame(mcols(cds_bin), comp = "CDS", 
        category = "mRNA")
    mcols(cds_bin)$pos <- mcols(cds_bin)$pos + 2
    mcols(mRNA_front_bin) <- data.frame(mcols(mRNA_front_bin), 
        comp = "Front", category = "mRNA")
    mcols(mRNA_front_bin)$pos <- mcols(mRNA_front_bin)$pos
    mcols(mRNA_back_bin) <- data.frame(mcols(mRNA_back_bin), 
        comp = "Back", category = "mRNA")
    mcols(mRNA_back_bin)$pos <- mcols(mRNA_back_bin)$pos + 4
    mcols(ncRNA_bin) <- data.frame(mcols(ncRNA_bin), comp = "lncRNA", 
        category = "lncRNA")
    mcols(ncRNA_bin)$pos <- mcols(ncRNA_bin)$pos + 1
    mcols(ncRNA_front_bin) <- data.frame(mcols(ncRNA_front_bin), 
        comp = "Front", category = "lncRNA")
    mcols(ncRNA_front_bin)$pos <- mcols(ncRNA_front_bin)$pos
    mcols(ncRNA_back_bin) <- data.frame(mcols(ncRNA_back_bin), 
        comp = "Back", category = "lncRNA")
    mcols(ncRNA_back_bin)$pos <- mcols(ncRNA_back_bin)$pos + 
        2
    TravisCoords <- suppressWarnings(c(mRNA_front_bin, utr5_bin, 
        cds_bin, utr3_bin, mRNA_back_bin, ncRNA_front_bin, ncRNA_bin, 
        ncRNA_back_bin))
    return(TravisCoords)
  }

lzcyzm/Travis_Dev documentation built on May 21, 2019, 9:16 a.m.