Skip to content

Commit

Permalink
Update tabix call to use query_full
Browse files Browse the repository at this point in the history
  • Loading branch information
David Jones committed Mar 26, 2018
1 parent 2149158 commit 8553d64
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions perl/bin/utilities/ascatSnpPanelGenerator.pl
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,13 @@ sub get_regions {
for my $t_range(@top_ranges) {
my ($c_chr, $c_start, $c_end) = @{$t_range};
if(defined $exclude) {
my $iter = $exclude->query(sprintf "%s:%d-%d", $c_chr, $c_start, $c_end);
while(my $record = $iter->next){
my ($start0, $end1) = (split /\t/, $record)[1..2];
push @refined_regions, [sprintf("%s:%d-%d", $c_chr, $c_start, $start0), $c_chr, $c_start, $start0] unless($start0 == 0);
$c_start = $end1;
my $iter = $exclude->query_full($c_chr, $c_start, $c_end);
if(defined($iter)){
while(my $record = $iter->next){
my ($start0, $end1) = (split /\t/, $record)[1..2];
push @refined_regions, [sprintf("%s:%d-%d", $c_chr, $c_start, $start0), $c_chr, $c_start, $start0] unless($start0 == 0);
$c_start = $end1;
}
}
}
push @refined_regions, [sprintf("%s:%d-%d", $c_chr, $c_start, $c_end), $c_chr, $c_start, $c_end];
Expand Down

0 comments on commit 8553d64

Please sign in to comment.