Mercurial > repos > nilesh > rseqc
view test-data/output.DupRate_plot.r @ 54:5873cd7afb67 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit 62a9135bf04aec398d3172d17ccd60f5242d8e82
author | iuc |
---|---|
date | Wed, 13 Jun 2018 18:02:25 -0400 |
parents | 09846d5169fa |
children |
line wrap: on
line source
pdf('output.DupRate_plot.pdf') par(mar=c(5,4,4,5),las=0) seq_occ=c(1) seq_uniqRead=c(40) pos_occ=c(1) pos_uniqRead=c(40) plot(pos_occ,log10(pos_uniqRead),ylab='Number of Reads (log10)',xlab='Occurrence of read',pch=4,cex=0.8,col='blue',xlim=c(1,500),yaxt='n') points(seq_occ,log10(seq_uniqRead),pch=20,cex=0.8,col='red') ym=floor(max(log10(pos_uniqRead))) legend(300,ym,legend=c('Sequence-based','Mapping-based'),col=c('blue','red'),pch=c(4,20)) axis(side=2,at=0:ym,labels=0:ym) axis(side=4,at=c(log10(pos_uniqRead[1]),log10(pos_uniqRead[2]),log10(pos_uniqRead[3]),log10(pos_uniqRead[4])), labels=c(round(pos_uniqRead[1]*100/sum(pos_uniqRead*pos_occ)),round(pos_uniqRead[2]*100/sum(pos_uniqRead*pos_occ)),round(pos_uniqRead[3]*100/sum(pos_uniqRead*pos_occ)),round(pos_uniqRead[4]*100/sum(pos_uniqRead*pos_occ)))) mtext(4, text = "Reads %", line = 2) dev.off()