Skip to content

Commit

Permalink
check in old code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Fields committed Jul 14, 2012
1 parent cd71f69 commit 083e88f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion lib/Biome/Role/Location/Simple.pm
Expand Up @@ -29,7 +29,9 @@ has 'end' => (
sub _check_coord {
my $self = shift;
my ($start, $end) = ($self->start, $self->end);
return unless $start && $end;

# only check if both are defined
return unless defined($start) && defined($end);
$self->throw("Start must be less than end") if $start > $end;
if ($self->location_type eq 'IN-BETWEEN' &&
(abs($end - $start) != 1) ) {
Expand Down
7 changes: 1 addition & 6 deletions t/Factory/FTLocationFactory.t
Expand Up @@ -10,10 +10,6 @@ BEGIN {

use Biome::Factory::FTLocationFactory;

# Holds strings and results. The latter is an array of expected class name,
# min/max start position and position type, min/max end position and position
# type, location type, the number of locations, and the strand.

my %testcases = (
# note: the following are directly taken from
# http://www.ncbi.nlm.nih.gov/collab/FT/#location
Expand Down Expand Up @@ -70,15 +66,14 @@ my %testcases = (
"?" => [0,
undef, undef, "UNCERTAIN", undef, undef, "EXACT", "EXACT", 0, 1, undef],

# SPLITS
# Split locations (now collections of locations)

# this isn't a legal split location string AFAIK (can't have two remote
# locations), though it is handled. In this case the parent location can't
# be used in any location-based analyses (has no start, end, etc.)

"join(AY016290.1:108..185,AY016291.1:1546..1599)"=> [0,
undef, undef, "EXACT", undef, undef, "EXACT", "JOIN", 2, 0, undef],

"complement(join(3207..4831,5834..5902,8881..8969,9276..9403,29535..29764))",
[0, 3207, 3207, "EXACT", 29764, 29764, "EXACT", "JOIN", 5, -1, undef],
"join(complement(29535..29764),complement(9276..9403),complement(8881..8969),complement(5834..5902),complement(3207..4831))",
Expand Down

0 comments on commit 083e88f

Please sign in to comment.