Make a TxToGene object
Usage
makeTxToGeneFromEnsembl(
organism,
genomeBuild = NULL,
release = NULL,
ignoreVersion = FALSE
)
makeTxToGeneFromEnsDb(object, ignoreVersion = FALSE)
makeTxToGeneFromGff(file, ignoreVersion = FALSE)
Arguments
- organism
character(1)
. Full Latin organism name (e.g."Homo sapiens"
).- genomeBuild
character(1)
. Ensembl genome build assembly name (e.g."GRCh38"
). If setNULL
, defaults to the most recent build available. Note: don't pass in UCSC build IDs (e.g."hg38"
).- release
integer(1)
. Ensembl release version (e.g.100
). We recommend setting this value if possible, for improved reproducibility. When left unset, the latest release available via AnnotationHub/ensembldb is used. Note that the latest version available can vary, depending on the versions of AnnotationHub and ensembldb in use.- ignoreVersion
logical(1)
. Ignore identifier (e.g. transcript, gene) versions. When applicable, the identifier containing version numbers will be stored intxIdVersion
andgeneIdVersion
, and the variants without versions will be stored intxId
,txIdNoVersion
,geneId
, andgeneIdNoVersion
.- object
Object.
- file
character(1)
. File path.
Examples
## makeTxToGeneFromEnsembl ====
x <- makeTxToGeneFromEnsembl(organism = "Homo sapiens")
#> → Making <GRanges> from Ensembl.
#> → Getting <EnsDb> from AnnotationHub 3.10.0 (2023-10-20).
#> ℹ "AH113665": Ensembl 110 EnsDb for Homo sapiens.
#> → Making <GRanges> from <EnsDb>.
#> Organism: Homo sapiens
#> Genome build: GRCh38
#> Release: 110
#> Level: transcripts
#> → Defining names by `txId` column in `mcols()`.
print(x)
#> TxToGene with 278545 rows and 2 columns
#> txId geneId
#> <character> <character>
#> ENST00000000233.10 ENST00000000233.10 ENSG00000004059.11
#> ENST00000000412.8 ENST00000000412.8 ENSG00000003056.8
#> ENST00000000442.11 ENST00000000442.11 ENSG00000173153.17
#> ENST00000001008.6 ENST00000001008.6 ENSG00000004478.8
#> ENST00000001146.7 ENST00000001146.7 ENSG00000003137.9
#> ... ... ...
#> LRG_998t2.1 LRG_998t2.1 LRG_998.1
#> LRG_999t1.1 LRG_999t1.1 LRG_999.1
#> LRG_999t2.1 LRG_999t2.1 LRG_999.1
#> LRG_99t1.1 LRG_99t1.1 LRG_99.1
#> LRG_9t1.1 LRG_9t1.1 LRG_9.1
## makeTxToGeneFromEnsDb ====
## > if (goalie::isInstalled("EnsDb.Hsapiens.v75")) {
## > x <- makeTxToGeneFromEnsDb(object = "EnsDb.Hsapiens.v75")
## > print(x)
## > }
## makeTxToGeneFromGff ====
## > file <- AcidBase::pasteUrl(
## > "ftp.ensembl.org",
## > "pub",
## > "release-102",
## > "gtf",
## > "homo_sapiens",
## > "Homo_sapiens.GRCh38.102.gtf.gz",
## > protocol = "ftp"
## > )
## > x <- makeTxToGeneFromGff(file = file)
## > print(x)