knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message=FALSE)
if (!require(qqman)) { install.packages("qqman") } library(qqman) library(knitr)
kable(head(gwasResults,n=20))
kable(tail(gwasResults,n=20))
kable(tail(gwasResults,n=20))
as.data.frame(table(gwasResults$CHR))
manhattan(gwasResults)
manhattan(gwasResults, col=cm.colors(22))
library(dplyr) manhattan(gwasResults %>% filter(CHR==3), col=cm.colors(22))
library(ggsci) library(scales) # scales::show_col(ggsci::pal_ucscgb("default")(26),cex_label=1)
manhattan(gwasResults, col=cm.colors(22))
library(dplyr) mycolors <- ggsci::pal_ucscgb("default")(22) manhattan(gwasResults, col=mycolors)
library(dplyr) manhattan(gwasResults %>% filter(CHR==3))
library(dplyr) manhattan(gwasResults %>% filter(CHR==3),xlim=c(300,400), annotatePval = TRUE)
Write a function that converts between those formats!
visualize output of GWAS function in vignette gwas.Rmd
# gresult2 <- (gresult %>% rename(SNP=marker,CHR=chrom,BP=pos) %>% mutate(CHR=as.numeric(as.character(CHR)), P=(1-pnorm(score))) %>% select(SNP,CHR,BP,P))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.