knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message=FALSE)

Preliminaries

if (!require(qqman)) {
  install.packages("qqman")
}
library(qqman)
library(knitr)

GWAS Results

kable(head(gwasResults,n=20))

GWAS Results

kable(tail(gwasResults,n=20))

GWAS Results

kable(tail(gwasResults,n=20))

Count of SNPs per Chromosome

as.data.frame(table(gwasResults$CHR))

Manhattan Plots

manhattan(gwasResults)

Manhattan Plots

manhattan(gwasResults, col=cm.colors(22))

Focusing on Most Interesting Region

library(dplyr)
manhattan(gwasResults %>% filter(CHR==3), col=cm.colors(22))

Color Palette for 26 Chromosomes (1-22, X,Y,M)

library(ggsci)
library(scales)
# scales::show_col(ggsci::pal_ucscgb("default")(26),cex_label=1)

Manhattan Plots

manhattan(gwasResults, col=cm.colors(22))

Focusing on Most Interesting Region

library(dplyr)
mycolors <- ggsci::pal_ucscgb("default")(22)
manhattan(gwasResults, col=mycolors)

Focusing on Most Interesting Region

library(dplyr)

manhattan(gwasResults %>% filter(CHR==3))

Focusing on Most Interesting Region

library(dplyr)

manhattan(gwasResults %>% filter(CHR==3),xlim=c(300,400), annotatePval = TRUE)

Connect to R package rrBLUP

# 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))


eckartbindewald/bfxapps2 documentation built on Feb. 6, 2025, 3:22 a.m.