% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotHR.R
\name{plotHR}
\alias{plotHR}
\title{Forest plot of hazard ratios}
\usage{
plotHR(expr, gene.symbol, pred, time, event, by.subtype = TRUE)
}
\arguments{
\item{expr}{A \code{SummarizedExperiment} object or a matrix containig gene
expression profiles. If input is a \code{SummarizedExperiment}, the first
element in the assays list should be a matrix of gene expression.
Rows and columns of the gene expression matrix correspond to genes and
samples, respectively (rownames must be to gene symbols).}

\item{gene.symbol}{A vector of gene symbols for
which hazard ratios are computed.}

\item{pred}{A vector of predicted consensus molecular subtypes.}

\item{time}{A vector of the follow-up time.}

\item{event}{A vector representing survival status (0 = alive, 1 = dead).}

\item{by.subtype}{A logical to determine if subtype-specific
hazard ratios are computed (default is TRUE).}
}
\value{
A forest plot of hazard ratios.
}
\description{
Produces a forest plot of hazard ratios for each gene.
Also draws a forest plot of subtype-specific hazard ratios.
}
\examples{
# Load gene expression profiles and clinical information of TNBC samples
data(GSE25055)
DFS.status <- colData(GSE25055)$DFS.status
DFS.month <- colData(GSE25055)$DFS.month

# Predict consensus molecular subtypes of TNBC samples
prediction <- predictCMS(expr = GSE25055)

# Forest plot of hazard ratios for input genes
plotHR(expr = GSE25055, gene.symbol = c("RECK", "RELN", "EHD4", "PRRX2"),
       pred = prediction, time = DFS.month, event = DFS.status,
       by.subtype = FALSE)

# Subtype-specific forest plot of hazard ratios for input genes
plotHR(expr = GSE25055, gene.symbol = c("RECK", "RELN", "EHD4", "PRRX2"),
       pred = prediction, time = DFS.month, event = DFS.status,
       by.subtype = TRUE)
}
