Hi, Has anyone know about how to get the correct plot?
I have use this R script (as below), so I expect the plot is based on x axis, but the result was opposite. Any suggestion will be great. library(IRanges) data <-read.table(file="~/q20snpref/illusmp454merbed",sep="\t",header=F) colnames(data)<-c("Scaffold","sca_position","coverage") depth<-mean(data[,"coverage"]) #depth now has the mean (overall)coverage #set the bin-size window<-10001 rangefrom<-0 rangeto<-length(data[,"sca_position"]) data.10kb<-runmed(data[,"coverage"],k=window) png(file="cov_10k.png",width=1000,height=1000) plot(x=data.10kb[rangefrom:rangeto],y=data[rangefrom:rangeto,"sca_position"],pch=".",cex=1,xlab="depth",ylab="bp_position",type="p") dev.off() Best regards, Sutada ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.