Subject: | odd output for fetch_window |
Date: | Tue, 22 Oct 2013 13:54:31 -0500 |
To: | <bug-Set-IntervalTree [...] rt.cpan.org> |
From: | Nicholas Youngblut <nyoungb2 [...] gmail.com> |
Hello,
I seem to be getting some odd output for the fetch_window function. It seems
to find some windows but not others. Is this an overlap/adjacency issue
(e.g. windows adjacent to each other or ends overlapping each other)?
"""
use Set::IntervalTree;
use Data::Dumper;
my @seq = split //, "ABCDEFGHIJ";
my $itree = Set::IntervalTree->new;
for my $i (0..$#seq){
$itree->insert($seq[$i],$i+1,$i+1);
}
# appears to be normal with fetch #
for my $i (0..$#seq){
my $res = $itree->fetch($i, $i+2);
print Dumper $i, @$res;
}
# output is only every other character: 'b', then 'd', then 'f' #
for my $i (0..$#seq){
print Dumper $i, $itree->fetch_window($i,$i);
}
"""
Thanks for the module. It's been really helpful for my genomics work!
Nick
~~~
Nicholas D. Youngblut
Ph.D Candidate
Rachel Whitaker Lab
Microbiology Department
University of Illinois at Urbana-Champaign