Last data update: 2014.03.03
R: Arranging information from GRanges produced by readsamples()...
Arranging information from GRanges produced by readsamples() on
per position (nucleotide) basis.
Description
comp() takes as input euc_GR GRanges object produced by readsamples()
and produces Comp_GR GRanges.
Usage
comp(euc_GR, cutoff = 1, fasta_file)
Arguments
euc_GR
GRanges generated by readsamples() function
cutoff
specifies cutoff length, only inserts of this length or longer
will be used for processing (default: 1)
fasta_file
path to fasta file to which reads were mapped. Used to
report nucleotide at each position (not required)
Value
GRanges object with: 1) seqnames (RNAid), 2) start (position within
RNA), and metadata: 3) TCR (termination coverage ratio), 4) TC (termination
count), 5) Cover (coverage) and 6) PC (priming count) for each position
within each RNA.
Author(s)
Lukasz Jan Kielpinski, Nikos Sidiropoulos
References
Kielpinski, L.J., and Vinther, J. (2014). Massive
parallel-sequencing-based hydroxyl radical probing of RNA accessibility.
Nucleic Acids Res.
See Also
readsamples
, dtcr
,
slograt
, swinsor
, compdata
,
comp
Examples
dummy_euc_GR <- GRanges(seqnames="DummyRNA",
IRanges(start=round(runif(100)*100),
width=round(runif(100)*100+1)), strand="+",
EUC=round(runif(100)*100))
comp(dummy_euc_GR)
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(RNAprobR)
Loading required package: GenomicFeatures
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
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
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: plyr
Attaching package: 'plyr'
The following object is masked from 'package:IRanges':
desc
The following object is masked from 'package:S4Vectors':
rename
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RNAprobR/comp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: comp
> ### Title: Arranging information from GRanges produced by readsamples() on
> ### per position (nucleotide) basis.
> ### Aliases: comp
>
> ### ** Examples
>
> dummy_euc_GR <- GRanges(seqnames="DummyRNA",
+ IRanges(start=round(runif(100)*100),
+ width=round(runif(100)*100+1)), strand="+",
+ EUC=round(runif(100)*100))
> comp(dummy_euc_GR)
Fasta file not specified.
0 % of EUCs removed due to cutoff
GRanges object with 188 ranges and 5 metadata columns:
seqnames ranges strand | TC TCR Cover
<Rle> <IRanges> <Rle> | <numeric> <numeric> <numeric>
DummyRNA DummyRNA [1, 1] + | 97 1 97
DummyRNA DummyRNA [2, 2] + | 98 0.502564102564103 195
DummyRNA DummyRNA [3, 3] + | 0 0 195
DummyRNA DummyRNA [4, 4] + | 66 0.252873563218391 261
DummyRNA DummyRNA [5, 5] + | 75 0.223214285714286 336
... ... ... ... . ... ... ...
DummyRNA DummyRNA [184, 184] + | <NA> <NA> 117
DummyRNA DummyRNA [185, 185] + | <NA> <NA> 117
DummyRNA DummyRNA [186, 186] + | <NA> <NA> 17
DummyRNA DummyRNA [187, 187] + | <NA> <NA> 17
DummyRNA DummyRNA [188, 188] + | <NA> <NA> 17
PC nt
<numeric> <logical>
DummyRNA 0 <NA>
DummyRNA 0 <NA>
DummyRNA 0 <NA>
DummyRNA 0 <NA>
DummyRNA 98 <NA>
... ... ...
DummyRNA 0 <NA>
DummyRNA 100 <NA>
DummyRNA 0 <NA>
DummyRNA 0 <NA>
DummyRNA 17 <NA>
-------
seqinfo: 1 sequence from an unspecified genome; no seqlengths
>
>
>
>
>
> dev.off()
null device
1
>