Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Fields committed Feb 26, 2012
1 parent fb0ee84 commit 86bdb9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions lib/Biome/Location/Simple.pm
Expand Up @@ -18,14 +18,13 @@ with 'Biome::Role::Location::Locatable';
sub BUILD {
my ($self, $params) = @_;

# this should probably just fail validation, seems clunky to handle it here
if ($params->{start} && $params->{end} && ($params->{end} < $params->{start})) {
$self->warn('End is greater than start; flipping strands');
$self->end($params->{start});
$self->start($params->{end});
$self->strand($self->strand * -1);
}

$params->{location_type} && $self->location_type($params->{location_type});
}

__PACKAGE__->meta->make_immutable;
Expand Down
6 changes: 0 additions & 6 deletions lib/Biome/SeqFeature/Generic.pm
Expand Up @@ -13,12 +13,6 @@ with 'Biome::Role::SeqFeature';
sub BUILD {
my ($self, $params) = @_;

if ($params->{location_string}) {
$self->throw("Can't use 'location_string' with other parameters")
if (scalar(keys %$params) > 1);
$self->from_string($params->{location_string});
}

if ($params->{start} && $params->{end} && ($params->{end} < $params->{start})) {
$self->warn('End is greater than start; flipping strands');
$self->end($params->{start});
Expand Down

0 comments on commit 86bdb9c

Please sign in to comment.