Displaying 2 results from an estimated 2 matches for "sca_position".
Did you mean:
can_position
2011 Nov 21
1
coverage plot
Hi,
I'm very beginner for R but I think it is a time to start as it is very useful.
I have a coverage read file (illusmp454merCbed) for whole genome ~ 450 Mbp. This is head of this file.
Scaffold sca_position coverage
Scaffold1 1 0
Scaffold1 2 0
Scaffold1 3 0
Scaffold1 4 0
Scaffold1 5 0
Scaffold1 6 0
Scaffold1 7 1
Scaffold1 8 3
Scaffold1 9 3
I would like to plot everage coverage for every 1 kbp for whole genome. May I use R as below? Should I use IRanges?
data <-read.table(file="~/q20snpref/il...
2011 Nov 26
1
plot xy data
...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...