survey_gwas | R Documentation |
plot sample size and other information about studies in IEU GWAS ecosystem
survey_gwas( phrases, datasource = gwaslake::gwidf_2021_01_30, title_pref = "IEU GWAS", title_text = paste(sQuote(phrases), collapse = ", "), xlab = "N controls", ylab = "N cases", ... )
phrases |
character() vector to grep with ignore.case=TRUE in |
datasource |
data.frame with |
title_pref |
character(1) defaults to "IEU GWAS" |
title_text |
character(1) defaults to a paste of phrases with collapse=", " |
xlab |
character(1) x axis label defaults to "N controls" |
ylab |
character(1) x axis label defaults to "N cases" |
... |
passed to grep |
Returns ggplot, intended for ggplotly. When used with ggplotly, hover over points to get details such as exact definition of trait, study ID, PMID if available. For some phenotypes, numbers of cases or controls are unavailable. If this occurs for all studies assessing the selected phenotypes, an error is thrown.
requireNamespace("ggplot2") sg = survey_gwas(c("asthma", "asthmatic")) + ggplot2::theme(text=ggplot2::element_text(size=16)) if (interactive()) { requireNamespace("plotly") plotly::ggplotly(sg) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.