Description Usage Arguments Value Author(s) Examples
Fetching Granges from various data source, currently supported objects are TxDb, EnsDb, GAlignments and BamFile.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## S4 method for signature 'TxDb'
crunch(obj, which, columns = c("tx_id", "tx_name","gene_id"),
type = c("all", "reduce"), truncate.gaps = FALSE,
truncate.fun = NULL, ratio = 0.0025)
## S4 method for signature 'EnsDb'
crunch(obj, which, columns = c("tx_id", "gene_name","gene_id"),
type = c("all", "reduce"), truncate.gaps = FALSE,
truncate.fun = NULL, ratio = 0.0025)
## S4 method for signature 'GAlignments'
crunch(obj, which, truncate.gaps = FALSE,
truncate.fun = NULL, ratio = 0.0025)
## S4 method for signature 'BamFile'
crunch(obj, which, ..., type = c("gapped.pair", "raw", "all"),
truncate.gaps = FALSE, truncate.fun = NULL, ratio = 0.0025)
|
obj |
supported objects are |
which |
GRanges object. For TxDb object, could aslo be a list.
For |
columns |
columns to include in the output. |
type |
default 'all' is to show the full model, 'reduce' is to show a single model. |
truncate.gaps |
logical value, default |
truncate.fun |
shrinkage function. |
ratio |
numeric value, shrinking ratio. |
... |
arguments passed to function |
GRanges object.
Tengfei Yin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(biovizBase)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
data(genesymbol, package = "biovizBase")
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
obj <- txdb
temp <- crunch(txdb, which = genesymbol["BRCA1"], type = "all")
temp <- crunch(txdb, which = genesymbol["BRCA1"], type = "reduce")
## Fetching data from a EnsDb object.
library(EnsDb.Hsapiens.v75)
edb <- EnsDb.Hsapiens.v75
gr <- genesymbol["BRCA1"]
seqlevels(gr) <- sub(seqlevels(gr), pattern="chr", replacement="")
temp <- crunch(edb, which = gr)
## Alternatively, use the GenenameFilter from the AnnotationFilter package:
temp <- crunch(edb, which = GenenameFilter("BRCA1"))
## Or a filter expression
temp <- crunch(edb, which = ~ genename == "BRCA1")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.