Last data update: 2014.03.03
R: makeGuitarCoordsFromGRangesList
makeGuitarCoordsFromGRangesList R Documentation
makeGuitarCoordsFromGRangesList
Description
make Guitar Coordinates From a GRangesList object
Usage
makeGuitarCoordsFromGRangesList(comp, noBins = 100, collapseGene = FALSE, width = 51)
Arguments
comp
A GRangesList object
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.
collapseGene
Whether merge the Guitar coordinates from different transcripts. Default: FALSE.
width
The width of each check points. Default: 51
Value
Guitar coordinates will be generated, which provides a fast reference between genomic coordinates and the transcriptomic coordinates. By default, the returned value should be in GRanges format; if collapseGene = TRUE, GRangesList object will be returned.
Author(s)
Jia Meng <jia.meng@hotmail.com>
Examples
gr1 <- GRanges(seqnames = "chr2", ranges = IRanges(3000, 6000),
strand = "+", score = 5L, GC = 0.45)
gr2 <- GRanges(seqnames = c("chr1", "chr1"),
ranges = IRanges(c(7000,13000), width = 3),
strand = c("+"), score = 3:4, GC = c(0.3, 0.5))
grl <- GRangesList("gr1" = gr1, "gr2" = gr2)
tc <- makeGuitarCoordsFromGRangesList(grl, noBins = 5)
tc
mcols(tc)
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/makeGuitarCoordsFromGRangesList.Rd_%03d_medium.png", width=480, height=480)
> ### Name: makeGuitarCoordsFromGRangesList
> ### Title: makeGuitarCoordsFromGRangesList
> ### Aliases: makeGuitarCoordsFromGRangesList
> ### Keywords: Guitar GRanges GRangesList
>
> ### ** Examples
>
> gr1 <- GRanges(seqnames = "chr2", ranges = IRanges(3000, 6000),
+ strand = "+", score = 5L, GC = 0.45)
> gr2 <- GRanges(seqnames = c("chr1", "chr1"),
+ ranges = IRanges(c(7000,13000), width = 3),
+ strand = c("+"), score = 3:4, GC = c(0.3, 0.5))
> grl <- GRangesList("gr1" = gr1, "gr2" = gr2)
> tc <- makeGuitarCoordsFromGRangesList(grl, noBins = 5)
> tc
GRanges object with 10 ranges and 3 metadata columns:
seqnames ranges strand | txid pos interval
<Rle> <IRanges> <Rle> | <factor> <numeric> <numeric>
gr1 chr2 [ 3275, 3325] + | gr1 0.1 600.2
gr2 chr1 [ 6975, 7025] + | gr2 0.1 1.2
gr1 chr2 [ 3875, 3925] + | gr1 0.3 600.2
gr2 chr1 [ 6976, 7026] + | gr2 0.3 1.2
gr1 chr2 [ 4475, 4525] + | gr1 0.5 600.2
gr2 chr1 [ 6977, 7027] + | gr2 0.5 1.2
gr1 chr2 [ 5075, 5125] + | gr1 0.7 600.2
gr2 chr1 [12976, 13026] + | gr2 0.7 1.2
gr1 chr2 [ 5675, 5725] + | gr1 0.9 600.2
gr2 chr1 [12977, 13027] + | gr2 0.9 1.2
-------
seqinfo: 2 sequences from an unspecified genome; no seqlengths
> mcols(tc)
DataFrame with 10 rows and 3 columns
txid pos interval
<factor> <numeric> <numeric>
1 gr1 0.1 600.2
2 gr2 0.1 1.2
3 gr1 0.3 600.2
4 gr2 0.3 1.2
5 gr1 0.5 600.2
6 gr2 0.5 1.2
7 gr1 0.7 600.2
8 gr2 0.7 1.2
9 gr1 0.9 600.2
10 gr2 0.9 1.2
>
>
>
>
>
> dev.off()
null device
1
>