Hi Lemon, On Tue, 13 Sep 2011 04:54:40 -0700 (PDT) Lemon <lemon...@gmail.com> wrote:
> I have some segments start and end position on a reference sequence, I > want to calculate the uncoverage region for the reference; > > for example: reference sequence length= 100, > > name [start,end] > segment 1 [1,20] > segment 2 [2,28] > segment 3 [50,100] > segment 4 [5,38] > > so uncover region = [38,49] > > > now I already have %pos{start}=end structure for those segment > position, could somebody give a good method? > I suggest you merge overlapping segments into big meta-segments using a sorted array, one by one, and then see the uncovered regions between two adjacent meta-segments. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Rethinking CPAN - http://shlom.in/rethinking-cpan <Botje> Khisanth =~ s/must sleep/must give Botje all my money/ . — Freenode’s #perl Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/