Description Usage Arguments Value Examples
View source: R/waterfallPlot.R
Use a waterfall plot to visualize drug sensitivity in decreasing order ( left -> right corresponds to most sensitive -> least sensitive). The waterfall plot can also be colored by a third parameter, such as statistical significance (p-value, fdr, etc.) There are many common uses of the waterfall plot, such as:
Find the most effective drugs for a particular tumour: plot different compounds along the x-axis, and the response of the tumor on the y-axis
Find the tumour subtypes that respond best to a drug: plot different subtypes along the x-axis, and the response of each tumor to the compound of interest on the y-axis
1 2 3 4 5 6 7 8 9 |
drugResponseDf |
A data.frame of drug sensitivity measurements in different tumours, subtypes, or replicates |
xAxisCol |
The name of the column in biomarkerDf that will be mapped on the x-axis. Since this is a discrete axis, drugResponseDf$xAxisCol should be a vector of type "character". |
drugSensitivityCol |
The name of the column in biomarkerDf that has the drug sensitivity metrics; will be mapped on the y-axis. Since this is a continuous axis, drugResponseDf$drugSensitivityCol should be a vector of type "numeric". |
colorCol |
(optional) The name of the column that will determine the color of the bars (such as statistical significance). Since this is a continuous axis, drugResponseDf$colorCol should be a vector of type "numeric". If no column is provided, it will default to the drugSensitivityCol. |
xLabel |
(optional) The label for the x-axis. Defaults to <xAxisCol>. |
yLabel |
(optional) The label for the y-axis. Defaults to <drugSensitivityCol>. |
title |
(optional) The title for the plot. Defaults to '<drugSensitivityCol> vs. <xAxisCol>' |
A ggplot2 plot object mapping the drug sensitivity metrics against the xAxisCol, sorted in descending order by drug sensitivity and colored by colorCol
1 2 3 4 5 6 | data(BRCA.PDXE.paxlitaxel.response)
buildWaterfallPlot(BRCA.PDXE.paxlitaxel.response,
xAxisCol="tumour", drugSensitivityCol="angle",
colorCol="ODC1", xLabel="Tumour",
yLabel="Angle Between Treatment and Control",
title="Paclitaxel Response in BRCA Tumours")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.