Get a data frame of intron counts per gene
Arguments
- txdb
A
TxDb
object with transcript annotations. See details below for examples on how to createTxDb
objects from different kinds of input.
Value
A data frame with intron counts per gene, with variables:
- gene
Character with gene IDs.
- introns
Numeric with number of introns per gene.
Details
The family of functions makeTxDbFrom*
from
the txdbmaker package can be used to create TxDb
objects
from a variety of input data types. You can create TxDb
objects
from e.g., GRanges
objects (makeTxDbFromGRanges()
),
GFF files (makeTxDbFromGFF()
),
an Ensembl database (makeTxDbFromEnsembl
), and
a Biomart database (makeTxDbFromBiomart
).
Examples
data(yeast_annot)
# Create TxDb object from GRanges
library(txdbmaker)
txdb <- txdbmaker::makeTxDbFromGRanges(yeast_annot[[1]])
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
#> Warning: Direct call of 'as.data.frame.factor()' is deprecated. Use 'as.data.frame.vector()' or 'as.data.frame()' instead
# Get intron counts
intron_counts <- get_intron_counts(txdb)