Description Usage Arguments Value Examples
View source: R/manhattanPlot.R
Note that this Manhattan plot is NOT plotting a GWAS study. It is plotting the significance of drug responses of potential biomarkers (y-axis = log10(pvalue)). Biomarkers are plotted in order of their genomic coordinates (x-axis = gene sequence start) and colored by chromosome. Points that are significant are fully opaque; points that are not significant are translucent. Currently, only a single experiment (one tissue, one compound, one molecular data type) can be plotted at once.
1 2 3 4 5 6 7 8 9 10 11 12 |
biomarkerDf |
A data.frame of drug sensitivity biomarkers that you want to plot, including the compound, tissue, molecular data type ("mDataType"), genomic coordinates and chromosome of each gene ("gene_seq_start", "chr"), and p-values ("pvalue") |
chromosomeDf |
A data.frame of the reference genome, including the names and lengths of all chromosomes ("chrName", "chrLength"). The row order should match the chromosome order in the reference genome. If there is an "all" row (with the total genome length), it should be first. |
tissue |
A string representing the tissue for which you want to plot biomarker drug sensitivity |
compound |
A string representing the compound for which you want to plot biomarker drug sensitivity |
mDataType |
A string representing the molecular data type for which you want to plot biomarker drug sensitivity |
pValCutoff |
(optional) A number between 0 and 1 indicating the maximum p-value that an experimental result can have to be considered significant. Any results with a higher p-value will be translucent (opacity = 0.5) on the plot. Default value is 0.05. |
relativeGenomeCoords |
(optional) A boolean that indicates whether the genomic coordinates given in biomarkerDf are relative to the chromosome (TRUE) or relative to the entire genome (absolute, FALSE). Default is TRUE. |
xLabel |
(optional) The label for the x-axis. Defaults to "Estimate". |
yLabel |
(optional) The label for the y-axis. Defaults to "Log10 P-Value". |
title |
(optional) The title for the plot. Defaults to "Significance of drug response in <tissueName> tissue in response to <compoundName>" |
A named list with two fields: "dt" and "plot". The "plot" field contains a ggplot2 plot object (the Manhattan plot) and the "dt" field contains a data.table with all the biomarkers that were plotted on "plot"
1 2 3 4 5 6 7 | data(Biomarkers)
data(GRCh38.p13.Assembly)
result <- buildManhattanPlot(
Biomarkers, GRCh38.p13.Assembly, "Lung", "Trametinib", "rna",
pValCutoff=0.01, relativeGenomeCoords=TRUE, title="Sample Plot")
result$dt
result$plot
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.