Commit 189f9507 authored by Ian Longden's avatar Ian Longden
Browse files

fetch_by_seq_region_id now has optional start, end and strands

parent d543ec54
......@@ -397,6 +397,8 @@ sub fetch_by_name {
Arg [1] : string $seq_region_id
The internal identifier of the seq_region to create this slice
on
Arg [2] : optional start
Arg [3] : optional end
Example : $slice = $slice_adaptor->fetch_by_seq_region_id(34413);
Description: Creates a slice object of an entire seq_region using the
seq_region internal identifier to resolve the seq_region.
......@@ -409,7 +411,7 @@ sub fetch_by_name {
=cut
sub fetch_by_seq_region_id {
my ($self, $seq_region_id) = @_;
my ($self, $seq_region_id,$start,$end,$strand) = @_;
my $arr = $self->{'sr_id_cache'}->{ $seq_region_id };
my ($name, $length, $cs);
......@@ -444,9 +446,9 @@ sub fetch_by_seq_region_id {
return Bio::EnsEMBL::Slice->new(-COORD_SYSTEM => $cs,
-SEQ_REGION_NAME => $name,
-SEQ_REGION_LENGTH => $length,
-START => 1,
-END => $length,
-STRAND => 1,
-START => $start || 1,
-END => $end || $length,
-STRAND => 1 || $strand,
-ADAPTOR => $self);
}
......
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