Learn R Programming

hpar (version 1.14.2)

getHpa: 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
The data set to query. One of "NormalTissue", "Rna", "SubcellularLoc" (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 dataframe) or details (to open the id's HPA webpage).

Value

  • A dataframe 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.

Examples

Run this code
id <- "ENSG00000000003"
## Define 'hpadata' data manually
getHpa(id, hpadata = "Subcell")
head(getHpa(id, hpadata = "NormalTissue"), )
head(getHpa(id, hpadata = "Rna"))
## Default 'hpadata' data
head(getHpa(id)) ## default 'hpadata' is "NormalTissue"
## Sets default to "SubcellularLoc"
setHparOptions(hpadata = "SubcellularLoc")
getHpa(id)      ## now uses "SubcellularLoc"
setHparOptions() ## reset to "NormalTissue"
head(getHpa(id))
## multiple ids
getHpa(id = c("ENSG00000000003", "ENSG00000000005"),
       hpadata = "SubcellularLoc")
## opens a browser with http://www.proteinatlas.org/ENSG00000163435
getHpa("ENSG00000163435",
       type = "details")

Run the code above in your browser using DataLab