#Create a sinthetic dataset, simulating single-end reads, for positive and negative strands
pos = syntheticNucMap(nuc.len=40, lin.len=130)$syn.reads #Positive strand reads
neg = IRanges(end=start(pos)+147, width=40) #Negative strand (shifted 147bp)
sim = RangedData(c(pos, neg), strand=c(rep("+", length(pos)), rep("-", length(neg))))
#Detect fragment lenght (we know by construction it is really 147)
fragmentLenDetect(sim, samples=50)
#The function restrict the sampling to speed up the example
Run the code above in your browser using DataLab