Last data update: 2014.03.03

R: makeGuitarCoordsFromTxDb
makeGuitarCoordsFromTxDbR Documentation

makeGuitarCoordsFromTxDb

Description

Make a Guitar Coordinates from TranscriptDb object, i.e., making Guitar coordinates for 8 different components, including, 5'UTR, CDS, 3'UTR, lncRNA, Pomoter and Tail of mRNA and lncRNA. Additional filters will discard transcripts that are too short or has too much ambigous on Genome to increase the sensitivity of the analysis.

Usage

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

Arguments

txdb

A transcriptDb object, which can be generated from makeTxDbFromUCSC or other functions.

maximalAmbiguity

If a transcript overlap with more number of transcripts than this number, this transcript will be used in the analysis. By filtering out a number of transcripts, this filter also decrease memory usage and computation time. Default: 3.

minimalComponentLength

The mimimal length of the components (5'UTR, CDS, 3'UTR) of a mRNA. Unfortunately, some mRNAs do not all 3 components or some components can be too short and cannot provide effective resolution for the analysis. These mRNAs will be filtered out from the analysis. Default: 100

minimalNcRNALength

non-coding RNAs with length smaller than this value will not be used in the analysis.

noBins

The number of sections the "transcript" of the GRangesList object will be equally divided into. This is the resolution of the Guitar coordinates. The larger noBins is, the clearer the visualization will be; however, more computation time and memory resource will be required. You may want to set a smaller number when using a slow computer. Default: 100.

Value

A Guitar coordiantes (GRanges object) will be returned, with Transcript ID, the relative position of each GRanges on the RNA transcript, the interval (bp) between different coordiantes on a transcript component: Front (DNA), Back (DNA), 5'UTR, CDS, 3'UTR, lncRNA.

Author(s)

Jia Meng <jia.meng@hotmail.com>

Examples

txdb_file <- system.file("extdata", "hg19_knownGene_sample.sqlite",
                         package="GenomicFeatures")
txdb <- loadDb(txdb_file)
gc_txdb <- makeGuitarCoordsFromTxDb(txdb,noBins =3)
gc_txdb

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Guitar)
Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomicFeatures
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: rtracklayer
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: ggplot2
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Guitar/makeGuitarCoordsFromTxDb.Rd_%03d_medium.png", width=480, height=480)
> ### Name: makeGuitarCoordsFromTxDb
> ### Title: makeGuitarCoordsFromTxDb
> ### Aliases: makeGuitarCoordsFromTxDb
> ### Keywords: ~kwd1 ~kwd2
> 
> ### ** Examples
> 
> txdb_file <- system.file("extdata", "hg19_knownGene_sample.sqlite",
+                          package="GenomicFeatures")
> txdb <- loadDb(txdb_file)
> gc_txdb <- makeGuitarCoordsFromTxDb(txdb,noBins =3)
[1] "total 178 transcripts extracted ..."
[1] "total 108 transcripts left after ambiguity filter ..."
[1] "total 47 mRNAs left after component length filter ..."
[1] "total 12 ncRNAs left after ncRNA length filter ..."
[1] "Building Guitar Coordinates. It may take a few minutes ..."
[1] "Guitar Coordinates Built ..."
> gc_txdb
GRanges object with 813 ranges and 5 metadata columns:
             seqnames                 ranges strand |       txid       pos
                <Rle>              <IRanges>  <Rle> |   <factor> <numeric>
  uc010ogz.1     chr1 [ 32670378,  32670428]      + | uc010ogz.1 0.1666667
  uc002tuo.3     chr2 [136288225, 136288275]      + | uc002tuo.3 0.1666667
  uc002tup.3     chr2 [136343064, 136343114]      + | uc002tup.3 0.1666667
  uc010fni.3     chr2 [136343064, 136343114]      + | uc010fni.3 0.1666667
  uc003eau.3     chr3 [113665890, 113665940]      + | uc003eau.3 0.1666667
         ...      ...                    ...    ... .        ...       ...
  uc003xno.1     chr8   [39874718, 39874768]      + | uc003xno.1 0.8333333
  uc001kbv.3    chr10   [81980221, 81980271]      + | uc001kbv.3 0.8333333
  uc002mtj.2    chr19   [12319195, 12319245]      + | uc002mtj.2 0.8333333
  uc002qsf.2    chr19   [58858974, 58859024]      - | uc002qsf.2 0.8333333
  uc002ydg.1    chr20   [61408177, 61408227]      + | uc002ydg.1 0.8333333
              interval     comp category
             <numeric> <factor> <factor>
  uc010ogz.1  333.3333    Front     mRNA
  uc002tuo.3  333.3333    Front     mRNA
  uc002tup.3  333.3333    Front     mRNA
  uc010fni.3  333.3333    Front     mRNA
  uc003eau.3  333.3333    Front     mRNA
         ...       ...      ...      ...
  uc003xno.1  333.3333     Back   lncRNA
  uc001kbv.3  333.3333     Back   lncRNA
  uc002mtj.2  333.3333     Back   lncRNA
  uc002qsf.2  333.3333     Back   lncRNA
  uc002ydg.1  333.3333     Back   lncRNA
  -------
  seqinfo: 93 sequences from an unspecified genome; no seqlengths
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>