Make a Tx2Gene object

makeTx2GeneFromEnsembl(organism, genomeBuild = NULL, release = NULL)

makeTx2GeneFromEnsDb(object)

makeTx2GeneFromGFF(file)

Arguments

organism

character(1). Full Latin organism name (e.g. "Homo sapiens").

genomeBuild

character(1). Ensembl genome build assembly name (e.g. "GRCh38"). If set NULL, 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. 90). 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.

object

Object.

file

character(1). File path.

Value

Tx2Gene.

Note

Updated 2019-07-28.

GFF/GTF file

Remote URLs and compressed files are supported.

Examples

## makeTx2GeneFromEnsembl ==== x <- makeTx2GeneFromEnsembl(organism = "Homo sapiens")
#> Making GRanges from Ensembl.
#> Matching EnsDb from AnnotationHub 2.16.0 (2019-05-02).
#> AH73986: Ensembl 79 EnsDb for Homo sapiens #> Run this code to download EnsDb manually: #> > library(AnnotationHub) #> > ah <- AnnotationHub() #> > edb <- ah[["AH73986"]]
#> Making GRanges from EnsDb object.
#> - Organism: Homo sapiens #> - Genome Build: GRCh38 #> - Ensembl Release: 79 #> - Level: transcripts
#> Merging gene-level annotations: gene_name, gene_biotype, seq_coord_system, description, gene_id_version, symbol, entrezid
#> Defining broadClass using: geneName, seqnames, transcriptBiotype
#> Arranging by transcriptID.
#> 14 invalid names: LRG_321t1-1, LRG_321t1-2, LRG_321t2-1, LRG_321t2-2, LRG_321t3-1, LRG_321t3-2, LRG_321t4-1, LRG_321t4-2, LRG_321t5-1, LRG_321t5-2, LRG_321t6-1, LRG_321t6-2, LRG_321t7-1, LRG_321t7-2
#> 214285 transcripts detected.
#> Tx2Gene with 214285 rows and 2 columns #> transcriptID geneID #> <character> <character> #> ENST00000000233 ENST00000000233 ENSG00000004059 #> ENST00000000412 ENST00000000412 ENSG00000003056 #> ENST00000000442 ENST00000000442 ENSG00000173153 #> ENST00000001008 ENST00000001008 ENSG00000004478 #> ENST00000001146 ENST00000001146 ENSG00000003137 #> ... ... ... #> LRG_94t1 LRG_94t1 LRG_94 #> LRG_96t1 LRG_96t1 LRG_96 #> LRG_97t1 LRG_97t1 LRG_97 #> LRG_98t1 LRG_98t1 LRG_98 #> LRG_99t1 LRG_99t1 LRG_99
## makeTx2GeneFromEnsDb ==== x <- makeTx2GeneFromEnsDb("EnsDb.Hsapiens.v75")
#> Making GRanges from EnsDb object.
#> - Organism: Homo sapiens #> - Genome Build: GRCh37 #> - Ensembl Release: 75 #> - Level: transcripts
#> Merging gene-level annotations: gene_name, gene_biotype, seq_coord_system, symbol, entrezid
#> Defining broadClass using: geneName, seqnames, transcriptBiotype
#> Arranging by transcriptID.
#> 215647 transcripts detected.
#> Tx2Gene with 215647 rows and 2 columns #> transcriptID geneID #> <character> <character> #> ENST00000000233 ENST00000000233 ENSG00000004059 #> ENST00000000412 ENST00000000412 ENSG00000003056 #> ENST00000000442 ENST00000000442 ENSG00000173153 #> ENST00000001008 ENST00000001008 ENSG00000004478 #> ENST00000001146 ENST00000001146 ENSG00000003137 #> ... ... ... #> LRG_94t1 LRG_94t1 LRG_94 #> LRG_96t1 LRG_96t1 LRG_96 #> LRG_97t1 LRG_97t1 LRG_97 #> LRG_98t1 LRG_98t1 LRG_98 #> LRG_99t1 LRG_99t1 LRG_99
## makeTx2GeneFromGFF ==== ## GTF file <- file.path(basejumpTestsURL, "example.gtf") x <- makeTx2GeneFromGFF(file)
#> Making GRanges from GFF file.
#> Importing example.gtf using rtracklayer::import().
#> Ensembl GTF detected.
#> Defining broadClass using: geneName, seqnames, transcriptBiotype
#> Arranging by transcriptID.
#> 20 transcripts detected.
#> Tx2Gene with 20 rows and 2 columns #> transcriptID geneID #> <character> <character> #> ENSMUST00000070533 ENSMUST00000070533 ENSMUSG00000051951 #> ENSMUST00000082908 ENSMUST00000082908 ENSMUSG00000064842 #> ENSMUST00000157708 ENSMUST00000157708 ENSMUSG00000088333 #> ENSMUST00000159265 ENSMUST00000159265 ENSMUSG00000051951 #> ENSMUST00000161581 ENSMUST00000161581 ENSMUSG00000089699 #> ... ... ... #> ENSMUST00000194454 ENSMUST00000194454 ENSMUSG00000102592 #> ENSMUST00000194643 ENSMUST00000194643 ENSMUSG00000102343 #> ENSMUST00000195166 ENSMUST00000195166 ENSMUSG00000103161 #> ENSMUST00000195335 ENSMUST00000195335 ENSMUSG00000103377 #> ENSMUST00000208660 ENSMUST00000208660 ENSMUSG00000025900
## GFF3 file <- file.path(basejumpTestsURL, "example.gff3") x <- makeTx2GeneFromGFF(file)
#> Making GRanges from GFF file.
#> Importing example.gff3 using rtracklayer::import().
#> Ensembl GFF3 detected.
#> Merging gene-level annotations: logic_name, description, havana_gene, gene_name, gene_biotype
#> Defining broadClass using: geneName, seqnames, transcriptBiotype
#> Arranging by transcriptID.
#> 26 transcripts detected.
#> Tx2Gene with 26 rows and 2 columns #> transcriptID geneID #> <character> <character> #> ENSMUST00000027032 ENSMUST00000027032 ENSMUSG00000025900 #> ENSMUST00000027035 ENSMUST00000027035 ENSMUSG00000025902 #> ENSMUST00000070533 ENSMUST00000070533 ENSMUSG00000051951 #> ENSMUST00000082908 ENSMUST00000082908 ENSMUSG00000064842 #> ENSMUST00000157708 ENSMUST00000157708 ENSMUSG00000088333 #> ... ... ... #> ENSMUST00000195166 ENSMUST00000195166 ENSMUSG00000103161 #> ENSMUST00000195335 ENSMUST00000195335 ENSMUSG00000103377 #> ENSMUST00000195384 ENSMUST00000195384 ENSMUSG00000102948 #> ENSMUST00000208660 ENSMUST00000208660 ENSMUSG00000025900 #> ENSMUST00000208793 ENSMUST00000208793 ENSMUSG00000025900