Commit 55399100 authored by Alistair Rust's avatar Alistair Rust
Browse files

Fixes to handle strandedness of slices and requested sequences in the...

Fixes to handle strandedness of slices and requested sequences in the fetch_by_Slice_start_end_strand method.
parent b0afcd1c
......@@ -142,15 +142,31 @@ sub fetch_by_Slice_start_end_strand {
$end = $slice->chr_end() - $slice->chr_start() + 1;
}
$self->fetch_by_assembly_location
(
$slice->chr_start()+$start-1,
$slice->chr_start()+$end-1,
$strand,
$slice->chr_name(),
$slice->assembly_type()
);
# need to check the strand'edness of the slice as this
# affects the direction in which the dna seq is grabbed
if ( $slice->strand == 1 ) {
$self->fetch_by_assembly_location
(
$slice->chr_start()+$start-1,
$slice->chr_start()+$end-1,
$strand,
$slice->chr_name(),
$slice->assembly_type()
);
}
elsif ( $slice->strand == -1 ) {
$self->fetch_by_assembly_location
(
$slice->chr_end()-$end+1,
$slice->chr_end()-$start+1,
$strand,
$slice->chr_name(),
$slice->assembly_type()
);
}
else {
self->throw("Incorrect strand set on slice $slice");
}
}
......
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