Entering edit mode
I have some difficulty debugging the error cn.mops gives me below. I checked my bed file does not have start values larger than end abd neither in my gr file there are any negative values. Any idea how to solve this?
> resCNMOPS <- exomecn.mops(bamDataRanges)
Normalizing...
Starting local modeling, please be patient...
Reference sequence: chr1
Reference sequence: chr2
Reference sequence: chr3
Reference sequence: chr4
Reference sequence: chr5
Reference sequence: chr6
Reference sequence: chr7
Reference sequence: chr8
Reference sequence: chr9
Reference sequence: chr10
Reference sequence: chr11
Reference sequence: chr12
Reference sequence: chr13
Reference sequence: chr14
Reference sequence: chr15
Reference sequence: chr16
Reference sequence: chr17
Reference sequence: chr18
Reference sequence: chr19
Reference sequence: chr20
Reference sequence: chr21
Reference sequence: chr22
Reference sequence: chrX
Reference sequence: chrY
Starting segmentation algorithm...
Using "fastseg" for segmentation.
Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") :
In range 21: 'end' must be >= 'start' - 1.
Thanks for your comment. I solved the problem. Apparently the bed file was not sorted. After I sorted it works perfectly.