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
be886aaa
Commit
be886aaa
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
helper module to keep track of types of mapping failures
parent
6ec062e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/chimp/ErrCode.pm
+107
-0
107 additions, 0 deletions
misc-scripts/chimp/ErrCode.pm
with
107 additions
and
0 deletions
misc-scripts/chimp/ErrCode.pm
0 → 100644
+
107
−
0
View file @
be886aaa
use
strict
;
use
warnings
;
package
ErrCode
;
use
Exporter
;
use
vars
qw(@EXPORT_OK @ISA)
;
@ISA
=
qw(Exporter)
;
@EXPORT_OK
=
qw(&set_err &get_err &ec2str)
;
use
constant
OK
=>
0
;
use
constant
PART_EXON_CDS_DELETE_TOO_LONG
=>
1
;
use
constant
PART_EXON_CDS_FRAMESHIFT_DELETE_TOO_LONG
=>
2
;
use
constant
PART_EXON_CDS_DELETE_ENTIRE
=>
3
;
use
constant
PART_EXON_CDS_INSERT_TOO_LONG
=>
4
;
use
constant
PART_EXON_CDS_FRAMESHIFT_INSERT_TOO_LONG
=>
5
;
use
constant
PART_EXON_CONFUSED
=>
6
;
use
constant
NO_CDS_LEFT
=>
7
;
use
constant
EXON_DELETE_CODING
=>
10
;
use
constant
EXON_STRAND_FLIP
=>
11
;
use
constant
EXON_INVERT
=>
12
;
use
constant
EXON_SCAFFOLD_SPAN
=>
13
;
use
constant
TRANSCRIPT_STRAND_FLIP
=>
20
;
use
constant
TRANSCRIPT_INVERT
=>
21
;
use
constant
TRANSCRIPT_SCAFFOLD_SPAN
=>
22
;
use
constant
TRANSCRIPT_DOES_NOT_TRANSLATE
=>
30
;
my
$ERR
;
sub
set_err
{
$ERR
=
shift
;
}
sub
get_err
{
my
$cur_err
=
$ERR
;
$ERR
=
OK
;
return
$cur_err
;
}
#converts an error code to a string
sub
ec2str
{
my
$ec
=
shift
;
my
$str
=
'';
if
(
$ec
==
OK
)
{
$str
=
'
OK
';
}
elsif
(
$ec
==
PART_EXON_CDS_DELETE_TOO_LONG
)
{
$str
=
'
Exon CDS deletion too long.
';
}
elsif
(
$ec
==
PART_EXON_CDS_FRAMESHIFT_DELETE_TOO_LONG
)
{
$str
=
'
Exon frameshifting deletion too long.
';
}
elsif
(
$ec
==
PART_EXON_CDS_DELETE_ENTIRE
)
{
$str
=
'
Entire CDS deleteion.
';
}
elsif
(
$ec
==
PART_EXON_CDS_INSERT_TOO_LONG
)
{
$str
=
'
Exon CDS insertion too long.
';
}
elsif
(
$ec
==
PART_EXON_CDS_FRAMESHIFT_INSERT_TOO_LONG
)
{
$str
=
'
Exon frameshifting insertion too long.
';
}
elsif
(
$ec
==
NO_CDS_LEFT
)
{
$str
=
'
No CDS left following CDS adjustments due to inserts/deletions
';
}
elsif
(
$ec
==
PART_EXON_CONFUSED
)
{
$str
=
'
Confused due to insert following short match consumed
'
.
'
by introduced frameshift intron.
';
}
elsif
(
$ec
==
EXON_DELETE_CODING
)
{
$str
=
'
Entire coding exon deletion.
';
}
elsif
(
$ec
==
EXON_STRAND_FLIP
)
{
$str
=
'
Exon flips strands.
';
}
elsif
(
$ec
==
EXON_INVERT
)
{
$str
=
'
Exon inversion.
';
}
elsif
(
$ec
==
EXON_SCAFFOLD_SPAN
)
{
$str
=
'
Exon spans multiple scaffolds.
';
}
elsif
(
$ec
==
TRANSCRIPT_STRAND_FLIP
)
{
$str
=
'
Transcript flips strands.
';
}
elsif
(
$ec
==
TRANSCRIPT_INVERT
)
{
$str
=
'
Transcript inversion.
';
}
elsif
(
$ec
==
TRANSCRIPT_SCAFFOLD_SPAN
)
{
$str
=
'
Transcript spans multiple scaffolds.
';
}
return
$str
;
}
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