[BioC] Negative Width error in cn.mops

Susan VanderPlas srvanderplas at gmail.com
Wed Oct 2 22:35:43 CEST 2013


I've been having some difficulty debugging this particular error. When
running cn.mops on some soybean data, I get the following error
message:

res <- exomecn.mops(bamSegmentRanges[1:800,])
  Normalizing...
  Starting local modeling, please be patient...
  Reference sequence:  Gm18
  Reference sequence:  Gm20
  Starting segmentation algorithm...
  Using "fastseg" for segmentation.
  Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") :
    solving row 6: negative widths are not allowed

I have checked the obvious, that is, that width(temp) is strictly
positive, and I've even managed to narrow the offending section (or at
least one of the offending sections) down to this region:

> bamSegmentRanges[795:800,]
GRanges with 6 ranges and 6 metadata columns:
      seqnames             ranges strand |     Adams     Amsoy
Harosoy     Ogden     Tokyo      York
         <Rle>          <IRanges>  <Rle> | <integer> <integer>
<integer> <integer> <integer> <integer>
  [1]     Gm18 [4213632, 4216118]      + |       746       349
1602       396       422       511
  [2]     Gm20 [4213809, 4221748]      + |       229        78
670       163       186       215
  [3]     Gm18 [4218455, 4221721]      + |         6         0
20        22         2        14
  [4]     Gm18 [4222355, 4224539]      + |         0         0
131       101       179       152
  [5]     Gm18 [4231910, 4235860]      - |        18         2
25        61        29        41
  [6]     Gm18 [4239285, 4241479]      - |        88        63
253       126       202       192
  ---
  seqlengths:
            Gm01          Gm02          Gm03          Gm04 ...
scaffold_950   scaffold_96  scaffold_973  scaffold_985
              NA            NA            NA            NA ...
   NA            NA            NA            NA

that is, when I run

res <- exomecn.mops(bamSegmentRanges[1:795,])

the program exits successfully.

Here are the results of traceback():

6: .Call(.NAME, ..., PACKAGE = PACKAGE)
5: .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges")
4: solveUserSEW0(start = start, end = end, width = width)
3: IRanges(start(inputChr)[segDfChr$start], end(inputChr)[segDfChr$end])
2: cn.mops(input = input, I = I, classes = classes, priorImpact = priorImpact,
       cyc = cyc, parallel = parallel, normType = normType, normQu = normQu,
       norm = norm, lowerThreshold = lowerThreshold, upperThreshold =
upperThreshold,
       minWidth = minWidth, segAlgorithm = segAlgorithm, minReadCount
= minReadCount,
       returnPosterior = returnPosterior, ...)
1: exomecn.mops(temp)


and my sessionInfo() is

R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  grid      stats     graphics  grDevices utils
datasets  methods   base

other attached packages:
[1] snow_0.3-12          cn.mops_1.6.6        GenomicRanges_1.12.5
IRanges_1.18.3       Biobase_2.20.1
[6] BiocGenerics_0.6.0

loaded via a namespace (and not attached):
[1] Biostrings_2.28.0 bitops_1.0-6      graph_1.38.3
Rgraphviz_2.4.1   Rsamtools_1.12.4  stats4_3.0.2
[7] tools_3.0.2       zlibbioc_1.6.0


Due to the fact that I have no idea what is actually causing the
error, I'm having trouble coming up with a reproducible example.

Thanks for your help!
Susan VanderPlas
Iowa State University



More information about the Bioconductor mailing list