Subject: | Reduce overhead of Bio::DB::Bam::Alignment->strand (patch) |
Hi Lincoln,
Can I recommend the following edit to Bio::DB::Bam::Alignment->strand:
Existing (commented lines removed for simplicity):
sub strand {
my $self = shift;
return $self->reversed ? -1 : 1;
# return 1;
}
Replacement:
sub strand {
return shift->reversed ? -1 : 1;
}
At present code calling strand takes 6us, this reduces the time to 4us (based on 500,000 calls).
Regards,
Keiran