getHpa: HPA gene query

Description Usage Arguments Value Author(s) Examples

View source: R/hpa.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

hpar documentation built on Nov. 8, 2020, 8:32 p.m.