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
834f0b0a
Commit
834f0b0a
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
added additional sanity check, avoided perl warning
parent
0da4c893
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/Transcript.pm
+23
-5
23 additions, 5 deletions
misc-scripts/chimp/Transcript.pm
with
23 additions
and
5 deletions
misc-scripts/chimp/Transcript.pm
+
23
−
5
View file @
834f0b0a
...
...
@@ -141,12 +141,19 @@ sub check_iexons {
return
check_iexons
(
$itranscript
,
$itranscript_array
);
}
# sanity check:
# sanity check:
start must be less than or equal to end
if
(
$iexon
->
end
()
<
$iexon
->
start
())
{
throw
("
Unexpected: exon start less than end:
\n
"
.
$iexon
->
stable_id
()
.
"
:
"
.
$iexon
->
start
()
.
'
-
'
.
$iexon
->
end
());
}
# sanity check: cdna length must equal length
if
(
$iexon
->
length
!=
$iexon
->
cdna_end
-
$iexon
->
cdna_start
+
1
)
{
throw
("
Unexpected: exon cdna length != exon length:
\n
"
.
$iexon
->
stable_id
()
.
"
:
"
.
$iexon
->
start
()
.
'
-
'
.
$iexon
->
end
()
.
"
\n
"
.
"
"
.
$iexon
->
cdna_start
.
'
-
'
.
$iexon
->
cdna_end
());
}
if
(
!
defined
(
$transcript_seq_region
))
{
$transcript_seq_region
=
$iexon
->
seq_region
();
}
elsif
(
$transcript_seq_region
ne
$iexon
->
seq_region
())
{
...
...
@@ -207,8 +214,8 @@ sub check_iexons {
# if there exons left after all the splitting,
# then add this transcript to the array
#
my
$total_exons
=
$itranscript
->
get_all_Exons
;
if
(
@
$total_exons
>
0
)
{
my
$total_exons
=
scalar
(
@
{
$itranscript
->
get_all_Exons
})
;
if
(
$total_exons
>
0
)
{
push
@$itranscript_array
,
$itranscript
;
}
else
{
debug
("
no exons left in transcript
");
...
...
@@ -300,8 +307,10 @@ sub split_itrans {
if
(
$cdna_shift
)
{
foreach
my
$ex
(
@second_exons
)
{
$ex
->
cdna_start
(
$ex
->
cdna_start
()
-
$cdna_shift
);
$ex
->
cdna_end
(
$ex
->
cdna_end
()
-
$cdna_shift
);
if
(
!
$ex
->
fail
())
{
$ex
->
cdna_start
(
$ex
->
cdna_start
()
-
$cdna_shift
);
$ex
->
cdna_end
(
$ex
->
cdna_end
()
-
$cdna_shift
);
}
}
$itrans
->
move_cdna_coding_start
(
-
$cdna_shift
);
$itrans
->
move_cdna_coding_end
(
-
$cdna_shift
);
...
...
@@ -342,6 +351,7 @@ sub make_Transcript {
$translation
=
undef
;
}
else
{
$translation
=
Bio::EnsEMBL::
Translation
->
new
();
$transcript
->
translation
(
$translation
);
}
foreach
my
$iexon
(
@
{
$itrans
->
get_all_Exons
})
{
...
...
@@ -354,6 +364,7 @@ sub make_Transcript {
-
STRAND
=>
$iexon
->
strand
(),
-
PHASE
=>
$iexon
->
start_phase
(),
-
END_PHASE
=>
$iexon
->
end_phase
(),
-
STABLE_ID
=>
$iexon
->
stable_id
(),
-
SLICE
=>
$slice
);
$transcript
->
add_Exon
(
$exon
);
...
...
@@ -373,6 +384,13 @@ sub make_Transcript {
if
(
$iexon
->
cdna_start
()
<=
$itrans
->
cdna_coding_end
()
&&
$iexon
->
cdna_end
()
>=
$itrans
->
cdna_coding_end
())
{
debug
("
end exon=
"
.
$exon
->
stable_id
()
.
"
\n
"
.
"
ex_coding_start=
"
.
$iexon
->
cdna_start
()
.
"
\n
"
.
"
ex_coding_end=
"
.
$iexon
->
cdna_end
()
.
"
\n
"
.
"
start=
"
.
$iexon
->
start
()
.
"
\n
"
.
"
end=
"
.
$iexon
->
end
()
.
"
\n
"
.
"
transl_end =
"
.
$itrans
->
cdna_coding_end
());
my
$translation_end
=
$itrans
->
cdna_coding_end
()
-
$iexon
->
cdna_start
()
+
1
;
$translation
->
end_Exon
(
$exon
);
...
...
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