Last data update: 2014.03.03

R: HPA gene query
getHpaR 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

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.

Author(s)

Laurent Gatto

Examples

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")
## Not run: 
## opens a browser with http://www.proteinatlas.org/ENSG00000163435
getHpa("ENSG00000163435",
       type = "details")

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(hpar)
This is hpar 1.14.2. For more information, 
please type '?hpar' or 'vignette('hpar')'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/hpar/getHpa.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getHpa
> ### Title: HPA gene query
> ### Aliases: getHpa
> 
> ### ** Examples
> 
> id <- "ENSG00000000003"
> ## Define 'hpadata' data manually
> getHpa(id, hpadata = "Subcell")
             Gene Main.location Other.location Expression.type Reliability
1 ENSG00000000003     Cytoplasm                            APE   Uncertain
> head(getHpa(id, hpadata = "NormalTissue"), )
             Gene        Tissue           Cell.type        Level
1 ENSG00000000003 adrenal gland     glandular cells Not detected
2 ENSG00000000003      appendix     glandular cells       Medium
3 ENSG00000000003      appendix     lymphoid tissue Not detected
4 ENSG00000000003   bone marrow hematopoietic cells Not detected
5 ENSG00000000003        breast          adipocytes Not detected
6 ENSG00000000003        breast     glandular cells         High
  Expression.type Reliability
1             APE  Supportive
2             APE  Supportive
3             APE  Supportive
4             APE  Supportive
5             APE  Supportive
6             APE  Supportive
> head(getHpa(id, hpadata = "Rna"))
             Gene  Sample Value Unit Abundance
1 ENSG00000000003   A-431  21.3 FPKM    Medium
2 ENSG00000000003    A549  32.5 FPKM    Medium
3 ENSG00000000003  AN3-CA  38.2 FPKM    Medium
4 ENSG00000000003    BEWO  31.4 FPKM    Medium
5 ENSG00000000003  CACO-2  63.9 FPKM      High
6 ENSG00000000003 CAPAN-2  34.2 FPKM    Medium
> ## Default 'hpadata' data
> head(getHpa(id)) ## default 'hpadata' is "NormalTissue"
             Gene        Tissue           Cell.type        Level
1 ENSG00000000003 adrenal gland     glandular cells Not detected
2 ENSG00000000003      appendix     glandular cells       Medium
3 ENSG00000000003      appendix     lymphoid tissue Not detected
4 ENSG00000000003   bone marrow hematopoietic cells Not detected
5 ENSG00000000003        breast          adipocytes Not detected
6 ENSG00000000003        breast     glandular cells         High
  Expression.type Reliability
1             APE  Supportive
2             APE  Supportive
3             APE  Supportive
4             APE  Supportive
5             APE  Supportive
6             APE  Supportive
> ## Sets default to "SubcellularLoc"
> setHparOptions(hpadata = "SubcellularLoc")
> getHpa(id)      ## now uses "SubcellularLoc"
             Gene Main.location Other.location Expression.type Reliability
1 ENSG00000000003     Cytoplasm                            APE   Uncertain
> setHparOptions() ## reset to "NormalTissue"
> head(getHpa(id))
             Gene        Tissue           Cell.type        Level
1 ENSG00000000003 adrenal gland     glandular cells Not detected
2 ENSG00000000003      appendix     glandular cells       Medium
3 ENSG00000000003      appendix     lymphoid tissue Not detected
4 ENSG00000000003   bone marrow hematopoietic cells Not detected
5 ENSG00000000003        breast          adipocytes Not detected
6 ENSG00000000003        breast     glandular cells         High
  Expression.type Reliability
1             APE  Supportive
2             APE  Supportive
3             APE  Supportive
4             APE  Supportive
5             APE  Supportive
6             APE  Supportive
> ## multiple ids
> getHpa(id = c("ENSG00000000003", "ENSG00000000005"),
+        hpadata = "SubcellularLoc")
             Gene Main.location Other.location Expression.type Reliability
1 ENSG00000000003     Cytoplasm                            APE   Uncertain
> ## Not run: 
> ##D ## opens a browser with http://www.proteinatlas.org/ENSG00000163435
> ##D getHpa("ENSG00000163435",
> ##D        type = "details")
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>