Bioconductor/GenomicRanges

makeGRangesFromDataFrame check for missing cells before sending to IRanges

Closed this issue · 2 comments

First, thanks for this awesome package!

The error message when there is a missing cell in the data.frame is a bit cryptic (and I am not sure what users know the meaning of solve_user_SEW0). makeGRangesFromDataFrame should check for missing cells so and throw an exception there so that the user do not feel necessary to debug on the level of IRanges.

Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") : 
  In range 36: at least two out of 'start', 'end', and 'width', must
  be supplied.

I can create an PR if needed :)

Hi,

makeGRangesFromDataFrame() calls the GRanges() constructor which in turn calls the IRanges() constructor deep down the call stack. I've tried to improve a little bit the error message in IRanges 2.25.8. Hopefully it will be less cryptic. I don't think it would be good design to re-implement this kind of check at the makeGRangesFromDataFrame() level. This goes against the DRY principle.

Granted everything goes as expected, IRanges 2.25.8 should propagate to BioC 3.13 (the current devel version of Bioconductor) in the next 36h or so. When it propagates it will be available for installation via BiocManager::install().

Best,
H.

Sure thanks!