Skip to content
Prev 6969 / 21312 Next

[Bioc-devel] GRanges to VRanges coercion

Hi guys,
On 02/20/2015 04:17 PM, Michael Lawrence wrote:
Just to clarify, the automatic coercion methods for converting a class
to its parent (e.g. from VRanges to GRanges) just remove the extra
stuff and that almost always does the right thing. So it makes a lot of
sense to have them.

Going in the opposite direction (i.e. from parent to child) is the hard
part and, not too surprisingly, the automatic coercion methods are
almost never able to do the right thing. How could they possibly guess
what stuff needs to be added to the original object to make it a valid
instance of the child class? It has always been a mystery to me why the
methods package defines automatic coercion methods to go in that
direction...

Cheers,
H.