Skip to content
Snippets Groups Projects
covid_comp_primate-Young-focus.tex 24 KiB
Newer Older
your name's avatar
your name committed
\documentclass[11pt, oneside]{article}\usepackage[]{graphicx}\usepackage[]{color}
% maxwidth is the original width if it is less than linewidth
% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
  \ifdim\Gin@nat@width>\linewidth
    \linewidth
  \else
    \Gin@nat@width
  \fi
}
\makeatother

\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%
\let\hlipl\hlkwb

\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
 \def\at@end@of@kframe{}%
 \ifinner\ifhmode%
  \def\at@end@of@kframe{\end{minipage}}%
  \begin{minipage}{\columnwidth}%
 \fi\fi%
 \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
 \colorbox{shadecolor}{##1}\hskip-\fboxsep
     % There is no \\@totalrightmargin, so:
     \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
 \MakeFramed {\advance\hsize-\width
   \@totalleftmargin\z@ \linewidth\hsize
   \@setminipage}}%
 {\par\unskip\endMakeFramed%
 \at@end@of@kframe}
\makeatother

\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

\usepackage{alltt}   	% use "amsart" instead of "article" for AMSLaTeX format
%\usepackage{geometry}                		% See geometry.pdf to learn the layout options. There are lots.
%\geometry{letterpaper}                   		% ... or a4paper or a5paper or ... 
%\geometry{landscape}                		% Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    		% Activate to begin paragraphs with an empty line rather than an indent
%\usepackage{graphicx}				% Use pdf, png, jpg, or eps with pdflatex; use eps in DVI mode
								% TeX will automatically convert eps --> pdf in pdflatex		
%\usepackage{amssymb}

\usepackage[utf8]{inputenc}
%\usepackage[cyr]{aeguill}
%\usepackage[francais]{babel}
%\usepackage{hyperref}


\title{Positive selection on genes interacting with SARS-Cov2, comparison of different analysis}
\author{Marie Cariou}
mcariou's avatar
mcariou committed
\date{March 2021}							% Activate to display a given date or no date
your name's avatar
your name committed
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}
\maketitle

\tableofcontents

\newpage

\section{Files manipulations}

mcariou's avatar
mcariou committed
\subsection{Complete table}
your name's avatar
your name committed

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{home}\hlkwb{<-}\hlstr{"/home/adminmarie/Documents/"}
\hlstd{workdir}\hlkwb{<-}\hlkwd{paste0}\hlstd{(home,} \hlstr{"CIRI_BIBS_projects/2020_05_Etienne_covid/"}\hlstd{)}
your name's avatar
your name committed

\hlstd{tab}\hlkwb{<-}\hlkwd{read.delim}\hlstd{(}\hlkwd{paste0}\hlstd{(workdir,}
mcariou's avatar
mcariou committed
  \hlstr{"covid_comp/covid_comp_complete.txt"}\hlstd{),} \hlkwc{h}\hlstd{=T,} \hlkwc{sep}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{)}
your name's avatar
your name committed
\hlkwd{dim}\hlstd{(tab)}
\end{alltt}
\begin{verbatim}
mcariou's avatar
mcariou committed
## [1] 332 141
your name's avatar
your name committed
\end{verbatim}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{tab}\hlopt{$}\hlstd{Gene.name}\hlkwb{<-}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstd{Gene.name.x)}
\hlstd{tab}\hlopt{$}\hlstd{Gene.name[tab}\hlopt{$}\hlstd{PreyGene}\hlopt{==}\hlstr{"MARC1"}\hlstd{]}\hlkwb{<-}\hlstr{"MARC1"}
your name's avatar
your name committed
\end{alltt}
\end{kframe}
\end{knitrout}

mcariou's avatar
mcariou committed

your name's avatar
your name committed
\subsection{Read DGINN Young table}

DGINN-Young-primate table correspond to DGINN results, on the SAME alignment as Young-primate.

I will merge the 2 tables.

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{dginnY}\hlkwb{<-}\hlkwd{read.delim}\hlstd{(}\hlkwd{paste0}\hlstd{(workdir,}
  \hlstr{"data/summary_primate_young.res"}\hlstd{),}
        \hlkwc{fill}\hlstd{=T,} \hlkwc{h}\hlstd{=T)}

\hlkwd{dim}\hlstd{(dginnY)}
\end{alltt}
\begin{verbatim}
## [1] 1992    7
\end{verbatim}
\begin{alltt}
\hlkwd{names}\hlstd{(dginnY)}
\end{alltt}
\begin{verbatim}
mcariou's avatar
mcariou committed
## [1] "Gene"    "Omega"   "Method"  "PosSel"  "PValue"  "NbSites"
## [7] "PSS"
your name's avatar
your name committed
\end{verbatim}
\end{kframe}
\end{knitrout}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{add_col}\hlkwb{<-}\hlkwa{function}\hlstd{(}\hlkwc{method}\hlstd{=}\hlstr{"PamlM1M2"}\hlstd{)\{}

\hlstd{tmp}\hlkwb{<-}\hlstd{dginnY[dginnY}\hlopt{$}\hlstd{Method}\hlopt{==}\hlstd{method,}
           \hlkwd{c}\hlstd{(}\hlstr{"Gene"}\hlstd{,} \hlstr{"Omega"}\hlstd{,} \hlstr{"PosSel"}\hlstd{,} \hlstr{"PValue"}\hlstd{,} \hlstr{"NbSites"}\hlstd{,} \hlstr{"PSS"}\hlstd{)]}

\hlkwd{names}\hlstd{(tmp)}\hlkwb{<-}\hlkwd{c}\hlstd{(}\hlstr{"Gene.name"}\hlstd{,} \hlkwd{paste0}\hlstd{(}\hlstr{"Omega_"}\hlstd{, method),}
              \hlkwd{paste0}\hlstd{(}\hlstr{"PosSel_"}\hlstd{, method),} \hlkwd{paste0}\hlstd{(}\hlstr{"PValue_"}\hlstd{, method),}
              \hlkwd{paste0}\hlstd{(}\hlstr{"NbSites_"}\hlstd{, method),} \hlkwd{paste0}\hlstd{(}\hlstr{"PSS_"}\hlstd{, method))}

\hlstd{tab}\hlkwb{<-}\hlkwd{merge}\hlstd{(tab, tmp,} \hlkwc{by}\hlstd{=}\hlstr{"Gene.name"}\hlstd{)}

\hlkwd{return}\hlstd{(tab)}
\hlstd{\}}

\hlstd{tab}\hlkwb{<-}\hlkwd{add_col}\hlstd{(}\hlstr{"PamlM1M2"}\hlstd{)}
\hlstd{tab}\hlkwb{<-}\hlkwd{add_col}\hlstd{(}\hlstr{"PamlM7M8"}\hlstd{)}
\hlstd{tab}\hlkwb{<-}\hlkwd{add_col}\hlstd{(}\hlstr{"BppM1M2"}\hlstd{)}
\hlstd{tab}\hlkwb{<-}\hlkwd{add_col}\hlstd{(}\hlstr{"BppM7M8"}\hlstd{)}


\hlcom{# Manip pour la colonne BUSTED}

\hlstd{tmp}\hlkwb{<-}\hlstd{dginnY[dginnY}\hlopt{$}\hlstd{Method}\hlopt{==}\hlstr{"BUSTED"}\hlstd{,}\hlkwd{c}\hlstd{(}\hlstr{"Gene"}\hlstd{,} \hlstr{"Omega"}\hlstd{,} \hlstr{"PosSel"}\hlstd{,} \hlstr{"PValue"}\hlstd{)]}
\hlkwd{names}\hlstd{(tmp)}\hlkwb{<-}\hlkwd{c}\hlstd{(}\hlstr{"Gene.name"}\hlstd{,} \hlstr{"Omega_BUSTED"}\hlstd{,} \hlstr{"PosSel_BUSTED"}\hlstd{,} \hlstr{"PValue_BUSTED"}\hlstd{)}
\hlstd{tab}\hlkwb{<-}\hlkwd{merge}\hlstd{(tab, tmp,} \hlkwc{by}\hlstd{=}\hlstr{"Gene.name"}\hlstd{)}

\hlstd{tmp}\hlkwb{<-}\hlstd{dginnY[dginnY}\hlopt{$}\hlstd{Method}\hlopt{==}\hlstr{"MEME"}\hlstd{,}\hlkwd{c}\hlstd{(}\hlstr{"Gene"}\hlstd{,} \hlstr{"NbSites"}\hlstd{,} \hlstr{"PSS"}\hlstd{)]}
\hlkwd{names}\hlstd{(tmp)}\hlkwb{<-}\hlkwd{c}\hlstd{(}\hlstr{"Gene.name"}\hlstd{,} \hlstr{"NbSites_MEME"}\hlstd{,} \hlstr{"PSS_MEME"}\hlstd{)}
\hlstd{tab}\hlkwb{<-}\hlkwd{merge}\hlstd{(tab, tmp,} \hlkwc{by}\hlstd{=}\hlstr{"Gene.name"}\hlstd{)}
mcariou's avatar
mcariou committed

\hlkwd{dim}\hlstd{(tab)}
your name's avatar
your name committed
\end{alltt}
mcariou's avatar
mcariou committed
\begin{verbatim}
## [1] 332 167
\end{verbatim}
your name's avatar
your name committed
\end{kframe}
\end{knitrout}


\section{Comparisons Primates}

\subsection{DGINN results on Janet Young's alignments (DGINN-Young-primate) VS Janet Young's results}

Comparaison des Omega: colonne L "whole.gene.dN.dS.model.0" VS colonne "omega" dans la sortie de dginn.
mcariou's avatar
mcariou committed

your name's avatar
your name committed
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlkwb{<-}\hlkwd{as.numeric}\hlstd{(}
  \hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0))}
your name's avatar
your name committed
\hlkwd{plot}\hlstd{(tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0, tab}\hlopt{$}\hlstd{Omega_PamlM7M8,}
     \hlkwc{xlab}\hlstd{=}\hlstr{"Omega Young-primate"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"Omega DGINN-Young-primate"}\hlstd{)}
\hlkwd{abline}\hlstd{(}\hlnum{0}\hlstd{,}\hlnum{1}\hlstd{)}
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{<}\hlnum{0.2} \hlopt{&} \hlstd{tab}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{>}\hlnum{0.4}\hlstd{,]}
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0,}
\hlkwc{y}\hlstd{=(outlier}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{+}\hlnum{0.01}\hlstd{),}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}

\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{<}\hlnum{0.6} \hlopt{&} \hlstd{tab}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{>}\hlnum{0.7}\hlstd{,]}
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0,}
\hlkwc{y}\hlstd{=(outlier}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{+}\hlnum{0.01}\hlstd{),}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/omegaM7M8-1} 

\end{knitrout}

\subsection{DGINN results on Janet Young's alignments (DGINN-Young-primate) VS DGINN-full's results}

Comparaison des Omega: colonne L "whole.gene.dN.dS.model.0" VS colonne "omega" dans la sortie de dginn.
mcariou's avatar
mcariou committed

your name's avatar
your name committed
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlkwb{<-}\hlkwd{as.numeric}\hlstd{(}
  \hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{))}
your name's avatar
your name committed
\end{alltt}


{\ttfamily\noindent\color{warningcolor}{\#\# Warning: NAs introduits lors de la conversion automatique}}\begin{alltt}
mcariou's avatar
mcariou committed
\hlkwd{plot}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{, tab}\hlopt{$}\hlstd{Omega_PamlM7M8,}
your name's avatar
your name committed
     \hlkwc{xlab}\hlstd{=}\hlstr{"DGINN-full's"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"Omega DGINN-Young-primate"}\hlstd{)}
\hlkwd{abline}\hlstd{(}\hlnum{0}\hlstd{,}\hlnum{1}\hlstd{)}

mcariou's avatar
mcariou committed
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlopt{>}\hlnum{0.4} \hlopt{&} \hlstd{tab}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{<}\hlnum{0.2}\hlstd{,]}
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
\hlkwc{y}\hlstd{=(outlier}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{+}\hlnum{0.01}\hlstd{),}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}

\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlopt{>}\hlnum{0.5} \hlopt{&} \hlstd{tab}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{<}\hlnum{0.4}\hlstd{,]}
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
your name's avatar
your name committed
\hlkwc{y}\hlstd{=(outlier}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{+}\hlnum{0.01}\hlstd{),}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}

mcariou's avatar
mcariou committed
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlopt{>}\hlnum{0.2} \hlopt{&} \hlstd{tab}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{>}\hlnum{0.6}\hlstd{,]}
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
your name's avatar
your name committed
\hlkwc{y}\hlstd{=(outlier}\hlopt{$}\hlstd{Omega_PamlM7M8}\hlopt{+}\hlnum{0.01}\hlstd{),}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/omegaM7M8_2-1} 

\end{knitrout}

\subsection{Janet Young's results (Young-primate) VS DGINN-full's results}

Comparaison des Omega: colonne L "whole.gene.dN.dS.model.0" VS colonne "omega" dans la sortie de dginn.
mcariou's avatar
mcariou committed

your name's avatar
your name committed
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlkwd{plot}\hlstd{(tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0,}
     \hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{)),}
your name's avatar
your name committed
     \hlkwc{xlab}\hlstd{=}\hlstr{"Omega Young-primate"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"DGINN-full's"}\hlstd{)}
\hlkwd{abline}\hlstd{(}\hlnum{0}\hlstd{,}\hlnum{1}\hlstd{)}


mcariou's avatar
mcariou committed
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{<}\hlnum{0.4} \hlopt{&}
  \hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{))}\hlopt{>}\hlnum{0.5}\hlstd{,]}
mcariou's avatar
mcariou committed
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0,}
\hlkwc{y}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}

mcariou's avatar
mcariou committed
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{>}\hlnum{0.7} \hlopt{&}
  \hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{))}\hlopt{>}\hlnum{0}\hlstd{,]}
your name's avatar
your name committed
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0,}
mcariou's avatar
mcariou committed
\hlkwc{y}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}

mcariou's avatar
mcariou committed
\hlstd{outlier}\hlkwb{<-}\hlstd{tab[tab}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{<}\hlnum{0.1} \hlopt{&}
  \hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{))}\hlopt{>}\hlnum{0.3}\hlstd{,]}
mcariou's avatar
mcariou committed
\hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=outlier}\hlopt{$}\hlstd{whole.gene.dN.dS.model.0}\hlopt{+}\hlnum{0.03}\hlstd{,}
\hlkwc{y}\hlstd{=outlier}\hlopt{$}\hlstr{'dginn.primate_omegaM0Bpp'}\hlstd{,}
your name's avatar
your name committed
\hlstd{outlier}\hlopt{$}\hlstd{Gene.name)}
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/omegaM7M8_3-1} 

\end{knitrout}

\section{Overlap}

\subsection{Mondrian}

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{library}\hlstd{(Mondrian)}

\hlstd{monddata}\hlkwb{<-}\hlkwd{as.data.frame}\hlstd{(tab}\hlopt{$}\hlstd{Gene.name)}
\hlkwd{dim}\hlstd{(monddata)}
\end{alltt}
\begin{verbatim}
mcariou's avatar
mcariou committed
## [1] 332   1
your name's avatar
your name committed
\end{verbatim}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{dginnyoungtmp}\hlkwb{<-}\hlkwd{rowSums}\hlstd{(}\hlkwd{cbind}\hlstd{(tab}\hlopt{$}\hlstd{PosSel_PamlM1M2}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstd{PosSel_PamlM7M8}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstd{PosSel_BppM1M2}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstd{PosSel_BppM7M8}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstd{PosSel_BUSTED}\hlopt{==}\hlstr{"Y"}\hlstd{))}

\hlstd{dginnfulltmp}\hlkwb{<-}\hlkwd{rowSums}\hlstd{(}\hlkwd{cbind}\hlstd{(tab}\hlopt{$}\hlstr{'dginn.primate_BUSTED'}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_BppM1M2'}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_BppM7M8'}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_codemlM1M2'}\hlopt{==}\hlstr{"Y"}\hlstd{,}
                            \hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_codemlM7M8'}\hlopt{==}\hlstr{"Y"}\hlstd{))}
your name's avatar
your name committed

\hlstd{monddata}\hlopt{$}\hlstd{primates_young}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(tab}\hlopt{$}\hlstd{pVal.M8vsM7}\hlopt{<}\hlnum{0.05}\hlstd{,} \hlnum{1}\hlstd{,} \hlnum{0}\hlstd{)}

\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_young}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnyoungtmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}
\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_full}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnfulltmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}

mcariou's avatar
mcariou committed
\hlkwd{mondrian}\hlstd{(}\hlkwd{na.omit}\hlstd{(monddata[,}\hlnum{2}\hlopt{:}\hlnum{4}\hlstd{]),}
         \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"Young"}\hlstd{,} \hlstr{"DGINN-Young >=3"}\hlstd{,} \hlstr{"DGINN-full >=3"} \hlstd{))}
your name's avatar
your name committed
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/mondrianprimates-1} 
\begin{kframe}\begin{alltt}
\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_young}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnyoungtmp}\hlopt{>=}\hlnum{4}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}
\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_full}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnfulltmp}\hlopt{>=}\hlnum{4}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}

mcariou's avatar
mcariou committed
\hlkwd{mondrian}\hlstd{(}\hlkwd{na.omit}\hlstd{(monddata[,}\hlnum{2}\hlopt{:}\hlnum{4}\hlstd{]),}
         \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"Young"}\hlstd{,} \hlstr{"DGINN-Young >=4"}\hlstd{,} \hlstr{"DGINN-full >=4"}\hlstd{))}
your name's avatar
your name committed
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/mondrianprimates-2} 

\end{knitrout}

Comparison of results with the same method.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_young}\hlkwb{<-}\hlstd{tab}\hlopt{$}\hlstd{PosSel_BppM7M8}\hlopt{==}\hlstr{"Y"}
mcariou's avatar
mcariou committed
\hlstd{monddata}\hlopt{$}\hlstd{primates_dginn_full}\hlkwb{<-}\hlstd{tab}\hlopt{$}\hlstr{'dginn.primate_codemlM7M8'}\hlopt{==}\hlstr{"Y"}
your name's avatar
your name committed

mcariou's avatar
mcariou committed
\hlkwd{mondrian}\hlstd{(}\hlkwd{na.omit}\hlstd{(monddata[,}\hlnum{2}\hlopt{:}\hlnum{4}\hlstd{]),}
         \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"Young"}\hlstd{,} \hlstr{"DGINN-Young"}\hlstd{,} \hlstr{"DGINN-full"}\hlstd{),}
         \hlkwc{main}\hlstd{=}\hlstr{"posel codeml M7M8"}\hlstd{)}
your name's avatar
your name committed
\end{alltt}
\end{kframe}
mcariou's avatar
mcariou committed
\includegraphics[width=\maxwidth]{figure/unnamed-chunk-4-1} 
your name's avatar
your name committed

\end{knitrout}

\subsection{subsetR}

mcariou's avatar
mcariou committed
Just another representation of the same result, for now, I focuse on the gene positive in 3 methodes for DGINN analysis.
your name's avatar
your name committed

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlkwd{library}\hlstd{(UpSetR)}
\hlstd{upsetdata}\hlkwb{<-}\hlkwd{as.data.frame}\hlstd{(tab}\hlopt{$}\hlstd{Gene.name)}
\hlstd{upsetdata}\hlopt{$}\hlstd{primates_young}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(tab}\hlopt{$}\hlstd{pVal.M8vsM7}\hlopt{<}\hlnum{0.05}\hlstd{,} \hlnum{1}\hlstd{,} \hlnum{0}\hlstd{)}

\hlcom{###}
\hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnyoungtmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}
\hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(dginnfulltmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)}

\hlkwd{upset}\hlstd{(}\hlkwd{na.omit}\hlstd{(upsetdata),} \hlkwc{nsets} \hlstd{=} \hlnum{3}\hlstd{,} \hlkwc{matrix.color} \hlstd{=} \hlstr{"#DC267F"}\hlstd{,}
\hlkwc{main.bar.color} \hlstd{=} \hlstr{"#648FFF"}\hlstd{,} \hlkwc{sets.bar.color} \hlstd{=} \hlstr{"#FE6100"}\hlstd{)}
\end{alltt}
\end{kframe}
\includegraphics[width=\maxwidth]{figure/subsetprimates-1} 

\end{knitrout}

\section{Gene List}


mcariou's avatar
mcariou committed
List of the 34 genes found under positive selection in all analysis.
your name's avatar
your name committed
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{TRUE}\hlstd{)]}
\end{alltt}
\begin{verbatim}
##  [1] ACADM     ATE1      BCS1L     BRD4      CDK5RAP2  CEP68    
##  [7] CNTRL     DNMT1     EDEM3     FYCO1     GCC2      GHITM    
## [13] GIGYF2    GOLGB1    GORASP1   ITGB1     MDN1      MPHOSPH10
## [19] MRPS5     NDUFAF2   PCNT      PLAT      POLA1     PRIM2    
## [25] PVR       SAAL1     SEPSECS   SIRT5     SLC25A21  SLC27A2  
## [31] TOR1AIP1  UGGT2     USP54     ZNF318   
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
\end{verbatim}
\end{kframe}
\end{knitrout}
your name's avatar
your name committed

mcariou's avatar
mcariou committed

List of the 13 genes found under positive selection in both Young analysis and DGINN-Young alignments (but not full-DGINN).
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{FALSE}\hlstd{)]}
your name's avatar
your name committed
\end{alltt}
\begin{verbatim}
mcariou's avatar
mcariou committed
##  [1] ABCC1   ALG8    CEP250  CEP350  ERLEC1  FASTKD5 GOLGA2  MRPS27 
##  [9] NINL    PDE4DIP PRRC2B  RAB18   WFS1   
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
your name's avatar
your name committed
\end{verbatim}
mcariou's avatar
mcariou committed
\end{kframe}
\end{knitrout}
List of the 1 gene found under positive selection in both DGINN analysis, but not Young.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
your name's avatar
your name committed
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{TRUE}\hlstd{)]}
your name's avatar
your name committed
\end{alltt}
\begin{verbatim}
mcariou's avatar
mcariou committed
## [1] MARK1
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
your name's avatar
your name committed
\end{verbatim}
mcariou's avatar
mcariou committed
\end{kframe}
\end{knitrout}
List of the 8 genes found under positive selection in both Young analysis and full-DGINN, but not DGINN-young.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
your name's avatar
your name committed
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{TRUE}\hlstd{)]}
your name's avatar
your name committed
\end{alltt}
mcariou's avatar
mcariou committed
\begin{verbatim}
## [1] <NA>    LMAN2   NDUFB9  RIPK1   STOM    TMEM39B TRMT1   UBAP2  
## [9] VPS39  
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
\end{verbatim}
your name's avatar
your name committed
\end{kframe}
\end{knitrout}



mcariou's avatar
mcariou committed
List of the 18 genes found under positive selection ONLY in Young analysis.
your name's avatar
your name committed
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
mcariou's avatar
mcariou committed
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{FALSE}\hlstd{)]}
\end{alltt}
\begin{verbatim}
##  [1] AKAP9    ALG11    ALG5     C19orf52 CENPF    CHMP2A   COLGALT1
##  [8] DCTPP1   DDX21    FBN1     FBXL12   JAKMIP1  <NA>     NLRX1   
## [15] NUP210   NUP98    PCSK6    PUSL1    ZYG11B  
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
\end{verbatim}
\end{kframe}
\end{knitrout}
List of the 1 genes found under positive selection ONLY in DGINN-Young.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{TRUE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{FALSE}\hlstd{)]}
\end{alltt}
\begin{verbatim}
## [1] FBN2
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
\end{verbatim}
\end{kframe}
\end{knitrout}
List of the 44 genes found under positive selection ONLY in full-DGINN.
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{upsetdata}\hlopt{$}\hlstd{`tab$Gene.name`[(upsetdata}\hlopt{$}\hlstd{primates_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_young}\hlopt{==}\hlnum{FALSE} \hlopt{&}
                             \hlstd{upsetdata}\hlopt{$}\hlstd{primates_dginn_full}\hlopt{==}\hlnum{TRUE}\hlstd{)]}
\end{alltt}
\begin{verbatim}
##  [1] ADAM9    <NA>     AP2A2    <NA>     <NA>     BZW2     <NA>    
##  [8] CEP135   CLIP4    DPH5     EIF4E2   EMC1     ERO1LB   EXOSC2  
## [15] GGH      GLA      GOLGA7   HDAC2    HECTD1   HS6ST2   IDE     
## [22] <NA>     LARP1    LARP4B   LARP7    <NA>     MIPOL1   MOV10   
## [29] MYCBP2   NAT14    NGLY1    NPC2     NUPL1    PITRM1   PLOD2   
## [36] PMPCB    POR      PRKAR2A  PTBP2    RAB14    RAB1A    RAB2A   
## [43] RAP1GDS1 RBX1     REEP6    RPL36    SCCPDH   <NA>     <NA>    
mcariou's avatar
mcariou committed
## [50] TIMM8B   TRIM59   TUBGCP2  <NA>    
mcariou's avatar
mcariou committed
## 332 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACSL3 ADAM9 ... ZYG11B
\end{verbatim}
\end{kframe}
\end{knitrout}