Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
eb3a02da
Commit
eb3a02da
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
moved some debugging aid functions into Utils module
parent
9f0ab422
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/chimp/Utils.pm
+112
-0
112 additions, 0 deletions
misc-scripts/chimp/Utils.pm
with
112 additions
and
0 deletions
misc-scripts/chimp/Utils.pm
0 → 100644
+
112
−
0
View file @
eb3a02da
use
strict
;
use
warnings
;
package
Utils
;
use
Exporter
;
use
Bio::EnsEMBL::Utils::
Exception
qw(info)
;
use
vars
qw(@ISA @EXPORT_OK)
;
@ISA
=
qw(Exporter)
;
@EXPORT_OK
=
qw(print_exon print_coords print_translation)
;
#
# prints debugging info
#
sub
print_exon
{
my
$exon
=
shift
;
my
$tr
=
shift
;
if
(
!
$exon
)
{
throw
("
Exon undefined
");
}
info
("
"
.
$exon
->
stable_id
());
info
("
cdna_start =
"
.
$exon
->
cdna_start
())
if
(
defined
(
$exon
->
cdna_start
()));
info
("
cdna_end =
"
.
$exon
->
cdna_end
())
if
(
defined
(
$exon
->
cdna_end
()));
info
("
start =
"
.
$exon
->
start
())
if
(
defined
(
$exon
->
start
()));
info
("
end =
"
.
$exon
->
end
())
if
(
defined
(
$exon
->
end
()));
info
("
strand =
"
.
$exon
->
strand
())
if
(
defined
(
$exon
->
strand
()));
if
(
$exon
->
fail
)
{
info
("
FAILED
");
}
if
(
$tr
)
{
info
("
TRANSCRIPT:
");
info
("
cdna_coding_start =
"
.
$tr
->
cdna_coding_start
());
info
("
cdna_coding_end =
"
.
$tr
->
cdna_coding_end
()
.
"
\n
");
}
return
;
}
sub
print_coords
{
my
$cs
=
shift
;
foreach
my
$c
(
@$cs
)
{
if
(
$c
->
isa
('
Bio::EnsEMBL::Mapper::Gap
'))
{
info
("
GAP
");
}
else
{
info
("
",
$c
->
start
,
'
-
',
$c
->
end
,
'
(
',
$c
->
strand
,"
)
");
}
}
}
sub
print_translation
{
my
$tl
=
shift
;
info
("
TRANSLATION
");
if
(
!
$tl
)
{
info
("
undef
");
return
;
}
if
(
$tl
->
start_Exon
())
{
info
("
start exon =
",
$tl
->
start_Exon
->
stable_id
());
}
else
{
info
("
start exon = undef
");
}
if
(
$tl
->
end_Exon
())
{
info
("
end exon =
",
$tl
->
end_Exon
->
stable_id
);
}
else
{
info
("
end exon = undef
");
}
if
(
defined
(
$tl
->
start
()))
{
info
("
start =
",
$tl
->
start
());
}
else
{
info
("
start = undef
");
}
if
(
defined
(
$tl
->
end
()))
{
info
("
end =
",
$tl
->
end
());
}
else
{
info
("
end = undef
");
}
return
;
}
1
;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment