runNTP: Run nearest template prediction

Description Usage Arguments Value References Examples

View source: R/runNTP.R

Description

Using Nearest Template Prediction (NTP) based on predefined templates derived from current identified subtypes to assign potential subtype label on external cohort.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
runNTP(
  expr = NULL,
  templates = NULL,
  scaleFlag = TRUE,
  centerFlag = TRUE,
  nPerm = 1000,
  distance = "cosine",
  seed = 123456,
  verbose = TRUE,
  doPlot = FALSE,
  fig.path = getwd(),
  fig.name = "ntpheatmap",
  width = 5,
  height = 5
)

Arguments

expr

A numeric matrix with row features and sample columns; data is recommended to be z-scored.

templates

A data frame with at least two columns; class (coerced to factor) and probe (coerced to character).

scaleFlag

A logic value to indicate if the expression data should be further scaled. TRUE by default.

centerFlag

A logic value to indicate if the expression data should be further centered. TRUE by default.

nPerm

An integer value to indicate the permutations for p-value estimation.

distance

A string value to indicate the distance measurement. Allowed values contain c('cosine', 'pearson', 'spearman', 'kendall'); "cosine" by default.

seed

An integer value for p-value reproducibility.

verbose

A logic value to indicate whether console messages are to be displayed; TRUE by default.

doPlot

A logic value to indicate whether to produce prediction heatmap; FALSE by default.

fig.path

A string value to indicate the output path for storing the nearest template prediction heatmap.

fig.name

A string value to indicate the name of the nearest template prediction heatmap.

width

A numeric value to indicate the width of output figure.

height

A numeric value to indicate the height of output figure.

Value

A figure of predictive heatmap by NTP (.pdf) and a list with the following components:

ntp.res a data.frame storing the results of nearest template prediction (see ntp).

clust.res similar to 'clust.res' returned by 'getMOIC()' or 'get

mo.method a string value indicating the method used for prediction.

References

Hoshida, Y. (2010). Nearest Template Prediction: A Single-Sample-Based Flexible Class Prediction with Confidence Assessment. PLoS ONE 5, e15543.

Examples

1
# There is no example and please refer to vignette.

xlucpu/MOVICS documentation built on July 24, 2021, 9:23 p.m.