View source: R/highlight_miami.R
highlight_miami | R Documentation |
Make highlight data.frame for miami plot
highlight_miami( data, highlight, highlight_col, highlight_color = "green", logged_p = "logged_p", rel_pos = "rel_pos" )
data |
A data.frame object. Required. |
highlight |
A vector of SNPs or gene names you would like to highlight. Defaults to NULL. If you specify this, you must also specify highlight_col so that we know where to find the items. |
highlight_col |
The column where the values you provide in
|
highlight_color |
The color that you would like the highlighted SNPs or genes to be. Defaults to "green." |
logged_p |
The name of the column containing your logged p-value
information. Defaults to "logged_p," assuming data preparation with
|
rel_pos |
The name of the column containing the positon of each
SNP/probe relative to all other SNPs/probes in the genome. Defaults to
"rel_pos," assuming data preparation with |
A data.frame with three columns: relative position, logged p-value, and highlight color.
Julie White
https://github.com/juliedwhite/miamiplot
## Not run: # You can provide a list of SNP / gene names upper_highlight <- highlight_miami(data = plot_data$upper, highlight = c(rs1, rs2, rs3, ..., rsN), highlight_col = "rsid") # Or an object containing those names. upper_highlight <- highlight_miami(data = plot_data$upper, highlight = snps_of_interest, highlight_col = "rsid") # When highlighting, the items in 'highlight' must all come from a single # column. Specifying multiple columns in highlight_col will return an error. highlight_miami(data = df, split_by = "study", split_at = "A", highlight = snps_of_interest, highlight_col = c("rsid", "gene")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.