QLD_CHIP<-c(142895,149526,155193,155610,164662,168769,169609,170729,169241,172385,177513,173567,178096,181418,186013,195723,199170,200409,197192,191028,188799,184114,182193,181104,182006,183938,183813,184546,184616,182080,181256,181534,180623,178595,180451,182828,181123,179715,179126,179257,181423,174695,173114,171672,171142,169651,168543,170835,169829,168587,167115,165686,163432,163171,162674,160883,159757,158180,157840,154840,154966,153341,152057,150515,150420,149438,149064,147403,147379,146380,144823,144444,142074,141274,140489,140699,140265,139650,138430,136444,134881,133764,132108,130984,131048,130408,129816,129240,128265,127688,126299,125337,123980,123599,122226,122347,121867,122158) QLD_CTRL<-c(136645,138438,140612,142086,143472,143896,144551,144752,146432,147487,148481,149365,150855,151546,153725,154719,156015,158434,159025,160435,162636,162926,165273,164897,166515,167966,169936,170119,171557,174087,173612,173885,174426,177156,176673,174622,178028,178665,178839,178744,186846,184535,183259,183465,186274,187620,187099,186486,188367,189357,187033,186604,187473,186079,185141,184757,183644,182436,181804,182984,183807,184261,184960,185114,183303,180587,173511,170584,168516,165867,167930,163735,160061,160050,159205,157862,154405,148366,148009,145718,140283,136290,135435,135300,135071,134560,134152,132431,132096,131320,131245,129798,129599,128007,127416,127152,126778,127405) Q_LENGTH<-c(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99) RL<-42 MAIN<-"SRR1175698" YMAX<-max(c(QLD_CHIP,QLD_CTRL)) YMIN<-min(c(QLD_CHIP,QLD_CTRL)) pdf("SRR1175698-Q-qfrag-binding-characteristics.pdf",height=3.4,width=6) par(mfrow=c(1,2)) QL_MAX<-Q_LENGTH[which(max(QLD_CHIP)==QLD_CHIP)] plot(Q_LENGTH,QLD_CTRL, type="l", xlab="qfrag length",ylab="# qfrags",ylim=c(YMIN,YMAX),col="darkgrey",main=MAIN) lines(Q_LENGTH,QLD_CHIP) abline(v=RL,lty=2,col="grey") abline(v=QL_MAX,lty=2) legend("topright",legend=c(paste("argmax(x)=",QL_MAX,sep="")),bg="white",bty="n",cex=0.7) QL_MAX<-Q_LENGTH[which(max(QLD_CHIP-QLD_CTRL)==QLD_CHIP-QLD_CTRL)] #plot(Q_LENGTH,QLD_CHIP-QLD_CTRL, type="l", xlab="qfrag length",ylab="# qfrags") QL_MIN<-Q_LENGTH[which(min(QLD_CHIP-QLD_CTRL)==QLD_CHIP-QLD_CTRL)] #plot(Q_LENGTH,QLD_CHIP-QLD_CTRL, type="l", xlab="qfrag length",ylab="# qfrags") plot(Q_LENGTH,QLD_CHIP-QLD_CTRL, type="l", xlab="qfrag length",ylab="# chip_qfrags - # psc_qfrags",main=MAIN,xlim=c(0,2*RL+10)) abline(h=0) abline(v=RL,lty=2,col="grey") abline(v=2*RL,lty=2,col="grey") abline(v=QL_MAX,lty=2) abline(v=min(QLD_CHIP-QLD_CTRL),lty=2) legend("topright",legend=c(paste("argmax(x)=",QL_MAX,sep="")),bg="white",bty="n",cex=0.7)