PADi: PADi

View source: R/app_PADi.R

PADiR Documentation

PADi

Description

PAD for individuals

Usage

PADi(
  X,
  geneid = "ensembl",
  matchmode = c("fix", "free")[1],
  cancer.type = "GC",
  version = c("20200110", "20220916")[1],
  numCores = 0,
  verbose = T
)

Arguments

X

a numeric RNA expression vector or matrix with gene names

geneid

type of gene id in X. One of 'symbol', 'entrez' and 'ensembl'.

matchmode

If your genes belong to ENSEMBL, SYMBOL or ENTREZ, you should set matchmode = 'fix', in which all genes would be aligned to ENSEMBL. 'matchmode = free' is a legacy feature, which means that you have to convert your genes into the same annotation type of the pre-trained GSClassifier model.

cancer.type

The type of cancer

version

model version

numCores

No. of CPU core

verbose

whether report messages

Details

The current software only supports parameters: cancer.type = "GC", version = "20200110". More cancer types or model version were under developing.

Value

A data frame containing personalized PAD subtypes

Author(s)

Weibin Huang<654751191@qq.com>

See Also

callEnsemble; parCallEnsemble.

Examples

# Package
if (!requireNamespace("GSClassifier", quietly = TRUE)){
  devtools::install_github("huangwb8/GSClassifier")
}
library(GSClassifier)

# Load test data of RNA-Seq expression
testData <- readRDS(system.file("extdata", "testData.rds", package = "GSClassifier"))[['Kim2018_3']]
dim(testData) # 19118 3

# Data formats (Different data but the same function and usage)

# 1.Mutiple data
X = testData

# 2.Single data
# X <- testData[,1]; names(X) <- rownames(testData)
# X <- as.matrix(testData[,1]); rownames(X) <- rownames(testData)

## Method1: use a general function called 'callEnsemble'
res_padi <- callEnsemble(
  X = X,
  ens = NULL,
  geneAnnotation = NULL,
  geneSet = NULL,
  scaller = NULL,
  geneid = "ensembl",
  matchmode = 'fix',
  subtype = "PAD.train_20200110",
  verbose = F
)

## Method2: use a specific function called 'PADi'
res_padi <- PADi(X = X, verbose = F)

## Method3: Parallel strategy for lots of samples (empirically >50) to save #' time. Not Run for small cohorts.
# res_padi <- parCallEnsemble(
#   X = X,
#   ens = NULL,
#   geneAnnotation = NULL,
#   geneSet = NULL,
#   scaller = NULL,
#   geneid = 'ensembl',
#   matchmode = 'fix',
#   subtype = 'PAD.train_20200110',
#   verbose = T,
#   numCores = 2)
# res_padi <- PADi(X = X, verbose = F, numCores = 4)

huangwb8/GSClassifier documentation built on July 12, 2024, 5:10 p.m.