Error message suggestion for fullCoverage in derfinder
1
0
Entering edit mode
@jessicahekman-6877
Last seen 9.3 years ago
United States

Just spent some time scratching my head over an error message in derfinder and wanted to suggest that this is a spot for catching user error and giving guidance about what's going on.

Turns out I called

 

fullCov <- fullCoverage(files, chrs = c(1:38, 'X'))

 

where "files" was (unbeknownst to me) a zero-length list. I expected it to contain actual filenames. The error message I got was:

 

Error: 1 errors; first error:
  Error in seqlengths(bList[[1]]): error in evaluating the argument 'x' in selecting a method for function 'seqlengths': Error in normalizeDoubleBracketSubscript(i, x, exact = exact, error.if.nomatch = FALSE) :
  subscript is out of bounds

For more information, use bplasterror(). To resume calculation, re-call
  the function and set the argument 'BPRESUME' to TRUE or wrap the
  previous call in bpresume().

First traceback:
  16: fullCoverage(files, chrs = "1")
  15: bplapply(seq_len(length(chrs)), loadChr, files = files, chrs = chrs,
          bai = bai, chrlens = chrlens, outputs = outputs, cutoff = cutoff,
          mc.load = mc.cores.load, ..., BPPARAM = BPPARAM)
  14: bplapply(seq_len(length(chrs)), loadChr, files = files, chrs = chrs,
          bai = bai, chrlens = chrlens, outputs = outputs, cutoff = cutoff,
          mc.load = mc.cores.load, ..., BPPARAM = BPPARAM)
  13: lapply(X, FUN, ...)
  12: lapply(X, FUN, ...)
  11: FUN(1L[[1L]], ...)

 

I propose that fullCoverage() should check the length of the files vector and return an informative error message if it's zero.

 

Hope this is helpful and posted in the right place!

Jessica

derfinder • 1.8k views
ADD COMMENT
0
Entering edit mode
@lcolladotor
Last seen 1 day ago
United States

Thank you! This suggestion has been addressed by https://github.com/lcolladotor/derfinder/commit/eecf8bb6bbf62095cbfb3e06e752891e134ca259

ADD COMMENT

Login before adding your answer.

Traffic: 707 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6