\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} \date{Janvier 2021} % Activate to display a given date or no date \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \begin{document} \maketitle \tableofcontents \newpage \section{Data} Analysis were formatted by the script covid\_comp\_script0\_table.Rnw. \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{workdir}\hlkwb{<-}\hlstr{"/home/adminmarie/Documents/CIRI_BIBS_projects/2020_05_Etienne_covid/"} \hlstd{tab}\hlkwb{<-}\hlkwd{read.delim}\hlstd{(}\hlkwd{paste0}\hlstd{(workdir,} \hlstr{"covid_comp/covid_comp_complete.txt"}\hlstd{),} \hlkwc{h}\hlstd{=T,} \hlkwc{sep}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{)} \hlkwd{dim}\hlstd{(tab)} \end{alltt} \end{kframe} \end{knitrout} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{workdir}\hlkwb{<-}\hlstr{"/home/adminmarie/Documents/CIRI_BIBS_projects/2020_05_Etienne_covid/"} \hlstd{tab}\hlkwb{<-}\hlkwd{read.delim}\hlstd{(}\hlkwd{paste0}\hlstd{(workdir,} \hlstr{"covid_comp/covid_comp_alldginn.txt"}\hlstd{),} \hlkwc{h}\hlstd{=T,} \hlkwc{sep}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{)} \hlkwd{dim}\hlstd{(tab)} \end{alltt} \begin{verbatim} ## [1] 442 56 \end{verbatim} \end{kframe} \end{knitrout} \section{Comparison of dataset} \subsection{Data} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{tmp}\hlkwb{<-}\hlkwd{na.omit}\hlstd{(tab[,}\hlkwd{c}\hlstd{(}\hlstr{"Gene.name"}\hlstd{,} \hlstr{"bats_BUSTED"}\hlstd{,} \hlstr{"bats_BppM1M2"}\hlstd{,} \hlstr{"bats_BppM7M8"}\hlstd{,} \hlstr{"bats_codemlM1M2"}\hlstd{,} \hlstr{"bats_codemlM7M8"}\hlstd{,} \hlstr{"dginn.primate_codemlM1M2"}\hlstd{,} \hlstr{"dginn.primate_codemlM7M8"}\hlstd{,} \hlstr{"dginn.primate_BppM1M2"}\hlstd{,} \hlstr{"dginn.primate_BppM7M8"}\hlstd{,} \hlstr{"dginn.primate_BUSTED"}\hlstd{)])} \hlstd{col}\hlkwb{<-}\hlkwd{c}\hlstd{(}\hlstr{"Gene.name"}\hlstd{,} \hlstr{"bats_BUSTED"}\hlstd{,} \hlstr{"bats_BppM1M2"}\hlstd{,} \hlstr{"bats_BppM7M8"}\hlstd{,} \hlstr{"bats_codemlM1M2"}\hlstd{,} \hlstr{"bats_codemlM7M8"}\hlstd{,} \hlstr{"dginn.primate_codemlM1M2"}\hlstd{,} \hlstr{"dginn.primate_codemlM7M8"}\hlstd{,} \hlstr{"dginn.primate_BppM1M2"}\hlstd{,} \hlstr{"dginn.primate_BppM7M8"}\hlstd{,} \hlstr{"dginn.primate_BUSTED"}\hlstd{)} \hlkwd{dim}\hlstd{(tmp)} \end{alltt} \begin{verbatim} ## [1] 323 11 \end{verbatim} \end{kframe} \end{knitrout} \subsection{Omega plot} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{x}\hlkwb{=}\hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstd{dginn.primate_omegaM0Bpp[tab}\hlopt{$}\hlstd{status}\hlopt{==}\hlstr{"shared"}\hlstd{]))} \end{alltt} {\ttfamily\noindent\color{warningcolor}{\#\# Warning: NAs introduits lors de la conversion automatique}}\begin{alltt} \hlstd{y}\hlkwb{=}\hlkwd{as.numeric}\hlstd{(}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstd{bats_omegaM0Bpp[tab}\hlopt{$}\hlstd{status}\hlopt{==}\hlstr{"shared"}\hlstd{]))} \end{alltt} {\ttfamily\noindent\color{warningcolor}{\#\# Warning: NAs introduits lors de la conversion automatique}}\begin{alltt} \hlkwd{names}\hlstd{(x)}\hlkwb{<-}\hlstd{tab}\hlopt{$}\hlstd{Gene.name[tab}\hlopt{$}\hlstd{status}\hlopt{==}\hlstr{"shared"}\hlstd{]} \hlkwd{plot}\hlstd{(x,y,} \hlkwc{xlab}\hlstd{=}\hlstr{"bpp omega primate"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"bpp omega bats"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{0.5}\hlstd{)} \hlkwd{abline}\hlstd{(}\hlnum{0}\hlstd{,}\hlnum{1}\hlstd{)} \hlkwd{abline}\hlstd{(}\hlkwd{lm}\hlstd{(y}\hlopt{~}\hlstd{x),} \hlkwc{col}\hlstd{=}\hlstr{"red"}\hlstd{)} \hlkwd{text}\hlstd{(x[x}\hlopt{>}\hlnum{0.5} \hlopt{&}\hlstd{y}\hlopt{<}\hlnum{0.4}\hlstd{], (y[x}\hlopt{>}\hlnum{0.5} \hlopt{&}\hlstd{y}\hlopt{<}\hlnum{0.4}\hlstd{]}\hlopt{+}\hlnum{0.01}\hlstd{),} \hlkwd{names}\hlstd{(x)[x}\hlopt{>}\hlnum{0.5} \hlopt{&}\hlstd{y}\hlopt{<}\hlnum{0.4}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.7}\hlstd{)} \hlkwd{text}\hlstd{(x[x}\hlopt{<}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.45}\hlstd{], (y[x}\hlopt{<}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.45}\hlstd{]}\hlopt{+}\hlnum{0.01}\hlstd{),} \hlkwd{names}\hlstd{(x)[x}\hlopt{<}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.45}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.7}\hlstd{)} \hlkwd{text}\hlstd{(x[x}\hlopt{>}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.4}\hlstd{], (y[x}\hlopt{>}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.4}\hlstd{]}\hlopt{+}\hlnum{0.01}\hlstd{),} \hlkwd{names}\hlstd{(x)[x}\hlopt{>}\hlnum{0.45} \hlopt{&}\hlstd{y}\hlopt{>}\hlnum{0.4}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.7}\hlstd{)} \end{alltt} \end{kframe} \includegraphics[width=\maxwidth]{figure/unnamed-chunk-3-1} \end{knitrout} \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{(tmp}\hlopt{$}\hlstd{Gene.name)} \hlstd{batstmp}\hlkwb{<-}\hlkwd{rowSums}\hlstd{(}\hlkwd{cbind}\hlstd{(tmp}\hlopt{$}\hlstd{bats_codemlM1M2}\hlopt{==}\hlstr{"Y"}\hlstd{, tmp}\hlopt{$}\hlstd{bats_codemlM7M8}\hlopt{==}\hlstr{"Y"}\hlstd{,} \hlstd{tmp}\hlopt{$}\hlstd{bats_BppM1M2}\hlopt{==}\hlstr{"Y"}\hlstd{, tmp}\hlopt{$}\hlstd{bats_BppM7M8}\hlopt{==}\hlstr{"Y"}\hlstd{, tmp}\hlopt{$}\hlstd{bats_BUSTED}\hlopt{==}\hlstr{"Y"}\hlstd{))} \hlstd{primatetmp}\hlkwb{<-}\hlkwd{rowSums}\hlstd{(}\hlkwd{cbind}\hlstd{(tmp}\hlopt{$}\hlstr{"dginn.primate_codemlM1M2"}\hlopt{==}\hlstr{"Y"}\hlstd{,} \hlstd{tmp}\hlopt{$}\hlstr{"dginn.primate_codemlM7M8"}\hlopt{==}\hlstr{"Y"}\hlstd{, tmp}\hlopt{$}\hlstr{"dginn.primate_BppM1M2"}\hlopt{==}\hlstr{"Y"}\hlstd{,} \hlstd{tmp}\hlopt{$}\hlstr{"dginn.primate_BppM7M8"}\hlopt{==}\hlstr{"Y"}\hlstd{, tmp}\hlopt{$}\hlstr{"dginn.primate_BUSTED"}\hlopt{==}\hlstr{"Y"}\hlstd{))} \hlstd{monddata}\hlopt{$}\hlstd{bats_dginn3}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(batstmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn3}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(primatetmp}\hlopt{>=}\hlnum{3}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)} \hlstd{monddata}\hlopt{$}\hlstd{bats_dginn4}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(batstmp}\hlopt{>=}\hlnum{4}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn4}\hlkwb{<-}\hlkwd{ifelse}\hlstd{(primatetmp}\hlopt{>=}\hlnum{4}\hlstd{,} \hlnum{1}\hlstd{,}\hlnum{0}\hlstd{)} \hlkwd{mondrian}\hlstd{(monddata[,}\hlnum{2}\hlopt{:}\hlnum{3}\hlstd{],} \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"DGINN bats >3"}\hlstd{,} \hlstr{"DGINN primate >3"}\hlstd{))} \end{alltt} \end{kframe} \includegraphics[width=\maxwidth]{figure/mondrianbats-1} \begin{kframe}\begin{alltt} \hlkwd{mondrian}\hlstd{(monddata[,}\hlnum{4}\hlopt{:}\hlnum{5}\hlstd{],} \hlkwc{labels}\hlstd{=}\hlkwd{c}\hlstd{(}\hlstr{"DGINN bats >4"}\hlstd{,} \hlstr{"DGINN primate >4"}\hlstd{))} \end{alltt} \end{kframe} \includegraphics[width=\maxwidth]{figure/mondrianbats-2} \end{knitrout} \subsection{subsetR} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlkwd{library}\hlstd{(UpSetR)} \hlkwd{upset}\hlstd{(monddata,} \hlkwc{nsets} \hlstd{=} \hlnum{4}\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/subsetbats-1} \begin{kframe}\begin{alltt} \hlkwd{upset}\hlstd{(monddata[,}\hlnum{1}\hlopt{:}\hlnum{3}\hlstd{],} \hlkwc{nsets} \hlstd{=} \hlnum{2}\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/subsetbats-2} \begin{kframe}\begin{alltt} \hlkwd{upset}\hlstd{(monddata[,}\hlkwd{c}\hlstd{(}\hlnum{1}\hlstd{,}\hlnum{4}\hlstd{,}\hlnum{5}\hlstd{)],} \hlkwc{nsets} \hlstd{=} \hlnum{2}\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/subsetbats-3} \end{knitrout} \section{Which are these genes?} \subsection{Gene under positive selection in both bats and primates} 4 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn4}\hlopt{==}\hlnum{1} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn4}\hlopt{==}\hlnum{1}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 6 ACADM 1 1 1 1 ## 7 ACE2 1 1 1 1 ## 109 GGH 1 1 1 1 ## 117 GOLGA7 1 1 1 1 ## 134 IDE 1 1 1 1 ## 139 ITGB1 1 1 1 1 ## 146 LMAN2 1 1 1 1 ## 212 POLA1 1 1 1 1 ## 263 SLC27A2 1 1 1 1 ## 301 TOR1AIP1 1 1 1 1 ## 314 VPS39 1 1 1 1 \end{verbatim} \end{kframe} \end{knitrout} 3 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn3}\hlopt{==}\hlnum{1} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn3}\hlopt{==}\hlnum{1}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 6 ACADM 1 1 1 1 ## 7 ACE2 1 1 1 1 ## 9 ADAM9 1 1 0 0 ## 34 CDK5RAP2 1 1 0 1 ## 71 EDEM3 1 1 1 0 ## 109 GGH 1 1 1 1 ## 117 GOLGA7 1 1 1 1 ## 134 IDE 1 1 1 1 ## 139 ITGB1 1 1 1 1 ## 146 LMAN2 1 1 1 1 ## 157 MIPOL1 1 1 0 1 ## 159 MOV10 1 1 0 0 ## 212 POLA1 1 1 1 1 ## 239 RAP1GDS1 1 1 1 0 ## 257 SCCPDH 1 1 0 0 ## 263 SLC27A2 1 1 1 1 ## 301 TOR1AIP1 1 1 1 1 ## 314 VPS39 1 1 1 1 \end{verbatim} \end{kframe} \end{knitrout} \subsection{Gene under positive selection only in primates} 4 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn4}\hlopt{==}\hlnum{0} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn4}\hlopt{==}\hlnum{1}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 31 BRD4 0 1 0 1 ## 34 CDK5RAP2 1 1 0 1 ## 37 CEP135 0 1 0 1 ## 40 CEP68 0 1 0 1 ## 47 CLIP4 0 1 0 1 ## 67 DNMT1 0 1 0 1 ## 68 DPH5 0 1 0 1 ## 75 EMC1 0 1 0 1 ## 80 ERO1B 0 1 0 1 ## 101 FYCO1 0 1 0 1 ## 105 GCC2 0 1 0 1 ## 110 GHITM 0 1 0 1 ## 111 GIGYF2 0 1 0 1 ## 112 GLA 0 1 0 1 ## 127 HECTD1 0 1 0 1 ## 143 LARP1 0 1 0 1 ## 144 LARP4B 0 1 0 1 ## 150 MARK1 0 1 0 1 ## 157 MIPOL1 1 1 0 1 ## 160 MPHOSPH10 0 1 0 1 ## 166 MYCBP2 0 1 0 1 ## 171 NDUFAF2 0 1 0 1 ## 172 NDUFB9 0 1 0 1 ## 187 NUP58 0 1 0 1 ## 195 PCNT 0 1 0 1 ## 218 PRIM2 0 1 0 1 ## 220 PRKAR2A 0 1 0 1 ## 227 PVR 0 1 0 1 ## 245 REEP6 0 1 0 1 ## 248 RIPK1 0 1 0 1 ## 253 SAAL1 0 1 0 1 ## 259 SEPSECS 0 1 0 1 ## 261 SIRT5 0 1 0 1 ## 262 SLC25A21 0 1 0 1 ## 296 TMEM39B 0 1 0 1 ## 298 TMPRSS2 0 1 0 1 ## 304 TUBGCP2 0 1 0 1 ## 307 UBAP2 0 1 0 1 ## 310 UGGT2 0 1 0 1 ## 321 ZNF318 0 1 0 1 \end{verbatim} \end{kframe} \end{knitrout} 3 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn3}\hlopt{==}\hlnum{0} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn3}\hlopt{==}\hlnum{1}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 19 AP2A2 0 1 0 0 ## 23 ATE1 0 1 0 0 ## 31 BRD4 0 1 0 1 ## 32 BZW2 0 1 0 0 ## 37 CEP135 0 1 0 1 ## 40 CEP68 0 1 0 1 ## 47 CLIP4 0 1 0 1 ## 48 CNTRL 0 1 0 0 ## 67 DNMT1 0 1 0 1 ## 68 DPH5 0 1 0 1 ## 72 EIF4E2 0 1 0 0 ## 75 EMC1 0 1 0 1 ## 80 ERO1B 0 1 0 1 ## 83 EXOSC2 0 1 0 0 ## 101 FYCO1 0 1 0 1 ## 105 GCC2 0 1 0 1 ## 110 GHITM 0 1 0 1 ## 111 GIGYF2 0 1 0 1 ## 112 GLA 0 1 0 1 ## 118 GOLGB1 0 1 0 0 ## 119 GORASP1 0 1 0 0 ## 125 HDAC2 0 1 0 0 ## 127 HECTD1 0 1 0 1 ## 131 HS6ST2 0 1 0 0 ## 143 LARP1 0 1 0 1 ## 144 LARP4B 0 1 0 1 ## 145 LARP7 0 1 0 0 ## 150 MARK1 0 1 0 1 ## 154 MDN1 0 1 0 0 ## 160 MPHOSPH10 0 1 0 1 ## 164 MRPS5 0 1 0 0 ## 166 MYCBP2 0 1 0 1 ## 168 NAT14 0 1 0 0 ## 171 NDUFAF2 0 1 0 1 ## 172 NDUFB9 0 1 0 1 ## 176 NGLY1 0 1 0 0 ## 181 NPC2 0 1 0 0 ## 187 NUP58 0 1 0 1 ## 195 PCNT 0 1 0 1 ## 202 PITRM1 0 1 0 0 ## 204 PLAT 0 1 0 0 ## 208 PLOD2 0 1 0 0 ## 210 PMPCB 0 1 0 0 ## 214 POR 0 1 0 0 ## 218 PRIM2 0 1 0 1 ## 220 PRKAR2A 0 1 0 1 ## 224 PTBP2 0 1 0 0 ## 227 PVR 0 1 0 1 ## 230 RAB14 0 1 0 0 ## 232 RAB1A 0 1 0 0 ## 233 RAB2A 0 1 0 0 ## 242 RBX1 0 1 0 0 ## 245 REEP6 0 1 0 1 ## 248 RIPK1 0 1 0 1 ## 250 RPL36 0 1 0 0 ## 253 SAAL1 0 1 0 1 ## 259 SEPSECS 0 1 0 1 ## 261 SIRT5 0 1 0 1 ## 262 SLC25A21 0 1 0 1 ## 277 STOM 0 1 0 0 ## 290 TIMM8B 0 1 0 0 ## 296 TMEM39B 0 1 0 1 ## 298 TMPRSS2 0 1 0 1 ## 302 TRIM59 0 1 0 0 ## 303 TRMT1 0 1 0 0 ## 304 TUBGCP2 0 1 0 1 ## 307 UBAP2 0 1 0 1 ## 310 UGGT2 0 1 0 1 ## 312 USP54 0 1 0 0 ## 321 ZNF318 0 1 0 1 \end{verbatim} \end{kframe} \end{knitrout} \subsection{Gene under positive selection only in bats} 4 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn4}\hlopt{==}\hlnum{1} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn4}\hlopt{==}\hlnum{0}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 14 AKAP9 1 0 1 0 ## 26 ATP6AP1 1 0 1 0 ## 44 CISD3 1 0 1 0 ## 71 EDEM3 1 1 1 0 ## 77 ERGIC1 1 0 1 0 ## 136 IMPDH2 1 0 1 0 ## 137 INHBE 1 0 1 0 ## 231 RAB18 1 0 1 0 ## 239 RAP1GDS1 1 1 1 0 ## 267 SLC44A2 1 0 1 0 ## 283 TBK1 1 0 1 0 \end{verbatim} \end{kframe} \end{knitrout} 3 methods: \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{monddata[monddata}\hlopt{$}\hlstd{bats_dginn3}\hlopt{==}\hlnum{1} \hlopt{&} \hlstd{monddata}\hlopt{$}\hlstd{primate_dginn3}\hlopt{==}\hlnum{0}\hlstd{,]} \end{alltt} \begin{verbatim} ## tmp$Gene.name bats_dginn3 primate_dginn3 bats_dginn4 primate_dginn4 ## 5 ACAD9 1 0 0 0 ## 11 AGPS 1 0 0 0 ## 14 AKAP9 1 0 1 0 ## 26 ATP6AP1 1 0 1 0 ## 44 CISD3 1 0 1 0 ## 49 COL6A1 1 0 0 0 ## 77 ERGIC1 1 0 1 0 ## 122 GRIPAP1 1 0 0 0 ## 123 GRPEL1 1 0 0 0 ## 136 IMPDH2 1 0 1 0 ## 137 INHBE 1 0 1 0 ## 151 MARK2 1 0 0 0 ## 185 NUP214 1 0 0 0 ## 217 PRIM1 1 0 0 0 ## 226 PUSL1 1 0 0 0 ## 231 RAB18 1 0 1 0 ## 266 SLC30A9 1 0 0 0 ## 267 SLC44A2 1 0 1 0 ## 268 SLC9A3R1 1 0 0 0 ## 283 TBK1 1 0 1 0 \end{verbatim} \end{kframe} \end{knitrout} \subsection{Figure tableau} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlstd{tablo}\hlkwb{<-}\hlkwd{as.data.frame}\hlstd{(tmp}\hlopt{$}\hlstd{Gene.name)} \hlstd{tablo}\hlopt{$}\hlstd{nbats}\hlkwb{<-}\hlstd{batstmp} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlkwb{<-}\hlstd{primatetmp} \hlkwd{plot}\hlstd{(}\hlkwa{NULL}\hlstd{,} \hlkwc{xlim}\hlstd{=}\hlkwd{c}\hlstd{(}\hlopt{-}\hlnum{0.5}\hlstd{,}\hlnum{5.5}\hlstd{),} \hlkwc{ylim}\hlstd{=}\hlkwd{c}\hlstd{(}\hlopt{-}\hlnum{3}\hlstd{,}\hlnum{5.5}\hlstd{),} \hlkwc{xlab}\hlstd{=}\hlstr{"bats"}\hlstd{,} \hlkwc{ylab}\hlstd{=}\hlstr{"primates"}\hlstd{,} \hlkwc{main}\hlstd{=}\hlstr{"Genes supported by x,y methods in bats and primates"}\hlstd{,} \hlkwc{bty}\hlstd{=}\hlstr{"n"}\hlstd{,} \hlkwc{xaxt}\hlstd{=}\hlstr{"n"}\hlstd{,} \hlkwc{yaxt}\hlstd{=}\hlstr{"n"}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwc{x}\hlstd{=}\hlkwd{rep}\hlstd{(}\hlopt{-}\hlnum{0.6}\hlstd{,} \hlnum{6}\hlstd{),} \hlkwc{y}\hlstd{=}\hlnum{0}\hlopt{:}\hlnum{5}\hlstd{,} \hlnum{0}\hlopt{:}\hlnum{5}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwc{y}\hlstd{=}\hlkwd{rep}\hlstd{(}\hlopt{-}\hlnum{0.65}\hlstd{,} \hlnum{6}\hlstd{),} \hlkwc{x}\hlstd{=}\hlnum{0}\hlopt{:}\hlnum{5}\hlstd{,} \hlnum{0}\hlopt{:}\hlnum{5}\hlstd{)} \hlkwd{sapply}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlopt{-}\hlnum{0.5}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{by}\hlstd{=}\hlnum{1}\hlstd{),} \hlkwa{function}\hlstd{(}\hlkwc{x}\hlstd{)\{} \hlkwd{segments}\hlstd{(}\hlkwc{x0}\hlstd{=x,} \hlkwc{x1}\hlstd{=x,} \hlkwc{y0}\hlstd{=}\hlopt{-}\hlnum{0.5}\hlstd{,} \hlkwc{y1}\hlstd{=}\hlnum{5.5}\hlstd{)} \hlstd{\})} \end{alltt} \begin{verbatim} ## [[1]] ## NULL ## ## [[2]] ## NULL ## ## [[3]] ## NULL ## ## [[4]] ## NULL ## ## [[5]] ## NULL ## ## [[6]] ## NULL ## ## [[7]] ## NULL \end{verbatim} \begin{alltt} \hlkwd{sapply}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlopt{-}\hlnum{0.5}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{by}\hlstd{=}\hlnum{1}\hlstd{),} \hlkwa{function}\hlstd{(}\hlkwc{x}\hlstd{)\{} \hlkwd{segments}\hlstd{(}\hlkwc{x0}\hlstd{=}\hlopt{-}\hlnum{0.5}\hlstd{,} \hlkwc{x1}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{y0}\hlstd{=x,} \hlkwc{y1}\hlstd{=x)} \hlstd{\})} \end{alltt} \begin{verbatim} ## [[1]] ## NULL ## ## [[2]] ## NULL ## ## [[3]] ## NULL ## ## [[4]] ## NULL ## ## [[5]] ## NULL ## ## [[6]] ## NULL ## ## [[7]] ## NULL \end{verbatim} \begin{alltt} \hlkwa{for} \hlstd{(p} \hlkwa{in} \hlnum{0}\hlopt{:}\hlnum{5}\hlstd{)\{} \hlkwa{for} \hlstd{(b} \hlkwa{in} \hlnum{0}\hlopt{:}\hlnum{5}\hlstd{)\{} \hlstd{tmp}\hlkwb{<-}\hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{nbats}\hlopt{==}\hlstd{b} \hlopt{&} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlopt{==}\hlstd{p]} \hlkwa{if}\hlstd{(}\hlkwd{length}\hlstd{(tmp)}\hlopt{>}\hlnum{0} \hlopt{&} \hlkwd{length}\hlstd{(tmp)}\hlopt{<=}\hlnum{8}\hlstd{)\{} \hlkwd{text}\hlstd{(b,}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=(p}\hlopt{-}\hlnum{0.4}\hlstd{),} \hlkwc{to}\hlstd{=(p}\hlopt{+}\hlnum{0.4}\hlstd{),} \hlkwc{length.out} \hlstd{=} \hlkwd{length}\hlstd{(tmp)), tmp,} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlstd{\}}\hlkwa{else if} \hlstd{(}\hlkwd{length}\hlstd{(tmp)}\hlopt{>}\hlnum{8} \hlopt{&} \hlkwd{length}\hlstd{(tmp)}\hlopt{<=}\hlnum{16}\hlstd{)\{} \hlkwd{print}\hlstd{(}\hlkwd{c}\hlstd{(p, b))} \hlkwd{text}\hlstd{((b}\hlopt{-}\hlnum{0.3}\hlstd{),}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=(p}\hlopt{-}\hlnum{0.4}\hlstd{),} \hlkwc{to}\hlstd{=(p}\hlopt{+}\hlnum{0.4}\hlstd{),} \hlkwc{length.out} \hlstd{=} \hlnum{8}\hlstd{), tmp[}\hlnum{1}\hlopt{:}\hlnum{8}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{((b}\hlopt{+}\hlnum{0.3}\hlstd{),}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=(p}\hlopt{-}\hlnum{0.4}\hlstd{),} \hlkwc{to}\hlstd{=(p}\hlopt{+}\hlnum{0.4}\hlstd{),} \hlkwc{length.out} \hlstd{= (}\hlkwd{length}\hlstd{(tmp)}\hlopt{-}\hlnum{8}\hlstd{)), tmp[}\hlnum{9}\hlopt{:}\hlkwd{length}\hlstd{(tmp)],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlstd{\}}\hlkwa{else if} \hlstd{(}\hlkwd{length}\hlstd{(tmp)}\hlopt{>}\hlnum{16}\hlstd{)\{} \hlkwd{text}\hlstd{(b,p,} \hlkwd{paste0}\hlstd{(}\hlkwd{length}\hlstd{(tmp),} \hlstr{" values"}\hlstd{))} \hlstd{\}} \hlstd{\}} \hlstd{\}} \end{alltt} \begin{verbatim} ## [1] 1 2 ## [1] 2 0 ## [1] 2 1 ## [1] 2 2 ## [1] 3 0 ## [1] 3 1 ## [1] 4 0 ## [1] 4 1 \end{verbatim} \begin{alltt} \hlstd{tmp}\hlkwb{<-}\hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{nbats}\hlopt{==}\hlnum{0} \hlopt{&} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlopt{==}\hlnum{1}\hlstd{]} \hlkwd{text}\hlstd{(}\hlopt{-}\hlnum{0.4}\hlstd{,}\hlopt{-}\hlnum{1.2}\hlstd{,} \hlstr{"p=1/n=0"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{0.6}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlnum{18}\hlstd{),}\hlopt{-}\hlnum{1.1}\hlstd{, tmp[}\hlnum{1}\hlopt{:}\hlnum{18}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlkwd{length}\hlstd{(tmp)}\hlopt{-}\hlnum{18}\hlstd{),}\hlopt{-}\hlnum{1.3}\hlstd{, tmp[}\hlnum{19}\hlopt{:}\hlkwd{length}\hlstd{(tmp)],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlstd{tmp}\hlkwb{<-}\hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{nbats}\hlopt{==}\hlnum{1} \hlopt{&} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlopt{==}\hlnum{1}\hlstd{]} \hlkwd{text}\hlstd{(}\hlopt{-}\hlnum{0.4}\hlstd{,}\hlopt{-}\hlnum{1.7}\hlstd{,} \hlstr{"p=1/n=1"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{0.6}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlnum{18}\hlstd{),}\hlopt{-}\hlnum{1.6}\hlstd{, tmp[}\hlnum{1}\hlopt{:}\hlnum{18}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{4.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlkwd{length}\hlstd{(tmp)}\hlopt{-}\hlnum{18}\hlstd{),}\hlopt{-}\hlnum{1.8}\hlstd{, tmp[}\hlnum{19}\hlopt{:}\hlkwd{length}\hlstd{(tmp)],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlstd{tmp}\hlkwb{<-}\hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{nbats}\hlopt{==}\hlnum{0} \hlopt{&} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlopt{==}\hlnum{0}\hlstd{]} \hlkwd{text}\hlstd{(}\hlopt{-}\hlnum{0.4}\hlstd{,}\hlopt{-}\hlnum{2.3}\hlstd{,} \hlstr{"p=0/n=0"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{0.6}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlnum{17}\hlstd{),}\hlopt{-}\hlnum{2.1}\hlstd{, tmp[}\hlnum{1}\hlopt{:}\hlnum{17}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlnum{17}\hlstd{),}\hlopt{-}\hlnum{2.3}\hlstd{, tmp[}\hlnum{18}\hlopt{:}\hlnum{34}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlkwd{length}\hlstd{(tmp)}\hlopt{-}\hlnum{34}\hlstd{),}\hlopt{-}\hlnum{2.5}\hlstd{, tmp[}\hlnum{35}\hlopt{:}\hlkwd{length}\hlstd{(tmp)],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlstd{tmp}\hlkwb{<-}\hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{nbats}\hlopt{==}\hlnum{2} \hlopt{&} \hlstd{tablo}\hlopt{$}\hlstd{nprimates}\hlopt{==}\hlnum{0}\hlstd{]} \hlkwd{text}\hlstd{(}\hlopt{-}\hlnum{0.4}\hlstd{,}\hlopt{-}\hlnum{2.9}\hlstd{,} \hlstr{"p=0/n=2"}\hlstd{,} \hlkwc{cex}\hlstd{=}\hlnum{0.6}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{5.5}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlnum{18}\hlstd{),}\hlopt{-}\hlnum{2.8}\hlstd{, tmp[}\hlnum{1}\hlopt{:}\hlnum{18}\hlstd{],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \hlkwd{text}\hlstd{(}\hlkwd{seq}\hlstd{(}\hlkwc{from}\hlstd{=}\hlnum{0.1}\hlstd{,} \hlkwc{to}\hlstd{=}\hlnum{1}\hlstd{,} \hlkwc{length.out} \hlstd{=} \hlkwd{length}\hlstd{(tmp)}\hlopt{-}\hlnum{18}\hlstd{),}\hlopt{-}\hlnum{3.0}\hlstd{, tmp[}\hlnum{19}\hlopt{:}\hlkwd{length}\hlstd{(tmp)],} \hlkwc{cex}\hlstd{=}\hlnum{0.4}\hlstd{)} \end{alltt} \end{kframe} \includegraphics[width=\maxwidth]{figure/tablo-1} \end{knitrout} \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlkwd{write.csv}\hlstd{(tablo[tablo}\hlopt{$}\hlstd{nbats}\hlopt{>=}\hlnum{3}\hlstd{,}\hlstr{"tmp$Gene.name"}\hlstd{],} \hlstr{"batssup3.csv"}\hlstd{,} \hlkwc{row.names}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{quote}\hlstd{=}\hlnum{FALSE}\hlstd{)} \hlkwd{write.csv}\hlstd{(tablo[tablo}\hlopt{$}\hlstd{nprimates}\hlopt{>=}\hlnum{3}\hlstd{,}\hlstr{"tmp$Gene.name"}\hlstd{],} \hlstr{"primatessup3.csv"}\hlstd{,} \hlkwc{row.names}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{quote}\hlstd{=}\hlnum{FALSE}\hlstd{)} \hlkwd{write.csv}\hlstd{(tablo,} \hlstr{"primatesVbats.csv"}\hlstd{,} \hlkwc{row.names}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{quote}\hlstd{=}\hlnum{FALSE}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} Restreindre ce tableau aux gènes présent dans l'analyse de Krogan. \begin{knitrout} \definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe} \begin{alltt} \hlcom{# Reading the Krogan table} \hlstd{tab}\hlkwb{<-}\hlkwd{read.delim}\hlstd{(}\hlkwd{paste0}\hlstd{(workdir,} \hlstr{"data/COVID_PAMLresults_332hits_plusBatScreens_2020_Apr14.csv"}\hlstd{),} \hlkwc{fill}\hlstd{=T,} \hlkwc{h}\hlstd{=T,} \hlkwc{dec}\hlstd{=}\hlstr{","}\hlstd{)} \hlkwd{dim}\hlstd{(tab)} \end{alltt} \begin{verbatim} ## [1] 332 84 \end{verbatim} \begin{alltt} \hlcom{#Formating the column Gene.name and changing one wierd name} \hlstd{tab}\hlopt{$}\hlstd{Gene.name}\hlkwb{<-}\hlkwd{as.character}\hlstd{(tab}\hlopt{$}\hlstd{Gene.name)} \hlstd{tab}\hlopt{$}\hlstd{Gene.name[tab}\hlopt{$}\hlstd{PreyGene}\hlopt{==}\hlstr{"MTARC1"}\hlstd{]}\hlkwb{<-}\hlstr{"MTARC1"} \hlcom{#Adding ACE2 and TMPRSS2} \hlstd{krogan}\hlkwb{<-}\hlkwd{c}\hlstd{(tab}\hlopt{$}\hlstd{Gene.name,} \hlstr{"ACE2"}\hlstd{,} \hlstr{"TMPRSS2"}\hlstd{)} \hlcom{# The list} \hlkwd{length}\hlstd{(krogan)} \end{alltt} \begin{verbatim} ## [1] 334 \end{verbatim} \begin{alltt} \hlstd{krogan} \end{alltt} \begin{verbatim} ## [1] "PCNT" "PVR" "POLA1" "FASTKD5" "PRIM2" ## [6] "ITGB1" "CNTRL" "SIRT5" "CEP250" "MRPS5" ## [11] "CENPF" "TRMT1" "SAAL1" "CEP68" "NINL" ## [16] "AKAP9" "NDUFAF2" "GOLGB1" "UGGT2" "SEPSECS" ## [21] "ABCC1" "CDK5RAP2" "PDE4DIP" "ACADM" "PRRC2B" ## [26] "SLC25A21" "PUSL1" "NDUFB9" "TOR1AIP1" "MDN1" ## [31] "GCC2" "ERLEC1" "FYCO1" "GHITM" "GORASP1" ## [36] "USP54" "ATE1" "MRPS27" "VPS39" "CEP350" ## [41] "ALG11" "MPHOSPH10" "SLC27A2" "ALG8" "BCS1L" ## [46] "STOM" "NUP210" "GOLGA2" "EDEM3" "DCTPP1" ## [51] "GIGYF2" "UBAP2" "DDX21" "RAB18" "MARK1" ## [56] "PRIM1" "C19orf52" "ZNF318" "ALG5" "EXOSC3" ## [61] "UBXN8" "PABPC1" "LMAN2" "RIPK1" "JAKMIP1" ## [66] "TARS2" "NDUFAF1" "PCSK6" "ANO6" "SNIP1" ## [71] "DNMT1" "PRKAR2B" "PLEKHA5" "FKBP15" "KDELC2" ## [76] "FBN1" "NUP88" "ATP13A3" "TRIM59" "NPC2" ## [81] "MEPCE" "PLAT" "EXOSC8" "CEP135" "GCC1" ## [86] "MIPOL1" "YIF1A" "AASS" "GLA" "FAM162A" ## [91] "FBXL12" "EXOSC5" "NGDN" "ATP6AP1" "LARP7" ## [96] "SIL1" "NUP62" "NDFIP2" "COLGALT1" "ECSIT" ## [101] "EMC1" "AP3B1" "POLA2" "CLIP4" "SLU7" ## [106] "CLCC1" "ERO1LB" "ATP5L" "ERMP1" "HS6ST2" ## [111] "NUPL1" "EIF4H" "ZYG11B" "EXOSC2" "ADCK4" ## [116] "WFS1" "TAPT1" "SPG20" "NGLY1" "FAR2" ## [121] "CHMP2A" "NLRX1" "NUP214" "PIGO" "PITRM1" ## [126] "ATP1B1" "PPT1" "HYOU1" "TUBGCP2" "KDELC1" ## [131] "WHSC1" "GDF15" "NARS2" "AKAP8" "TBK1" ## [136] "BRD4" "GRIPAP1" "PRKAR2A" "MOGS" "SCAP" ## [141] "AATF" "BRD2" "FBN2" "AKAP8L" "OS9" ## [146] "SIGMAR1" "MTCH1" "LARP4B" "FAM134C" "ARL6IP6" ## [151] "RBM28" "MRPS2" "CEP112" "LARP1" "INHBE" ## [156] "AGPS" "MRPS25" "MTARC1" "F2RL1" "MFGE8" ## [161] "SLC9A3R1" "CWC27" "CYB5B" "MAP7D1" "IDE" ## [166] "PMPCA" "GGH" "QSOX2" "GNG5" "PKP2" ## [171] "PMPCB" "RRP9" "NIN" "CUL2" "ADAM9" ## [176] "TMEM39B" "RAB8A" "CYB5R3" "GPAA1" "TM2D3" ## [181] "COMT" "SLC30A9" "PLD3" "CHPF" "SRP19" ## [186] "FKBP7" "DDX10" "ATP6V1A" "AAR2" "VIMP" ## [191] "NAT14" "MYCBP2" "ERC1" "DCAF7" "FBLN5" ## [196] "CSDE1" "TCEB1" "RAB14" "BZW2" "VPS11" ## [201] "CIT" "SLC30A6" "DPY19L1" "RTN4" "AP2M1" ## [206] "RNF41" "TOR1A" "PSMD8" "SLC44A2" "MOV10" ## [211] "RAB10" "NEU1" "MIB1" "TYSND1" "USP13" ## [216] "ZC3H7A" "IMPDH2" "DNAJC11" "NEK9" "PLEKHF2" ## [221] "IL17RA" "GNB1" "GRPEL1" "ARF6" "FKBP10" ## [226] "PABPC4" "HMOX1" "FOXRED2" "NOL10" "SRP72" ## [231] "ZDHHC5" "PTGES2" "TMED5" "HOOK1" "POFUT1" ## [236] "SUN2" "ERP44" "PRKACA" "GOLGA3" "ADAMTS1" ## [241] "CSNK2B" "THTPA" "PIGS" "RBM41" "C1orf50" ## [246] "TMEM97" "RAB2A" "STC2" "SMOC1" "FAM98A" ## [251] "INTS4" "RAB7A" "HECTD1" "STOML2" "POR" ## [256] "CSNK2A2" "HS2ST1" "DCAKD" "SRP54" "SDF2" ## [261] "ZNF503" "SBNO1" "RAE1" "TUBGCP3" "UPF1" ## [266] "ERGIC1" "TLE1" "TOMM70A" "KIAA1033" "DPH5" ## [271] "UBAP2L" "CHPF2" "GFER" "TIMM8B" "RAB5C" ## [276] "GOLGA7" "TIMM10" "HSBP1" "BCKDK" "ACSL3" ## [281] "PDZD11" "GGCX" "RALA" "LOX" "TBKBP1" ## [286] "CCDC86" "NUP98" "SCCPDH" "SCARB1" "CRTC3" ## [291] "ETFA" "FGFR1OP" "SLC30A7" "HEATR3" "COL6A1" ## [296] "RDX" "G3BP1" "TCF12" "ZC3H18" "G3BP2" ## [301] "AP2A2" "PLOD2" "MARK2" "TIMM9" "TIMM10B" ## [306] "RHOA" "REEP5" "REEP6" "FAM8A1" "PPIL3" ## [311] "TLE3" "AES" "RAP1GDS1" "HDAC2" "GTF2F2" ## [316] "NUP54" "MAT2B" "TCEB2" "MARK3" "PTBP2" ## [321] "RPL36" "TBCA" "NUTF2" "EIF4E2" "GPX1" ## [326] "RAB1A" "DNAJC19" "RBX1" "CISD3" "NPTX1" ## [331] "BAG5" "ACAD9" "ACE2" "TMPRSS2" \end{verbatim} \begin{alltt} \hlcom{#In the table, I select line that match the krogan gene name liste} \hlstd{tabloK}\hlkwb{<-}\hlstd{tablo[tablo}\hlopt{$}\hlstd{`tmp$Gene.name`} \hlopt{%in%} \hlstd{krogan,]} \hlcom{# How many gene lost?} \hlkwd{dim}\hlstd{(tablo)} \end{alltt} \begin{verbatim} ## [1] 323 3 \end{verbatim} \begin{alltt} \hlkwd{dim}\hlstd{(tabloK)} \end{alltt} \begin{verbatim} ## [1] 311 3 \end{verbatim} \begin{alltt} \hlcom{# Les gènes perdus (dans le tableau mais pas dans la liste de Krogan)} \hlkwd{sort}\hlstd{(tablo}\hlopt{$}\hlstd{`tmp$Gene.name`[tablo}\hlopt{$}\hlstd{`tmp$Gene.name`} \hlopt{%in%} \hlstd{krogan}\hlopt{==}\hlstd{F])} \end{alltt} \begin{verbatim} ## [1] COQ8B ELOC ERO1B MARC1 NSD2 NUP58 PCSK5 RETREG3 ## [9] SPART TIMM29 TOMM70 WASHC4 ## 442 Levels: AAR2 AASS AATF ABCC1 ACAD9 ACADM ACE2 ACSL3 ... ZYG11B \end{verbatim} \begin{alltt} \hlcom{# Les gènes de Krogan non présent dans cette liste} \hlkwd{sort}\hlstd{(krogan[krogan} \hlopt{%in%} \hlstd{tablo}\hlopt{$}\hlstd{`tmp$Gene.name`}\hlopt{==}\hlstd{F])} \end{alltt} \begin{verbatim} ## [1] "ADCK4" "AES" "ARL6IP6" "ATP5L" "BCS1L" "C19orf52" ## [7] "C1orf50" "CYB5R3" "ERO1LB" "FAM134C" "FGFR1OP" "KIAA1033" ## [13] "MFGE8" "MTARC1" "NUPL1" "SIGMAR1" "SPG20" "TCEB1" ## [19] "TCEB2" "TOMM70A" "USP13" "VIMP" "WHSC1" \end{verbatim} \begin{alltt} \hlkwd{write.csv}\hlstd{(tabloK,} \hlstr{"primatesVbats_onlykrogan.csv"}\hlstd{,} \hlkwc{row.names}\hlstd{=}\hlnum{FALSE}\hlstd{,} \hlkwc{quote}\hlstd{=}\hlnum{FALSE}\hlstd{)} \end{alltt} \end{kframe} \end{knitrout} \end{document}