predict_age_fromse: Calculate RNA age using SummarizedExperiment

Description Usage Arguments Value Examples

View source: R/predict_age_fromse.R

Description

This function takes SummarizedExperiment object as input and calculates RNA age.

Usage

1
2
3
4
5
6
7
8
9
predict_age_fromse(
  se,
  tissue,
  exprtype = c("FPKM", "counts"),
  idtype = c("SYMBOL", "ENSEMBL", "ENTREZID", "REFSEQ"),
  stype = c("all", "caucasian"),
  signature = NULL,
  maxp = NULL
)

Arguments

se

a SummarizedExperiment object. The assays(se) should contain gene expression data. The name of assays(se) should be either "FPKM" or "counts". Use 'exprtype' argument to specify the type of gene expression data provided. Users are able to provide the chronological age of samples using colData(se). This is optional. If provided, the column name for chronological age in colData(se) should be "age". If some samples' chronological age are not available, users are expected to set the chronological age in colData(se) to NA. If chronological age is not provided, the age acceleration residual will not be calculated. See package vignette for the definition of age acceleration residual. In addition, users are able to provide their own gene length using rowData(se). This is also optional. If using 'exprtype = "FPKM"', the provided gene length will be ignored. If provided, the column name for gene length in rowData(se) should be "bp_length". The function will convert raw count to FPKM by the user-supplied gene length. Otherwise, gene length is obtained from the internal database. See below for an example of se object.

tissue

a string indicate which tissue the gene expression data is obtained from. Users are expected to provide one of the following tissues. If the tissue argument is not provide or the provided tissue is not in this list, then the age predictor trained on all tissues will be used to calculate RNA age.

  • adipose_tissue

  • adrenal_gland

  • blood

  • blood_vessel

  • brain

  • breast

  • colon

  • esophagus

  • heart

  • liver

  • lung

  • muscle

  • nerve

  • ovary

  • pancreas

  • pituitary

  • prostate

  • salivary_gland

  • skin

  • small_intestine

  • spleen

  • stomach

  • testis

  • thyroid

  • uterus

  • vagina

exprtype

either "counts" or "FPKM". For RPKM data, please use 'exprtype' = "FPKM".

idtype

a string which indicates the gene id type in 'exprdata'. It should be one of "SYMBOL", "ENSEMBL", "ENTREZID" or "REFSEQ". Default is "SYMBOL".

stype

a string which specifies which version of pre-trained calculators to be used. It should be either "all" or "Caucasian". "all" means samples from all races (American Indian/Alaska Native, Asian, Black/African American, and Caucasian) are used to obtain the pre-trained calculator. "Caucasian" means only the Caucasian samples are used to build up the pre-trained calculator.

signature

a string which indicates the age signature to use when calculating RNA age. This argument is not required.
In the case that this argument is not provided, if 'tissue' argument is also provided and the tissue is in the list above, the tissue specific age signature given by our DESeq2 analysis result on GTEx data will be used. Otherwise, the across tissue signature "GTExAge" will be used.
In the case that this argument is provided, it should be one of the following signatures. A detailed description of the meaning of these signatures is given in the package vignette.

  • DESeq2

  • Pearson

  • Dev

  • deMagalhaes

  • GenAge

  • GTExAge

  • Peters

  • all

maxp

the maxp argument used in impute.knn function. This is optional.

Value

a data frame contains RNA age.

Examples

1
2
3
4
5
6
library(SummarizedExperiment)
data(fpkmExample)
colData = data.frame(age = c(40, 50))
se = SummarizedExperiment(assays=list(FPKM=fpkm), 
colData=colData)
res = predict_age_fromse(se = se, exprtype = "FPKM")

reese3928/RNAAgeCalc documentation built on Sept. 25, 2020, 1:01 a.m.