getHpa {hpar} | R Documentation

## HPA gene query

### Description

Queries one if the HPA data sets with the `id` Ensembl gene identifier. The data set to be used is defined by the `hpadata` argument.

### Usage

    getHpa(id, hpadata = NULL, type = c("data", "details"))

### Arguments

`id` | A Ensembl gene identifier.
`hpadata` | A `character` with the data set to query. One of available `hpar` datasets, available by calling `allHparData` (or any unambiguous prefix), or `NULL` (default). In the latter case, the default option is used. See `setHparOptions` and `getHparOptions` for more details.
`type` | A `character` defining what type data to return. One of `data` (default, for the data as `data.frame`) or `details` (to open the id's HPA webpage).

### Value

A `data.frame` with the information corresponding to the respective `id` genes. If `type` is `details`, then the `dataframe` is returned invisibly and a web page is opened with `browseURL`.

### Author(s)

Laurent Gatto

### Examples

    id <- "ENSG00000000003"
    ## Define 'hpadata' data manually
    getHpa(id, hpadata = "hpaSubcellularLoc")
    head(getHpa(id, hpadata = "hpaNormalTissue"), )
    head(getHpa(id, hpadata = "rnaGeneTissue"))
    head(getHpa(id, hpadata = "rnaGeneCellLine"))
    head(getHpa(id, hpadata = "hpaCancer"))
    ## Sets default to "SubcellularLoc"
    setHparOptions(hpadata = "hpaSubcellularLoc")
    getHpa(id)       ## now uses "hpaSubcellularLoc"
    setHparOptions() ## reset to "hpaNormalTissue"
    head(getHpa(id))
    ## multiple ids
    getHpa(id = c("ENSG00000000003", "ENSG00000000005"),
           hpadata = "hpaSubcellularLoc")
    ## Not run:
    ## opens a browser with http://www.proteinatlas.org/ENSG00000163435
    getHpa("ENSG00000163435", type = "details")

    ## End(Not run)

[Package hpar version 1.26.0 Index]