plot(pressure)\documentclass{beamer}
\mode<presentation>
{
\usetheme{default} % or try Darmstadt, Madrid, Warsaw, ...
\usecolortheme{default} % or try albatross, beaver, crane, ...
\usefonttheme{default} % or try serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{verbatim}
\usepackage{comment}
\usepackage{listings,color,lipsum}
\usepackage{color}
\title[Your Short Title]{Association of Methylation Quantitative Trait Loci and Prostate Cancer}
\author{Char Adams}
\institute{University of Bristol}
\date{February 13, 2017}
\titlegraphic{\vspace{2cm}\includegraphics[width=2.5cm]{cruk_logo.jpg}\hspace*{6cm}~%
\includegraphics[width=2.5cm]{mrc-logo.jpg}}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Introduction}
\begin{frame}{Introduction}
\begin{itemize}
\item Introduce the mQTL project
\item Share what I've done so far
\item Get your thoughts
\end{itemize}
\vskip 1cm
\begin{block}{Motivation}
Changes in DNA methylation arise early in the pathogenesis of prostate cancer, but
\end{block}
\end{frame}
\section{Motivation}
\subsection{Cause or Consequence}
\begin{frame}{Cause or Consequence}
\begin{figure}[H]
\centering
\includegraphics[width=50mm]{chick.jpg}
\end{figure}
\vskip 1cm
\begin{block}{Confounding }
explain associations?
\end{block}
\end{frame}
\subsection{Cognitive Anchors}
\begin{frame}{Cogntive Anchors}
\begin{figure}[H]
\centering
\includegraphics[width=100mm]{Slide1.jpg}
\end{figure}
\vskip 1cm
\end{frame}
\begin{frame}{Strategy}
\begin{figure}[H]
\centering
\includegraphics[width=100mm]{Slide2.jpg}
\end{figure}
\vskip 1cm
\end{frame}
\subsection{Details}
\begin{frame}[fragile]{Organizing}
Create file folders to organize the project
\begin{itemize}
\item data (dosage, sample order files, phenotype file)
\item results
\item scripts
\end{itemize}
\color{blue}\begin{verbatim}
/panfs/panasas01/sscm/ca16591/practical_224/data
/panfs/panasas01/sscm/ca16591/practical_224/results
/panfs/panasas01/sscm/ca16591/practical_224/scripts
\end{verbatim}
\end{frame}
\begin{frame}[fragile]{Data Set Up}
\begin{itemize}
\item read phenotype and a sample order file into R
\item merge and match based on ID order in the sample order file
\item code the prostate cancer status (CaCo) variable
\end{itemize}
\color{blue}\begin{verbatim}
mrg <- merge(x = phenotype, y = sample, by = c("ID"),
all.y = TRUE)
ordered_pheno <- mrg[match(sample$ID, mrg$ID),]
ordered_pheno$PCa <- ifelse(ordered_pheno$CaCo==1,2,1)
\end{verbatim}
\begin{table}\color{purple}
\centering
\begin{tabular}{l|r}
Controls & Cases \\\hline
31661 & 47995
\end{tabular}
\end{table}
\end{frame}
\begin{frame}[fragile]{Dosage Data}
\begin{itemize}
\item Single-value dose given for the a1 allele
\item Plink2 can handle this format with its --dosage command
\item Requires some file creation: fam, map, and covar files
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Fam File}
\begin{itemize}
\item Use the ordered phenotype file
\item Use instructions on Plink's website for necessary .fam columns
\item Create columns, remove header, save to 'data' folder
\end{itemize}
\begin{table}\color{purple}
\centering
\begin{tabular}{l|r}
Fam File Columns & R \\\hline
Family ID (FID) & ID\\
Within-family ID father & 0\\
Within-family ID of mother & 0\\
Sex (1=male) & 1 \\
Phenotype (2=case) & CaCo
\end{tabular}
\end{table}
\end{frame}
\begin{frame}[fragile]{Map Files}
\begin{itemize}
\item Make map.sh in notepad++, save to 'scripts' folder, and run with qsub map.sh
\item Use --awk to create columns
\end{itemize}
\begin{table}\color{purple}
\centering
\begin{tabular}{l}
Map File Columns\\\hline
Chromosome \\
Variant ID \\
0 \\
Base-pair Coordinate \\
\end{tabular}
\end{table}
\color{blue}\begin{verbatim}
#!/bin/bash
#PBS -l nodes=1:ppn=1,walltime=1:00:00
#PBS -N 224_maps
awk '{print 1,$1,0,$3}'
~/practical_224/data/data_chr01.dosages.txt >
~/practical_224/data/chr01.map
\end{verbatim}
\end{frame}
\begin{frame}[fragile]{Covariates File}
\begin{itemize}
\item Use the ordered phenotype file
\item Use instructions on Plink's website for necessary .cov columns
\item Create columns using ordered phenotype file and save to 'data' folder
\end{itemize}
\color{blue}\begin{verbatim}
myvars <- c("FID","IID","CaCo","pc1_euro","pc2_euro",
"pc3_euro","pc4_euro", "pc5_euro", "pc6_euro", "pc7_euro")
pca_covars <- ordered_pheno3[myvars]
\end{verbatim}
\end{frame}
\begin{frame}[fragile]{Dosage in Plink2}
\begin{itemize}
\item Write script to run the association tests and loop through all the chromsomes and output results to 'results' folder
\end{itemize}
\color{blue}\begin{verbatim}
plink --fam ~/practical_224/data/fam_final.txt
--map ~/practical_224/data/chr${ii}.map
--covar ~/practical_224/data/pca_covars.txt
--covar-number 2-8
--dosage ~/practical_224/data/data_chr${ii}.dosages.txt
noheader skip1=2 format=1
--out ~/practical_224/results/pca.full${ii}.txt
\end{verbatim}
\end{frame}
\begin{frame}[fragile]{Results}
\begin{itemize}
\item Read each chromosome results file into R, rbind, and sort by p-value
\end{itemize}
\begin{table}\color{purple}
\centering
\begin{tabular}{l|l|l|l|l}
CHR & SNP & OR & SE & P\\
10 & chr10... & 0.7878 & 0.0105 & 8.405e-115\\
17 & rs10908278 & 1.2456 & 0.0104 & 7.488e-99\\
17 & rs11263763 & 1.2442 & 0.0104 & 1.828e-98\\
17 & rs11651052 & 1.2420 & 0.0104 & 7.378e-97 \\
17 & rs11651755 & 1.2412 & 0.0104 & 8.892e-97 \\
17 & rs8064454 & 1.2419& 0.0104 & 9.211e-97\\
17 & rs4430796 & 1.2371 & 0.0104 & 3.103e-92\\
17 & rs11263761 & 1.2374 & 0.0105 & 7.121e-92\\
10 & rs7911198 & 0.8154 & 0.0103 & 2.424e-87\\
10 & rs3101227 & 0.8150 & 0.0103 & 3.437e-87\\
\end{tabular}
\caption{\label{tab:widgets}Top 10 Findings}
\end{table}
\end{frame}
\begin{frame}[fragile]{Next Steps}
\begin{itemize}
\item Repeat for stage and grade
\item Meta-analyses
\item MR
\item EWAS
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Thank you}
\begin{itemize}
\item Thoughts?
\end{itemize}
\begin{figure}
\vfill
\vfill
\vfill
\vfill
\vfill
\vfill
\vfill
\vfill
\vfill
\includegraphics[width=0.25\textwidth]{cruk_logo.jpg}
\hfill
\includegraphics[width=0.25\textwidth]{mrc-logo.jpg}
\end{figure}
\end{frame}
\end{document}