Commit 4ae96549 authored by Beatriz Vicoso's avatar Beatriz Vicoso
Browse files

Update dNdS.md

parent c0861451
......@@ -72,6 +72,42 @@ cat dS_ab/KaKs/* | cut -f 1,2,4,7 | grep 'NG' | perl -pi -e 's/-/\t/gi' > dS_ab_
In R:
```
par(mfrow=c(1,2))
#Panel1:
par( mar=c(0,0,0,0))
plot(0,type='n',axes=FALSE,ann=FALSE, ylim=c(0,10), xlim=c(0,10))
cola<-"#1F78B4"
colb<-"#33A02C"
colab<-"#FB9A99"
xstart <-1
xend<-6
xmid=(xstart+xend)/2
ystart <-5
yend<-8
yend2<-(ystart-(yend-ystart))
ymid=(yend + yend2)/2
segments(xstart, ystart,xend, yend)
segments(xstart, ystart,xend, yend2)
segments(xmid, (ystart+yend)/2,xend,ymid)
text(xend+1.5,yend, "Barb")
text(xend+1.5, ymid, "Carp SubB")
text(xend+1.5,yend2, "Carp SubA")
segments(xstart-0.3, ystart,xend, yend+0.2, col=cola, lwd=3)
segments(xstart-0.3, ystart,xend, yend2-0.2, col=cola, lwd=3)
segments(xstart+0.3, ystart,xend, yend2+0.2, col=colab, lwd=3)
segments(xstart+0.3, ystart, xmid, ((ystart+yend)/2)-0.2, col=colab, lwd=3)
segments(xmid, ((ystart+yend)/2)-0.2, xend, ymid-0.2, col=colab, lwd=3)
segments(xmid+0.3, ((ystart+yend)/2), xend, ymid+0.2, col=colb, lwd=3)
segments(xmid+0.3, ((ystart+yend)/2), xend, yend-0.2, col=colb, lwd=3)
#Panel 2: ds
minL<-0
dsa<-read.table("~/Documents/Will/Carp/Carp2022/4-dNdS/dS_a_NG.txt", head=F, sep="\t", fill=T)
......@@ -98,4 +134,5 @@ lines(density(dsab$dSab), col="#FB9A99", lwd=2)
#abline(v=median(dsa$dSa, na.rm=T), col="#1F78B4")
#abline(v=median(dsb$dSb, na.rm=T), col="#33A02C")
#abline(v=median(dsab$dSab, na.rm=T), col="#FB9A99")
```
Supports Markdown
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