| zoom | R Documentation |
Interactive genome browser to explore GWAS/eQTL results using a shiny interface.
zoom(
data,
ens_db,
chrom = NULL,
pos = NULL,
p = NULL,
labs = NULL,
data2 = NULL,
traits = NULL,
scheme = c("royalblue", "skyblue", "red", "#00CD00"),
scheme2 = c("#33a02c", "#b2df8a", "purple", "red"),
pcutoff = 5e-08,
eqtl_gene = NULL,
beta = NULL,
eqtl_scheme = c("#FF0000", "#00FFFF", "#FF9000", "#0080FF", "#FFFF00", "#0000FF",
"#80DD00", "#8000FF", "#009900", "#FF00FF"),
add_hover = NULL,
mh_points = 1e+05,
recomb = NULL,
ld_token = Sys.getenv("LDLINK_TOKEN"),
ld_pop = "EUR",
seq_filter = c(1:22, "X", "Y"),
AnnotationDb = "org.Hs.eg.db",
align = TRUE
)
data |
Dataframe of GWAS results with columns for chromosome, position, p value and SNP rs IDs. Data.tables are coerced to dataframe. |
ens_db |
Either a character string which specifies which Ensembl
database package (version 86 and earlier for Homo sapiens) to query for
gene and exon positions (see |
chrom |
Determines which column in |
pos |
Determines which column in |
p |
Determines which column in |
labs |
Determines which column in |
data2 |
Optional 2nd dataframe of GWAS results for comparison. |
traits |
Vector of trait names for identifying |
scheme |
Vector of 4 colours for main Manhattan plot: 1st, 2nd colours for alternating chromosomes, 3rd colour for significant points, 4th colour for highlighting chromosomes. |
scheme2 |
Vector of colours for 2nd Manhattan plot. |
pcutoff |
Cut-off for p value significance. Defaults to p = 5e-08. Set
to |
eqtl_gene |
Determines which column in |
beta |
Optional column name for beta coefficient to display upward
triangles for positive beta and downward triangles for negative beta
(significant SNPs only). If |
eqtl_scheme |
Colour scheme for eQTL genes. |
add_hover |
Optional vector of column names in |
mh_points |
Number of points to display in manhattan plot. Default is
|
recomb |
Optional |
ld_token |
Personal access token for the LDlink API, available from
https://ldlink.nih.gov/?tab=apiaccess. See |
ld_pop |
1000 Genomes population used for LD. Defaults to |
seq_filter |
Vector of acceptable chromosomes. Used to restrict queries to standard chromosome assembly. |
AnnotationDb |
An |
align |
Logical, whether to align the chromosomes in the main Manhattan plots and chromosome subplots when comparing 2 GWAS. |
This launches a shiny app to explore the GWAS/eQTL results through visualising the Manhattan plot and exploring regional Manhattan plots of gene loci through selecting points or searching SNPs/genes.
Linkage disequilibrium data can be pulled from LDlink API within the app
using the 'Get LD' button in the Settings dropdown. These buttons only appear
once a user provides a LDlink API token via the ld_token argument. Each API
request takes around 5-10 secs. 'Get LD' pins the current index SNP as the
reference variant and colours points by r^2 with it. The reference stays
pinned while you pan and zoom, so the colouring keeps its meaning and repeat
queries are served from the memoise cache rather than the API.
No return value. Opens an interactive shiny window.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.