Commit a41846a9 authored by Web Admin's avatar Web Admin
Browse files

Fixed code to return slice only if valid

parent 102ac5b9
......@@ -275,14 +275,17 @@ sub fetch_by_chr_band {
( $slice_start, $slice_end) = $sth->fetchrow_array;
}
return new Bio::EnsEMBL::Slice
(
-chr_name => $chr,
-chr_start => $slice_start,
-chr_end => $slice_end,
-strand => 1,
-assembly_type => $type
);
if(defined $slice_start) {
return new Bio::EnsEMBL::Slice(
-chr_name => $chr,
-chr_start => $slice_start,
-chr_end => $slice_end,
-strand => 1,
-assembly_type => $type
);
}
$self->throw("Band not recognised in database");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment