Commit 1965efb5 authored by mcariou's avatar mcariou
Browse files

rerun dataset

parent eabf7ce7
......@@ -15,7 +15,7 @@
\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
\date{March 2021} % Activate to display a given date or no date
\begin{document}
\maketitle
......@@ -28,19 +28,18 @@
Analysis were formatted by the script covid\_comp\_script0\_table.Rnw.
<<eval=FALSE>>=
workdir<-"/home/adminmarie/Documents/CIRI_BIBS_projects/2020_05_Etienne_covid/"
home<-"/home/adminmarie/Documents/"
workdir<-paste0(home, "CIRI_BIBS_projects/2020_05_Etienne_covid/")
tab<-read.delim(paste0(workdir,
"covid_comp/covid_comp_complete.txt"), h=T, sep="\t")
dim(tab)
@
<<>>=
workdir<-"/home/adminmarie/Documents/CIRI_BIBS_projects/2020_05_Etienne_covid/"
home<-"/home/adminmarie/Documents/"
workdir<-paste0(home, "CIRI_BIBS_projects/2020_05_Etienne_covid/")
tab<-read.delim(paste0(workdir,
"covid_comp/covid_comp_alldginn.txt"), h=T, sep="\t")
......@@ -52,31 +51,42 @@ dim(tab)
\subsection{Data}
<<data>>=
tmp<-na.omit(tab[,c("Gene.name", "bats_BUSTED", "bats_BppM1M2", "bats_BppM7M8",
"bats_codemlM1M2", "bats_codemlM7M8", "dginn.primate_codemlM1M2",
"dginn.primate_codemlM7M8", "dginn.primate_BppM1M2",
"dginn.primate_BppM7M8", "dginn.primate_BUSTED")])
col<-c("Gene.name", "bats_BUSTED", "bats_BppM1M2", "bats_BppM7M8",
"bats_codemlM1M2", "bats_codemlM7M8", "dginn.primate_codemlM1M2",
"dginn.primate_codemlM7M8", "dginn.primate_BppM1M2",
"dginn.primate_BppM7M8", "dginn.primate_BUSTED")
tmp<-na.omit(tab[,c("Gene.name", "bats_BUSTED", "bats_BppM1M2",
"bats_BppM7M8", "bats_codemlM1M2", "bats_codemlM7M8",
"dginn.primate_codemlM1M2", "dginn.primate_codemlM7M8",
"dginn.primate_BppM1M2", "dginn.primate_BppM7M8",
"dginn.primate_BUSTED")])
col<-c("Gene.name", "bats_BUSTED", "bats_BppM1M2",
"bats_BppM7M8", "bats_codemlM1M2", "bats_codemlM7M8",
"dginn.primate_codemlM1M2", "dginn.primate_codemlM7M8",
"dginn.primate_BppM1M2", "dginn.primate_BppM7M8",
"dginn.primate_BUSTED")
dim(tmp)
@
\subsection{Omega plot}
<<>>=
x=as.numeric(as.character(tab$dginn.primate_omegaM0Bpp[tab$status=="shared"]))
y=as.numeric(as.character(tab$bats_omegaM0Bpp[tab$status=="shared"]))
tab$dginn.primate_omegaM0Bpp[tab$dginn.primate_omegaM0Bpp=="na"]<-NA
x=as.numeric(as.character(
tab$dginn.primate_omegaM0Bpp[tab$status=="shared"]))
tab$bats_omegaM0Bpp[tab$bats_omegaM0Bpp=="na"]<-NA
y=as.numeric(as.character(
tab$bats_omegaM0Bpp[tab$status=="shared"]))
names(x)<-tab$Gene.name[tab$status=="shared"]
plot(x,y, xlab="bpp omega primate", ylab="bpp omega bats", cex=0.5)
abline(0,1)
abline(lm(y~x), col="red")
text(x[x>0.5 &y<0.4], (y[x>0.5 &y<0.4]+0.01), names(x)[x>0.5 &y<0.4], cex=0.7)
text(x[x<0.45 &y>0.45], (y[x<0.45 &y>0.45]+0.01), names(x)[x<0.45 &y>0.45], cex=0.7)
text(x[x>0.45 &y>0.4], (y[x>0.45 &y>0.4]+0.01), names(x)[x>0.45 &y>0.4], cex=0.7)
text(x[x>0.5 &y<0.4], (y[x>0.5 &y<0.4]+0.01),
names(x)[x>0.5 &y<0.4], cex=0.7)
text(x[x<0.45 &y>0.45], (y[x<0.45 &y>0.45]+0.01),
names(x)[x<0.45 &y>0.45], cex=0.7)
text(x[x>0.45 &y>0.4], (y[x>0.45 &y>0.4]+0.01),
names(x)[x>0.45 &y>0.4], cex=0.7)
@
......@@ -87,21 +97,28 @@ library(Mondrian)
monddata<-as.data.frame(tmp$Gene.name)
batstmp<-rowSums(cbind(tmp$bats_codemlM1M2=="Y", tmp$bats_codemlM7M8=="Y",
tmp$bats_BppM1M2=="Y", tmp$bats_BppM7M8=="Y", tmp$bats_BUSTED=="Y"))
primatetmp<-rowSums(cbind(tmp$"dginn.primate_codemlM1M2"=="Y",
tmp$"dginn.primate_codemlM7M8"=="Y", tmp$"dginn.primate_BppM1M2"=="Y",
tmp$"dginn.primate_BppM7M8"=="Y", tmp$"dginn.primate_BUSTED"=="Y"))
batstmp<-rowSums(cbind(tmp$bats_codemlM1M2=="Y",
tmp$bats_codemlM7M8=="Y",
tmp$bats_BppM1M2=="Y",
tmp$bats_BppM7M8=="Y",
tmp$bats_BUSTED=="Y"))
primatetmp<-rowSums(cbind(tmp$"dginn.primate_codemlM1M2"=="Y",
tmp$"dginn.primate_codemlM7M8"=="Y",
tmp$"dginn.primate_BppM1M2"=="Y",
tmp$"dginn.primate_BppM7M8"=="Y",
tmp$"dginn.primate_BUSTED"=="Y"))
monddata$bats_dginn3<-ifelse(batstmp>=3, 1,0)
monddata$primate_dginn3<-ifelse(primatetmp>=3, 1,0)
monddata$bats_dginn4<-ifelse(batstmp>=4, 1,0)
monddata$primate_dginn4<-ifelse(primatetmp>=4, 1,0)
mondrian(monddata[,2:3], labels=c("DGINN bats >3", "DGINN primate >3"))
mondrian(monddata[,2:3],
labels=c("DGINN bats >3", "DGINN primate >3"))
mondrian(monddata[,4:5], labels=c("DGINN bats >4", "DGINN primate >4"))
mondrian(monddata[,4:5],
labels=c("DGINN bats >4", "DGINN primate >4"))
@
......@@ -173,7 +190,11 @@ tablo<-as.data.frame(tmp$Gene.name)
tablo$nbats<-batstmp
tablo$nprimates<-primatetmp
plot(NULL, xlim=c(-0.5,5.5), ylim=c(-3,5.5), xlab="bats", ylab="primates", main="Genes supported by x,y methods in bats and primates", bty="n", xaxt="n", yaxt="n")
plot(NULL, xlim=c(-0.5,5.5), ylim=c(-3,5.5),
xlab="bats", ylab="primates",
main="Genes supported by x,y methods in bats and primates",
bty="n",
xaxt="n", yaxt="n")
text(x=rep(-0.6, 6), y=0:5, 0:5)
text(y=rep(-0.65, 6), x=0:5, 0:5)
......@@ -189,11 +210,14 @@ for (p in 0:5){
for (b in 0:5){
tmp<-tablo$`tmp$Gene.name`[tablo$nbats==b & tablo$nprimates==p]
if(length(tmp)>0 & length(tmp)<=8){
text(b,seq(from=(p-0.4), to=(p+0.4), length.out = length(tmp)), tmp, cex=0.4)
text(b,seq(from=(p-0.4), to=(p+0.4), length.out = length(tmp)),
tmp, cex=0.4)
}else if (length(tmp)>8 & length(tmp)<=16){
print(c(p, b))
text((b-0.3),seq(from=(p-0.4), to=(p+0.4), length.out = 8), tmp[1:8], cex=0.4)
text((b+0.3),seq(from=(p-0.4), to=(p+0.4), length.out = (length(tmp)-8)), tmp[9:length(tmp)], cex=0.4)
text((b-0.3),seq(from=(p-0.4), to=(p+0.4), length.out = 8),
tmp[1:8], cex=0.4)
text((b+0.3),seq(from=(p-0.4), to=(p+0.4), length.out = (length(tmp)-8)),
tmp[9:length(tmp)], cex=0.4)
}else if (length(tmp)>16){
text(b,p, paste0(length(tmp), " values"))
}
......@@ -203,13 +227,25 @@ for (p in 0:5){
tmp<-tablo$`tmp$Gene.name`[tablo$nbats==0 & tablo$nprimates==1]
text(-0.4,-1.2, "p=1/n=0", cex=0.6)
text(seq(from=0.1, to=5.5, length.out = 18),-1.1, tmp[1:18], cex=0.4)
text(seq(from=0.1, to=5.5, length.out = length(tmp)-18),-1.3, tmp[19:length(tmp)], cex=0.4)
text(seq(from=0.1, to=5.5, length.out = 18),
-1.1,
tmp[1:18],
cex=0.4)
text(seq(from=0.1, to=5.5, length.out = length(tmp)-18),
-1.3,
tmp[19:length(tmp)],
cex=0.4)
tmp<-tablo$`tmp$Gene.name`[tablo$nbats==1 & tablo$nprimates==1]
text(-0.4,-1.7, "p=1/n=1", cex=0.6)
text(seq(from=0.1, to=5.5, length.out = 18),-1.6, tmp[1:18], cex=0.4)
text(seq(from=0.1, to=4.5, length.out = length(tmp)-18),-1.8, tmp[19:length(tmp)], cex=0.4)
text(seq(from=0.1, to=5.5, length.out = 18),
-1.6,
tmp[1:18],
cex=0.4)
text(seq(from=0.1, to=4.5, length.out = length(tmp)-18),
-1.8,
tmp[19:length(tmp)],
cex=0.4)
tmp<-tablo$`tmp$Gene.name`[tablo$nbats==0 & tablo$nprimates==0]
......@@ -227,10 +263,16 @@ text(seq(from=0.1, to=1, length.out = length(tmp)-18),-3.0, tmp[19:length(tmp)],
@
<<>>=
write.csv(tablo[tablo$nbats>=3,"tmp$Gene.name"], "batssup3.csv", row.names=FALSE, quote=FALSE)
write.csv(tablo[tablo$nprimates>=3,"tmp$Gene.name"], "primatessup3.csv", row.names=FALSE, quote=FALSE)
write.csv(tablo, "primatesVbats.csv", row.names=FALSE, quote=FALSE)
write.csv(tablo[tablo$nbats>=3,"tmp$Gene.name"], "batssup3.csv",
row.names=FALSE,
quote=FALSE)
write.csv(tablo[tablo$nprimates>=3,"tmp$Gene.name"], "primatessup3.csv",
row.names=FALSE,
quote=FALSE)
write.csv(tablo, "primatesVbats.csv",
row.names=FALSE,
quote=FALSE)
@
Restreindre ce tableau aux gènes présent dans l'analyse de Krogan.
......
No preview for this file type
This diff is collapsed.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -257,6 +257,7 @@ SCAP,1,2
SCARB1,2,2
SCCPDH,3,3
SDF2,0,0
SELENOS,0,1
SEPSECS,2,5
SIL1,1,0
SIRT5,1,4
......
......@@ -254,6 +254,7 @@ SCAP,1,2
SCARB1,2,2
SCCPDH,3,3
SDF2,0,0
SELENOS,0,1
SEPSECS,2,5
SIL1,1,0
SIRT5,1,4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment