☰ Menu

      Genome-Wide Association Studies

Home
Introduction and Lectures
Intro to the Workshop and Core
Schedule
Dr. Anthony Musolf Talk
What is Bioinformatics/Genomics?
Support
Slack
Zoom
Cheat Sheets
Software and Links
Scripts
Prerequisites
Logging In
CLI
R
Cluster Computing
Data Reduction
Files and Filetypes
Project setup
Preprocessing raw data
Alignment with BWA
Variant calling using GATK
Comparison of freebayes, GATK, and deepvariant output
Data Analysis
Plink Step by Step TDT
Plink Step by Step TDT (solutions)
wAnnovar Annotation
Plink Step by Step (Non FBAT excercise)
Setup in R
GWAS Visualization
ETC
Closing thoughts
Workshop Photos
Github page
Biocore website

Create a new RStudio project

Open RStudio and create a new project, for more info see Using-Projects

File > New Project > New Directory > New Project (name the new directory, Ex. Differential_Expression) and check “use renv with this project” if present. Learn more about renv

Set some options and make sure the packages Seurat, sva, ggplot2, dplyr, limma, topGO, WGCNA are installed (if not install it), and then load them and verify they all loaded correctly.

In the R console run the following commands, it is helpful to run one package at a time

if (!any(rownames(installed.packages()) == "dplyr")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("dplyr")
}
library(dplyr)

if (!any(rownames(installed.packages()) == "qqman")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("qqman")
}
library(qqman)

if (!any(rownames(installed.packages()) == "CMplot")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("CMplot")
}
library(CMplot)

if (!any(rownames(installed.packages()) == "ggplot2")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("ggplot2")
}
library(ggplot2)


if (!any(rownames(installed.packages()) == "kableExtra")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("kableExtra")
}
library(kableExtra)


if (!any(rownames(installed.packages()) == "rmarkdown")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("rmarkdown")
}
library(rmarkdown)

if (!any(rownames(installed.packages()) == "tinytex")){
  if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  BiocManager::install("tinytex")
}
library(tinytex)

Download the template Markdown workshop document PART1 and open it.

In the R console run the following command

download.file("https://raw.githubusercontent.com/ucdavis-bioinformatics-training/2021-July-Genome-Wide-Association-Studies/main/data_analysis/GWASvisualizations.Rmd",
 "GWASvisualization.Rmd")

Open that file.

Download the data for the workshop, extract it.

In the R console run the following command.

download.file("https://raw.githubusercontent.com/ucdavis-bioinformatics-training/2021-July-Genome-Wide-Association-Studies/main/datasets/query.output.genome_summary.csv", "query.output.genome_summary.csv")
download.file("https://raw.githubusercontent.com/ucdavis-bioinformatics-training/2021-July-Genome-Wide-Association-Studies/main/datasets/tdtadj.csv", "tdtadj.csv")
download.file("https://raw.githubusercontent.com/ucdavis-bioinformatics-training/2021-July-Genome-Wide-Association-Studies/main/datasets/tdtfrq.csv", "tdtfrq.csv")

Your RStudio should look something like this