代码拉取完成,页面将自动刷新
op <-par(no.readonly = TRUE)
png("test_1000_480.png",width = 1000, height = 500, units = "px", pointsize = 12,bg = "white", res = NA)
par(mar=c(4,4,3,3))
fp <- read.table(file="f.txt",sep="\t",stringsAsFactors = FALSE,header = TRUE,check.names = FALSE)
readlen = 76
ym <- ceiling( max(fp$R1_UnmRate,fp$R1_ScRate,fp$R1_InsRate,fp$R1_SnvRate,fp$R1_TotalRate))
ym2 <- ceiling(max(fp$R2_UnmRate,fp$R2_ScRate,fp$R2_InsRate,fp$R2_SnvRate,fp$R2_TotalRate))
ym3 <-max(ym,ym2)
xm <- readlen *2
plot(NA,xlab="",ylab="",xlim=c(0,xm),xaxp=c(0,xm,xm),ylim = c(0,ym3),
yaxp=c(0,ym,ym))
x1 <- 1:readlen
x2 <- (readlen+1):xm
# 考虑一下lty和lwd的设置lty=c(1,1,1), # Line type
#lwd=c(1,1,1)
points(x1,fp$R1_TotalRate,type="b",pch=20,lty=2,lwd=1,col="#6666ff")
points(x1,fp$R1_UnmRate,type = "b",pch=3,lty=2,lwd=1,col="#66ffff")
points(x1,fp$R1_ScRate,type = "b",pch=1,lty=2, lwd=1,col="#66ff66")
points(x1,fp$R1_InsRate,type="b",pch=6,lty=2,lwd=1,col="#ff66b3")
points(x1,fp$R1_SnvRate,type="b",pch=0,lty=2,lwd=1,col="#55b679")
#points(x1,fp$R1_ScRate,type = "b",pch=23,lty=2, cex=2,col="#000099", bg="#FF6666")
abline(v=readlen,col="red",lty=2,lwd=2)
par(new=T)
points(x2,fp$R2_TotalRate,type="b",pch=20,lty=2,lwd=1,col="#6666ff")
points(x2,fp$R2_UnmRate,type = "b",pch=3,lty=2,lwd=1,col="#66ffff")
points(x2,fp$R2_ScRate,type = "b",pch=1,lty=2, lwd=1,col="#66ff66")
points(x2,fp$R2_InsRate,type="b",pch=6,lty=2,lwd=1,col="#ff66b3")
points(x2,fp$R2_SnvRate,type="b",pch=0,lty=2,lwd=1,col="#55b679")
#points(x2,fp$R2_TotalRate,type="b",pch=19,col="red")
#points(x2,fp$R2_UnmRate,type = "b",pch=0,lty=2,lwd=3,col="blue")
#points(x2,fp$R1_ScRate,type = "b",pch=23,lty="dotted", cex=2,col="#000099", bg="#FF6666")
axis(4)
#mtext("Read2 Mispair Rate%",4,line=3)
title(main="Read1(left) / Read2(right) Multi-Mispair Rate(%) ")
legend(1,ym2,legend = c("TotalMispair","Unmapped","SoftClip","Insertion","Mismatch"),
col=c("#6666ff","#66ffff","#66ff66","#ff66b3","#55b679"),lty=c(2,2,2,2,2),lwd=c(1,1,1,1,1)
,pch=c(20,3,1,6,0),bty = "n")
par(op)
dev.off()
#legend("topleft",legend = c("TotalMispair","Unmapped","SoftClip","Insertion","Mismatch"),
# col=c("#6666ff","#66ffff","#66ff66","#ff66b3","#55b679"),lty=c(2,2,2,2,2),lwd=c(1,1,1,1,1)
# ,pch=c(20,3,1,6,0),bty = "n")
#legend("topleft", # x-y coordinates for location of the legend
# legend=c("y1", "y2", "y3"), # Legend labels
# col=c("black", "red", "blue"), # Color of points or lines
# pch=c(21,19,19), # Point type
# lty=c(1,1,1), # Line type
## lwd=c(1,1,1), # Line width
# title="Time series")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。