a b/man/runNTP.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/runNTP.R
3
\name{runNTP}
4
\alias{runNTP}
5
\title{Run nearest template prediction}
6
\usage{
7
runNTP(
8
  expr = NULL,
9
  templates = NULL,
10
  scaleFlag = TRUE,
11
  centerFlag = TRUE,
12
  nPerm = 1000,
13
  distance = "cosine",
14
  seed = 123456,
15
  verbose = TRUE,
16
  doPlot = FALSE,
17
  fig.path = getwd(),
18
  fig.name = "ntpheatmap",
19
  width = 5,
20
  height = 5
21
)
22
}
23
\arguments{
24
\item{expr}{A numeric matrix with row features and sample columns; data is recommended to be z-scored.}
25
26
\item{templates}{A data frame with at least two columns; class (coerced to factor) and probe (coerced to character).}
27
28
\item{scaleFlag}{A logic value to indicate if the expression data should be further scaled. TRUE by default.}
29
30
\item{centerFlag}{A logic value to indicate if the expression data should be further centered. TRUE by default.}
31
32
\item{nPerm}{An integer value to indicate the permutations for p-value estimation.}
33
34
\item{distance}{A string value to indicate the distance measurement. Allowed values contain c('cosine', 'pearson', 'spearman', 'kendall'); "cosine" by default.}
35
36
\item{seed}{An integer value for p-value reproducibility.}
37
38
\item{verbose}{A logic value to indicate whether console messages are to be displayed; TRUE by default.}
39
40
\item{doPlot}{A logic value to indicate whether to produce prediction heatmap; FALSE by default.}
41
42
\item{fig.path}{A string value to indicate the output path for storing the nearest template prediction heatmap.}
43
44
\item{fig.name}{A string value to indicate the name of the nearest template prediction heatmap.}
45
46
\item{width}{A numeric value to indicate the width of output figure.}
47
48
\item{height}{A numeric value to indicate the height of output figure.}
49
}
50
\value{
51
A figure of predictive heatmap by NTP (.pdf) and a list with the following components:
52
53
        \code{ntp.res}    a data.frame storing the results of nearest template prediction (see \link[CMScaller]{ntp}).
54
55
        \code{clust.res}  similar to `clust.res` returned by `getMOIC()` or `get%algorithm_name%` or `getConsensusMOIC()`.
56
57
        \code{mo.method}  a string value indicating the method used for prediction.
58
}
59
\description{
60
Using Nearest Template Prediction (NTP) based on predefined templates derived from current identified subtypes to assign potential subtype label on external cohort.
61
}
62
\examples{
63
# There is no example and please refer to vignette.
64
}
65
\references{
66
Hoshida, Y. (2010). Nearest Template Prediction: A Single-Sample-Based Flexible Class Prediction with Confidence Assessment. PLoS ONE 5, e15543.
67
}