Skip to content
Prev 15565 / 21312 Next

[Bioc-devel] read_bed()

Hi Michael, 

That's a software design dilemma I've encountered a few times.

One approach is to keep the "verb" functions bare. E.g. read_bed would only read a bedfile, and plot_bed would somehow plot it. Advantage: if read_bed doesn't depend on anything else, other functions can depend on it, which makes dependency handling easier.

Another intention is to make verb functions "intuitive". In that scenario, I try for each operation to also output a visual image of the operation, to make it easier to see at a glance what is happening. E.g. for the range operations in multicrispr, the function plot_intervals visually shows what operation is being performed, making it easier to both spot errors as well as maintain focus.

In the case of read_bed, I thought of wrapping around your excellent core-level rtracklayer::import(), additionally providing the textual and visual feedback which I intent to give.

Interesting to hear your suggestions on this topic, though.

Aditya