George Hartzell | 5 Sep 21:01
Gravatar

Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)


Hi all,

Bio::Coordinate::Collection surprised me a bit.  At first I thought
there was a bug, but it's clearly doing what it's supposed to.  Now
I'm wondering if what it's supposed to be doing makes sense in some
context, or if what I expected would be better functionality.

t/CoordinateMapper.t sets up the following scenario:

#
# Collection
#
#         1   5     6   10
#         |---|     |---|
#-----|-----------------------
#     1   5   9     15  19
#         pair1     pair2

Then goes on to do the following query:

  # match more than two
  $pos = Bio::Location::Simple->new (-start => 5, -end => 19 );
  ok $res = $transcribe->map($pos);
  is $res->each_gap, 2;
  is $res->each_match, 2;

I was surprised to see that there were two gaps, one gene:10-19 and
one from gene:5-14.  Looking at the code, what's really happening is
that, for the exon1 mapper there's match with gene:5-9 and a gap with
(Continue reading)

Aaron Mackey | 5 Sep 22:54

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

There are two uses for Collection:

1) all the "in" seq_id's are the same, and George's patch makes sense to me
(i.e. agrees with my intuition)

2) all the "in" seq_id's are *not* the same (i.e. the collection is just a
hash of indivual pairs), in which case my query would only match the subset
of pairs having identical seq_id's to that specified by the query ... and
then you're back to case #1

So overall, it looks like this was a bug, but I'd of course want to hear
Heikki's opinion.

Thanks for raising this,

-Aaron

On Fri, Sep 5, 2008 at 3:01 PM, George Hartzell <hartzell <at> alerce.com> wrote:

>
> Hi all,
>
> Bio::Coordinate::Collection surprised me a bit.  At first I thought
> there was a bug, but it's clearly doing what it's supposed to.  Now
> I'm wondering if what it's supposed to be doing makes sense in some
> context, or if what I expected would be better functionality.
>
> t/CoordinateMapper.t sets up the following scenario:
>
> #
(Continue reading)

Heikki Lehvaslaiho | 9 Sep 09:50

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

George,

This is an error from my side. Great that you have a fix already.

My only worry is the number of external dependencies in BioPerl. To limit 
these we have recoded number of functionalities into BioPerl-specific modules. 
Before you commit the fix, could you see if Bio::RangeI could be used or easily 
extended to be used instead of Set::IntSpan?

Thanks,

   -Heikki

On Friday 05 September 2008 21:01:35 George Hartzell wrote:
> Hi all,
>
> Bio::Coordinate::Collection surprised me a bit.  At first I thought
> there was a bug, but it's clearly doing what it's supposed to.  Now
> I'm wondering if what it's supposed to be doing makes sense in some
> context, or if what I expected would be better functionality.
>
> t/CoordinateMapper.t sets up the following scenario:
>
> #
> # Collection
> #
> #         1   5     6   10
> #         |---|     |---|
> #-----|-----------------------
> #     1   5   9     15  19
(Continue reading)

George Hartzell | 17 Sep 06:21
Gravatar

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

Heikki Lehvaslaiho writes:
 > George,
 > 
 > This is an error from my side. Great that you have a fix already.
 > 
 > My only worry is the number of external dependencies in BioPerl. To limit 
 > these we have recoded number of functionalities into BioPerl-specific modules. 
 > Before you commit the fix, could you see if Bio::RangeI could be used or easily 
 > extended to be used instead of Set::IntSpan?
 > 
 > Thanks,
 > 
 >    -Heikki
 > 
 > On Friday 05 September 2008 21:01:35 George Hartzell wrote:
 > > Hi all,
 > >
 > > Bio::Coordinate::Collection surprised me a bit.  At first I thought
 > > there was a bug, but it's clearly doing what it's supposed to.  Now
 > > I'm wondering if what it's supposed to be doing makes sense in some
 > > context, or if what I expected would be better functionality.
 > >
 > > t/CoordinateMapper.t sets up the following scenario:
 > >
 > > #
 > > # Collection
 > > #
 > > #         1   5     6   10
 > > #         |---|     |---|
 > > #-----|-----------------------
(Continue reading)

George Hartzell | 25 Sep 07:17
Gravatar

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

Heikki Lehvaslaiho writes:
 > George,
 > 
 > This is an error from my side. Great that you have a fix already.
 > 
 > My only worry is the number of external dependencies in BioPerl. To limit 
 > these we have recoded number of functionalities into BioPerl-specific modules. 
 > Before you commit the fix, could you see if Bio::RangeI could be used or easily 
 > extended to be used instead of Set::IntSpan?
 > 
 > Thanks,
 > 
 >    -Heikki
 > 
 > On Friday 05 September 2008 21:01:35 George Hartzell wrote:
 > > Hi all,
 > >
 > > Bio::Coordinate::Collection surprised me a bit.  At first I thought
 > > there was a bug, but it's clearly doing what it's supposed to.  Now
 > > I'm wondering if what it's supposed to be doing makes sense in some
 > > context, or if what I expected would be better functionality.
 > >
 > > t/CoordinateMapper.t sets up the following scenario:
 > >
 > > #
 > > # Collection
 > > #
 > > #         1   5     6   10
 > > #         |---|     |---|
 > > #-----|-----------------------
(Continue reading)

Reece Hart | 25 Sep 18:15

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

On Wed, 2008-09-24 at 22:17 -0700, George Hartzell wrote:

> So, I'm out of round 'tuit's trying to think of an _easy_ way to do
> this using Range/RangeI.

George-

I've got some square 'tuits in my office if you think that they would
solve your problem. Help yourself.

I tried an oval but wasn't very (ahem) in to it.

-Reece

--

-- 
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0
George Hartzell | 26 Sep 06:25
Gravatar

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)


What would people think about a Bio::Range::Set (and/or SetI) which
behaves like Set::Intspan (which alone would be a waste of effort) but
also embraces RangeI's concepts of stranded-ness and
strong/weak/unspecified comparisons?

g. (who's sometimes thinks that 'tuits grow on trees...)
Heikki Lehvaslaiho | 26 Sep 08:25

Re: Bio::Coordinate::Collection could DoWhatIMean better (w/ patch)

George,

Bio::Range::Set sounds like great idea.

Sorry to put you in a tight spot with the request for keeping external 
dependencies to the minimum. I should have stressed that follow it only if it 
can be done easily. If you look at the actual dependencies of BioPerl at the 
moment, you'll realize not many have to patience to follow that guideline.

The main thing is the get working code in. If you then have the energy to code 
a module that gets rid of the dependency, that's an added bonus.

Thanks for your effort,

 Yours,
    -Heikki

On Friday 26 September 2008 06:25:08 George Hartzell wrote:
> What would people think about a Bio::Range::Set (and/or SetI) which
> behaves like Set::Intspan (which alone would be a waste of effort) but
> also embraces RangeI's concepts of stranded-ness and
> strong/weak/unspecified comparisons?
>
> g. (who's sometimes thinks that 'tuits grow on trees...)

--

-- 
______ _/      _/_____________________________________________________
      _/      _/
     _/  _/  _/  Heikki Lehvaslaiho    heikki at_sanbi _ac _za
    _/_/_/_/_/  Senior Scientist    skype: heikki_lehvaslaiho
(Continue reading)


Gmane