annotateRanges {FRASER} | R Documentation

## Annotates the given FraserDataSet with the HGNC symbol with biomaRt

### Description

Annotates the given FraserDataSet with the HGNC symbol with biomaRt

### Usage

    annotateRanges(
      fds,
      feature = "hgnc_symbol",
      featureName = feature,
      biotype = list("protein_coding"),
      ensembl = NULL,
      GRCh = 37
    )

    annotateRangesWithTxDb(
      fds,
      feature = "SYMBOL",
      featureName = "hgnc_symbol",
      keytype = "ENTREZID",
      txdb = NULL,
      orgDb = NULL
    )

### Arguments

`fds` | FraserDataSet
`feature` | Defines which feature (default is HGNC symbol) should be annotated.
`featureName` | Name of the feature in the FraserDataSet mcols.
`biotype` | The biotype.
`ensembl` | The ensembl that should be used. If NULL, the default one is used (hsapiens_gene_ensembl, GRCh37).
`GRCh` | GRCh version to connect to. If this is NULL, then the current GRCh38 is used. Otherwise, this can only be 37 (default) at the moment (see `useEnsembl`).
`keytype` | The type of gene IDs in the `TxDb` object (see AnnotationDbi::keytypes(orgDb) for a list of available ID types).
`txdb` | A `TxDb` object. If this is NULL, then the default one is used, currently this is `TxDb.Hsapiens.UCSC.hg19.knownGene`.
`orgDb` | An `orgDb` object If this is NULL, then the default one is used, currently this is `org.Hs.eg.db`.

### Value

FraserDataSet

### Examples

    fds <- createTestFraserDataSet()

    ## Not run:
    ### Two ways to annotage ranges with gene names:
    # either using biomart:
    fds <- annotateRanges(fds, GRCh=NULL)
    rowRanges(fds, type="psi5")[,"hgnc_symbol"]

    # or with a TxDb object
    require(TxDb.Hsapiens.UCSC.hg19.knownGene)
    txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
    require(org.Hs.eg.db)
    orgDb <- org.Hs.eg.db
    fds <- annotateRangesWithTxDb(fds, txdb=txdb, orgDb=orgDb)

    rowRanges(fds, type="psi5")[,"hgnc_symbol"]

    ## End(Not run)

[Package FRASER version 1.0.2 Index]