hpaListParam: Subset downloaded data

hpaSubsetR Documentation

Subset downloaded data

Description

hpaSubset() subsets data by gene name, tissue, cell type, cancer and/or cell line. The input is the list object generated by hpaDownload() or as the output of another hpaSubset(). Use hpaListParam() to see the list of available parameters for a specific list object. This is a convenient wrapper for 'lapply/filter' and works on any table which contain 'gene', 'tissue', 'cell_type', 'cancer', and 'cell_line' columns.

hpaListParam() list available variables in downloaded data that can be used as parameters to subset the data via hpaSubset(). This function work with the data object generated by hpaDownload() or a previous call of hpaSubset(). This is a convenient wrapper for 'lapply/unique' and works on any table which contain 'tissue', 'cell_type', 'cancer', and 'cell_line' columns.

Usage

hpaSubset(
  data = NULL,
  targetGene = NULL,
  targetTissue = NULL,
  targetCellType = NULL,
  targetCancer = NULL,
  targetCellLine = NULL
)

hpaListParam(data = NULL)

Arguments

data

Input the list object generated by hpaDownload() or hpaSubset()

targetGene

Vector of strings of HGNC gene symbols. It will be used to subset every dataset in the list object. You can also mix HGNC gene symbols and ensemnbl ids (start with ENSG) and they will be converted to HGNC gene symbols.

targetTissue

Vector of strings of normal tissues. Will be used to subset the normal_tissue and rna_tissue dataset.

targetCellType

Vector of strings of normal cell types. Will be used to subset the normal_tissue dataset.

targetCancer

Vector of strings of cancer types. Will be used to subset the pathology dataset.

targetCellLine

Vector of strings of cell lines. Will be used to subset the rna_cell_line dataset.

Value

hpaSubset will return a list of tibbles as the result of subsetting, depending on the input data.

The output of hpaListParam() is a list of vectors containing all subset parameter for the downloaded data.

See Also

Other downloadable datasets functions: hpaDownload(), hpaExport()

Examples

  downloadedData <- hpaDownload(downloadList='histology', version='example')
  geneList <- c('TP53', 'EGFR')
  tissueList <- c('breast', 'cerebellum', 'skin 1')
  cancerList <- c('breast cancer', 'glioma', 'melanoma')

  subsetData <- hpaSubset(data=downloadedData,
                          targetGene=geneList,
                          targetTissue=tissueList,
                          targetCancer=cancerList)

  downloadedData <- hpaDownload(downloadList='histology', version='example')
  params <- hpaListParam(data=downloadedData)
  params$normal_tissue


anhtr/HPAanalyze documentation built on June 3, 2023, 2:19 a.m.