[Bioperl-l] Any module for chromosome region analysis ?
Jason Stajich
jason at bioperl.org
Wed Feb 24 14:55:41 EST 2010
You can use the collapse_nums method in Bio::Search::BlastUtils which is
just an implementation of the connectivity algorithm but the Range
description that Roy points out may be more useful since you'd have to
unroll the ranges into the full set of numbers.
collapse_nums
Usage : @cnums = collapse_nums( @numbers );
Purpose : Collapses a list of numbers into a set of ranges of
consecutive terms:
: Useful for condensing long lists of consecutive numbers.
: EXPANDED:
: 1 2 3 4 5 6 10 12 13 14 15 17 18 20 21 22 24 26 30 31 32
: COLLAPSED:
: 1-6 10 12-15 17 18 20-22 24 26 30-32
Argument : List of numbers sorted numerically.
Returns : List of numbers mixed with ranges of numbers (see above).
Throws : n/a
-jason
K. Shameer wrote:
> Hello Roy,
>
> Thanks for the pointers.
>
> --
> Shameer
>
>
>> Hi Shameer,
>>
>> You could do this using Bio::Range, but that only allows you to
>> determine the intersection between two ranges at once, so you'd need to
>> do the calculation in several stages. It also doesn't have a method to
>> determine positions that are unique to one of the ranges (although it
>> possibly should).
>>
>> As this isn't a problem that is specific to biology, it's also worth
>> hunting around on CPAN for modules that may be useful.
>> Set::IntSpan::Fast looks suitable, particularly the intersection and
>> diff methods. I haven't tried it, though.
>>
>> Roy.
>>
>> On 24/02/2010 16:59, K. Shameer wrote:
>>
>>> Hello all,
>>>
>>> I am looking for a standard way / bioperl module that can take up
>>> different chromosome regions (in basepairs) and give the unique and
>>> common
>>> regions.
>>> For example these are the regions and I need to get the common regions
>>> (start - end) among all 5 regions:
>>> 24328000 - 29166946
>>> 25388351 - 27114603
>>> 22310186 - 25239677
>>> 28511024 - 29638159
>>> 23729632 - 26385029
>>>
>>> Thanks,
>>> Shameer
>>>
>>>
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list