Make tx2gene data.frame from a TxDb object and an org.*.eg.db annotation package.
Arguments
- txdb
TxDbobject, such as those provided by Bioconductor packages likeTxDb.Mmusculus.UCSC.mm10.knownGeneorTxDb.Hsapiens.UCSC.hg38.knownGene.- ann_lib
characterstring naming an installed Bioconductor organism annotation package (e.g."org.Mm.eg.db"for mouse or"org.Hs.eg.db"for human). Must match the organism used intxdb. No validation of organism concordance is performed.- verbose
logicalwhether to print verbose output during processing.- ...
additional arguments are ignored.
Value
data.frame with colnames "transcript_id", "gene_id",
"gene_name". gene_id contains the ENTREZID values from the TxDb,
and gene_name contains the resolved gene SYMBOL.
Details
This function converts a Bioconductor TxDb annotation package (e.g.
TxDb.Mmusculus.UCSC.mm10.knownGene) into the three-column data.frame
expected by splicejam: transcript_id, gene_id, gene_name.
Gene IDs in UCSC-style TxDb objects are NCBI Entrez IDs (ENTREZID).
These are mapped to gene symbols (SYMBOL) using
genejam::freshenGenes() with the supplied ann_lib. When an ENTREZID
cannot be resolved to a SYMBOL, the original ENTREZID is retained as the
gene_name (controlled by empty_rule="original" in freshenGenes()).
Exception: Some TxDb packages with suffix 'ensDb' use EnsEMBL
gene identifier, in the form 'ENSG00000001' or 'ENSMUSG00000001'.
In this case, genejam::freshenGenes() will be used to query by
the 'ENSEMBL2EG' annotation data, and will fallback to use the
EnsEMBL gene_id when not found.
See also
makeTx2geneFromGtf() for the GTF-based equivalent,
splicejamDataFromTxDb() for the higher-level workflow that calls this
function.
Other GTF functions:
describeGtfAttrNames(),
getGtfAttrs(),
makeTx2geneFromGtf(),
readGtf()