Skip to content
Snippets Groups Projects
Commit 040507e4 authored by mcariou's avatar mcariou
Browse files

add column in alldginn

parent 60b706f7
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
No preview for this file type
...@@ -1066,9 +1066,11 @@ TMPRSS2 in bats ...@@ -1066,9 +1066,11 @@ TMPRSS2 in bats
\begin{alltt} \begin{alltt}
\hlcom{# keeping the uncut one} \hlcom{# keeping the uncut one}
\hlcom{# renaming the other one TMPRSS2_cut} \hlcom{# renaming the other one TMPRSS2_cut}
\hlstd{dginnbats[dginnbats}\hlopt{$}\hlstd{bats.File}\hlopt{==}\hlstr{"TMPRSS2_bat_select_cut_mafft_prank"}\hlstd{,}\hlstr{"Gene.name"}\hlstd{]}\hlkwb{<-}\hlstr{"TMPRSS2_cut"} \hlstd{dginnbats[dginnbats}\hlopt{$}\hlstd{bats_File}\hlopt{==}\hlstr{"TMPRSS2_bat_select_cut_mafft_prank"}\hlstd{,}\hlstr{"Gene.name"}\hlstd{]}\hlkwb{<-}\hlstr{"TMPRSS2_cut"}
\end{alltt} \end{alltt}
\end{kframe}
{\ttfamily\noindent\color{warningcolor}{\#\# Warning in `[<-.factor`(`*tmp*`, iseq, value = "{}TMPRSS2\_cut"{}): invalid factor level, NA generated}}\end{kframe}
\end{knitrout} \end{knitrout}
RIPK1: ANcestral version kept, suppress it "RIPK1\_sequences\_filtered\_longestORFs\_mafft\_mincov\_prank" RIPK1: ANcestral version kept, suppress it "RIPK1\_sequences\_filtered\_longestORFs\_mafft\_mincov\_prank"
...@@ -1119,7 +1121,8 @@ GNG5 ...@@ -1119,7 +1121,8 @@ GNG5
\end{verbatim} \end{verbatim}
\begin{alltt} \begin{alltt}
\hlcom{# genes in common} \hlcom{# genes in common}
\hlstd{dginnT}\hlopt{$}\hlstd{Gene.name[dginnT}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name]} \hlstd{common}\hlkwb{<-}\hlstd{dginnT}\hlopt{$}\hlstd{Gene.name[dginnT}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name]}
\hlstd{common}
\end{alltt} \end{alltt}
\begin{verbatim} \begin{verbatim}
## [1] "AAR2" "AASS" "AATF" "ABCC1" "ACAD9" ## [1] "AAR2" "AASS" "AATF" "ABCC1" "ACAD9"
...@@ -1196,7 +1199,8 @@ GNG5 ...@@ -1196,7 +1199,8 @@ GNG5
\end{verbatim} \end{verbatim}
\begin{alltt} \begin{alltt}
\hlcom{# genes only in primates} \hlcom{# genes only in primates}
\hlstd{dginnT}\hlopt{$}\hlstd{Gene.name[(dginnT}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{]} \hlstd{onlyprimates}\hlkwb{<-}\hlstd{dginnT}\hlopt{$}\hlstd{Gene.name[(dginnT}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{]}
\hlstd{onlyprimates}
\end{alltt} \end{alltt}
\begin{verbatim} \begin{verbatim}
## [1] "ADAM9[0-3120]" "ADAM9[3119-3927]" "ATP5MGL" ## [1] "ADAM9[0-3120]" "ADAM9[3119-3927]" "ATP5MGL"
...@@ -1238,7 +1242,8 @@ GNG5 ...@@ -1238,7 +1242,8 @@ GNG5
\end{verbatim} \end{verbatim}
\begin{alltt} \begin{alltt}
\hlcom{# genes only in bats} \hlcom{# genes only in bats}
\hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name[(dginnbats}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnT}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{]} \hlstd{onlybats}\hlkwb{<-}\hlstd{dginnbats}\hlopt{$}\hlstd{Gene.name[(dginnbats}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnT}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{]}
\hlstd{onlybats}
\end{alltt} \end{alltt}
\begin{verbatim} \begin{verbatim}
## [1] "ADAM9[0-2769]" "ADAM9[2768-3030]" "ARL6IP6" ## [1] "ADAM9[0-2769]" "ADAM9[2768-3030]" "ARL6IP6"
...@@ -1250,16 +1255,45 @@ GNG5 ...@@ -1250,16 +1255,45 @@ GNG5
## [19] "SIGMAR1" "SLC44A2[0-2820]" "SLC44A2[2819-3792]" ## [19] "SIGMAR1" "SLC44A2[0-2820]" "SLC44A2[2819-3792]"
## [22] "TLE5" "USP13" "ZC3H18[0-1101]" ## [22] "TLE5" "USP13" "ZC3H18[0-1101]"
## [25] "ZC3H18[1100-3678]" "FGFR1OP" "ELOB" ## [25] "ZC3H18[1100-3678]" "FGFR1OP" "ELOB"
## [28] "REEP6_like" "SELENOS" ## [28] "REEP6_like" "SELENOS" NA
\end{verbatim} \end{verbatim}
\begin{alltt} \begin{alltt}
\hlkwd{length}\hlstd{(dginnbats}\hlopt{$}\hlstd{Gene.name[(dginnbats}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnT}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{])} \hlkwd{length}\hlstd{(dginnbats}\hlopt{$}\hlstd{Gene.name[(dginnbats}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{dginnT}\hlopt{$}\hlstd{Gene.name)}\hlopt{==}\hlnum{FALSE}\hlstd{])}
\end{alltt} \end{alltt}
\begin{verbatim} \begin{verbatim}
## [1] 29 ## [1] 30
\end{verbatim} \end{verbatim}
\end{kframe} \end{kframe}
\end{knitrout} \end{knitrout}
\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}
\begin{alltt}
\hlstd{tab}\hlkwb{<-}\hlkwd{merge}\hlstd{(dginnT, dginnbats,} \hlkwc{by}\hlstd{=}\hlstr{"Gene.name"}\hlstd{,} \hlkwc{all.x}\hlstd{=T,} \hlkwc{all.y}\hlstd{=T)}
\hlkwd{dim}\hlstd{(tab)}
\end{alltt}
\begin{verbatim}
## [1] 442 55
\end{verbatim}
\begin{alltt}
\hlcom{# add column "shared"/"only bats"/"only primates"}
\hlstd{tab}\hlopt{$}\hlstd{status}\hlkwb{<-}\hlstr{""}
\hlstd{tab}\hlopt{$}\hlstd{status[tab}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{common]}\hlkwb{<-}\hlstr{"shared"}
\hlstd{tab}\hlopt{$}\hlstd{status[tab}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{onlyprimates]}\hlkwb{<-}\hlstr{"onlyprimates"}
\hlstd{tab}\hlopt{$}\hlstd{status[tab}\hlopt{$}\hlstd{Gene.name} \hlopt{%in%} \hlstd{onlybats]}\hlkwb{<-}\hlstr{"onlybats"}
\hlkwd{table}\hlstd{(tab}\hlopt{$}\hlstd{status)}
\end{alltt}
\begin{verbatim}
##
## onlybats onlyprimates shared
## 30 89 323
\end{verbatim}
\begin{alltt}
\hlkwd{write.table}\hlstd{(tab,} \hlstr{"covid_comp_alldginn.txt"}\hlstd{,} \hlkwc{sep}\hlstd{=}\hlstr{"\textbackslash{}t"}\hlstd{)}
\end{alltt}
\end{kframe}
\end{knitrout}
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment