[BioC] Performing set ops with an IRanges object loaded with elementMetadata is like a shotgun, pointing at my foot.
Patrick Aboyoun
paboyoun at fhcrc.org
Tue Jul 13 00:53:24 CEST 2010
Steve,
Most of the methods for the IRanges class predate the introduction of
the elementMetadata slot and these methods have not been tested when the
elementMetadata is not NULL. I have some changes I can check in to BioC
2.7 to the gaps,IRanges-method and union,IRanges,IRanges-method that
strips the elementMetadata from the output. Before I check it in,
though, I want to survey all the methods to IRanges to see how many
other methods need to be modified so I can make the change in one go,
rather than in a piecemeal fashion. I'll let you know when my audit is
complete and the modifications have been made.
Cheers,
Patrick
On 7/12/10 12:01 PM, Steve Lianoglou wrote:
> On Mon, Jul 12, 2010 at 2:49 PM, Michael Lawrence
> <lawrence.michael at gene.com> wrote:
>
>> On Mon, Jul 12, 2010 at 11:05 AM, Steve Lianoglou
>> <mailinglist.honeypot at gmail.com> wrote:
>>
> <snip>
>
>>> I don't know what the answer *really* should be as to what the correct
>>> behavior in this situation would be, which I guess could be an
>>> interesting discussion ... perhaps the elementMetadata can be
>>> split/merged with its associated range, or just dropped all together
>>> (perhaps via some explicit parameter in the setdiff, etc. function
>>> call?).
>>>
>>> Anyway, in an effort to skirt that rabbit hole for now, could I ask
>>> for a feature request and have IRanges provide a more informative
>>> error message when an end user is gunning at their feet w/ this
>>> scenario? :-)
>>>
>>>
>> I think it would be reasonable to simply drop the metadata, since one is
>> creating an entirely new set of ranges. Might want a warning/message, but
>> I'm not sure if even that is necessary. Just need to document the behavior.
>>
> I agree that dropping the metadata is sufficient, but (if we were
> taking a vote) I think I'd have a slight (+0) preference for it to
> fire off a warning if any of the IRanges objects had metadata that was
> dropped.
>
>
More information about the Bioconductor
mailing list