Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
97e4b32e
Commit
97e4b32e
authored
Sep 25, 2002
by
Laura Clarke
Browse files
more rounding errors fixed
parent
2e6ac849
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
modules/Bio/EnsEMBL/BaseAlignFeature.pm
modules/Bio/EnsEMBL/BaseAlignFeature.pm
+7
-1
No files found.
modules/Bio/EnsEMBL/BaseAlignFeature.pm
View file @
97e4b32e
...
...
@@ -610,13 +610,19 @@ sub _parse_features {
if
(
$query_unit
>
$hit_unit
){
# I am going to make the assumption here that this situation will
# only occur with DnaPepAlignFeatures, this may not be true
if
(
int
(
$length
/
$query_unit
)
!=
$hlength
*
$hit_unit
)
{
my
$query_p_length
=
sprintf
"
%.0f
",
(
$length
/
$query_unit
);
my
$hit_p_length
=
sprintf
"
%.0f
",
(
$hlength
*
$hit_unit
);
if
(
$query_p_length
!=
$hit_p_length
)
{
print
STDERR
$length
.
"
/
"
.
$query_unit
.
"
"
.
$hlength
.
"
*
"
.
$hit_unit
.
"
\n
";
$self
->
throw
(
"
Feature lengths not comparable Lengths:
"
.
$length
.
"
"
.
$hlength
.
"
Ratios:
"
.
$query_unit
.
"
"
.
$hit_unit
);
}
}
else
{
my
$query_d_length
=
sprintf
"
%.0f
",
(
$length*$hit_unit
);
my
$hit_d_length
=
sprintf
"
%.0f
",
(
$hlength
*
$query_unit
);
if
(
$length
*
$hit_unit
!=
$hlength
*
$query_unit
)
{
print
STDERR
$length
.
"
*
"
.
$hit_unit
.
"
"
.
$hlength
.
"
*
"
.
$query_unit
.
"
\n
";
$self
->
throw
(
"
Feature lengths not comparable Lengths:
"
.
$length
.
"
"
.
$hlength
.
"
Ratios:
"
.
$query_unit
.
"
"
.
$hit_unit
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment