rgscores | 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.hg38
MafDb.1Kgenomes.phase1.hs37d5
## accessing genomic gscores from an annotation package
if (require(phastCons100way.UCSC.hg38)) {
library(GenomicRanges)
phast <- phastCons100way.UCSC.hg38
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"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.