manhattan_rjs {RJSplot} | R Documentation |
Create an interactive manhattan plot
Description
manhattan_rjs
creates an interactive Manhattan plot.
Usage
manhattan_rjs(data, assembly, axisv, distv, cell = 1e+06,
outliers = TRUE, ylab = "score", yscale = NULL,
cex = 1, plot = TRUE, jupyter = FALSE, dir = tempdir())
Arguments
data |
a data frame with four columns (identifier, chromosome/scaffold, position, score). |
assembly |
a data frame with an assembly to be used. It should be one of the following human assemblies data frames provided by RJSplot: |
axisv |
value for the coordinate of the main horizontal axis. |
distv |
distance between the main horizontal axis and the secondary axes (which stablishes the limit for the outlier representation). |
cell |
segment size which is represented. |
outliers |
logical value to enable ( |
ylab |
a title for the y axis. |
yscale |
a vector with two values which specifies the minimun and maximun limits in the representation. By default maximun and minimun scores are taken as the limits. |
cex |
number indicating the amount by which plotting text and symbols should be scaled relative to the default. |
plot |
open resulting graph in your browser. |
jupyter |
embed the graph as an iframe into a Jupyter Notebook. |
dir |
a "character" string representing the directory where the graph will be saved. |
Value
The function creates a folder in your computer with an HTML document named index.html which contains the graph. This file can be directly opened with your browser.
Author(s)
David Barrios and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/
See Also
The ‘RJSplot’ Website: https://rjsplot.usal.es
dendrogram_rjs
, densityplot_rjs
, genomemap_rjs
, heatmap_rjs
, manhattan_rjs
, network_rjs
, scatterplot_rjs
, symheatmap_rjs
, wordcloud_rjs
, boxplot_rjs
, bubbles_rjs
, hiveplot_rjs
, piechart_rjs
, barplot_rjs
, tables_rjs
, surface3d_rjs
, scatter3d_rjs
.
Examples
## Create an interactive Manhattan plot in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es
if(interactive()){
# Create test data
chr <- character()
pos <- numeric()
for(i in 1:nrow(GRCh38)){
chr <- c(chr,as.character(rep(GRCh38[i,"chr"],100)))
pos <- c(pos,sample(GRCh38[i,"start"]:GRCh38[i,"end"],100))
}
value <- round(rexp(length(pos)),2)
# Create a manhattan plot
data <- data.frame(paste0("ProbeSet_",seq_along(pos)),chr,pos,value)
manhattan_rjs(data, GRCh38, 0, 1, 0, TRUE, "log2Ratio")
}