makeGene2Symbol: Make a Gene2Symbol object

Description Usage Arguments Value Functions GFF/GTF file Note Examples

Description

Make a Gene2Symbol object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
makeGene2SymbolFromEnsembl(
  organism,
  genomeBuild = NULL,
  release = NULL,
  ignoreVersion = TRUE,
  format = c("makeUnique", "1:1", "unmodified")
)

makeGene2SymbolFromEnsDb(
  object,
  ignoreVersion = TRUE,
  format = c("makeUnique", "1:1", "unmodified")
)

makeGene2SymbolFromGFF(
  file,
  ignoreVersion = TRUE,
  format = c("makeUnique", "1:1", "unmodified")
)

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.

ignoreVersion

logical(1). Ignore identifier (e.g. transcript, gene) versions. When applicable, the identifier containing version numbers will be stored in txIdVersion and geneIdVersion, and the variants without versions will be stored in txId, txIdNoVersion, geneId, and geneIdNoVersion.

format

character(1). Formatting method to apply:

  • "makeUnique": Recommended. Apply make.unique to the geneName column. Gene names are made unique, while the identifiers remain unmodified. NA gene names will be renamed to "unannotated".

  • "1:1": For gene names that map to multiple gene identifiers, select only the first annotated gene identifier. Incomplete elements with NA gene name will be removed will be removed with an internal complete.cases call.

  • "unmodified": Return geneId and geneName columns unmodified, in long format. Incomplete elements with NA gene name will be removed with an internal complete.cases call.

object

Object.

file

character(1). File path.

Value

Gene2Symbol.

Functions

GFF/GTF file

Remote URLs and compressed files are supported.

Note

Updated 2021-08-03.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## makeGene2SymbolFromEnsembl ====
x <- makeGene2SymbolFromEnsembl(
    organism = "Homo sapiens",
    ignoreVersion = FALSE
)
print(x)

## makeTx2GeneFromEnsDb ====
if ("EnsDb.Hsapiens.v75" %in% rownames(installed.packages())) {
    x <- makeGene2SymbolFromEnsDb("EnsDb.Hsapiens.v75")
    print(x)
}

## makeGene2SymbolFromGFF ====
file <- pasteURL(
    "ftp.ensembl.org",
    "pub",
    "release-102",
    "gtf",
    "homo_sapiens",
    "Homo_sapiens.GRCh38.102.gtf.gz",
    protocol = "ftp"
)
x <- makeGene2SymbolFromGFF(
    file = file,
    ignoreVersion = FALSE
)
print(x)

acidgenomics/AcidGenomes documentation built on Sept. 16, 2021, 7:30 p.m.