rgscores {GenomicScores} | R Documentation |
Function for randomly sampling genomic gscores from GScores
objects.
## S4 method for signature 'GScores,missing' rgscores(n, object, ...) ## S4 method for signature 'missing,GScores' rgscores(n, object, ...) ## S4 method for signature 'numeric,GScores' rgscores(n, object, ...) ## S4 method for signature 'integer,GScores' rgscores(n, object, ...)
n |
Number of scores to sample. |
object |
A |
... |
In the call to the
|
The method rgscores()
samples scores randomly from a GScores
object.
A GRanges
object with the sampled genomic positions and scores. When
scores.only=TRUE
then a numeric vector is returned with the sampled scores.
R. Castelo
Puigdevall, P. and Castelo, R. GenomicScores: seamless access to genomewide position-specific scores from R and Bioconductor. Bioinformatics, 18:3208-3210, 2018.
phastCons100way.UCSC.hg19
MafDb.1Kgenomes.phase1.hs37d5
## accessing genomic gscores from an annotation package if (require(phastCons100way.UCSC.hg19)) { library(GenomicRanges) phast <- phastCons100way.UCSC.hg19 set.seed(123) rgscores(10L, phast, ranges=c("chr22", "chrY")) } if (require(MafDb.1Kgenomes.phase1.hs37d5)) { mafdb <- MafDb.1Kgenomes.phase1.hs37d5 set.seed(123) rgscores(10L, mafdb, ranges=c("21", "22")) }