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
450692c3
Commit
450692c3
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
genomic2cds now correctly gives back gaps for pseudogenes
parent
975c2c87
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
modules/Bio/EnsEMBL/TranscriptMapper.pm
+17
-14
17 additions, 14 deletions
modules/Bio/EnsEMBL/TranscriptMapper.pm
with
17 additions
and
14 deletions
modules/Bio/EnsEMBL/TranscriptMapper.pm
+
17
−
14
View file @
450692c3
...
...
@@ -251,6 +251,19 @@ sub genomic2cds {
throw
("
start, end and strand arguments are required
");
}
if
(
$start
>
$end
)
{
throw
("
start arg must be less than or equal to end arg
");
}
my
$cdna_cstart
=
$self
->
{'
cdna_coding_start
'};
my
$cdna_cend
=
$self
->
{'
cdna_coding_end
'};
#this is a pseudogene if there is no coding region
if
(
!
defined
(
$cdna_cstart
))
{
#return a gap of the entire requested region, there is no CDS
return
Bio::EnsEMBL::Mapper::
Gap
->
new
(
$start
,
$end
);
}
my
@coords
=
$self
->
genomic2cdna
(
$start
,
$end
,
$strand
);
my
@out
;
...
...
@@ -261,15 +274,10 @@ sub genomic2cds {
}
else
{
my
$start
=
$coord
->
start
;
my
$end
=
$coord
->
end
;
my
$cdna_cstart
=
$self
->
{'
cdna_coding_start
'};
my
$cdna_cend
=
$self
->
{'
cdna_coding_end
'};
if
(
$coord
->
strand
==
-
1
||
$end
<
$cdna_cstart
||
$start
>
$cdna_cend
)
{
#is all gap - does not map to peptide
my
$gap
=
new
Bio::EnsEMBL::Mapper::
Gap
;
$gap
->
start
(
$start
);
$gap
->
end
(
$end
);
push
@out
,
$gap
;
push
@out
,
Bio::EnsEMBL::Mapper::
Gap
->
new
(
$start
,
$end
);
}
else
{
#we know area is at least partially overlapping CDS
...
...
@@ -278,21 +286,16 @@ sub genomic2cds {
if
(
$start
<
$cdna_cstart
)
{
#start of coordinates are in the 5prime UTR
my
$gap
=
new
Bio::EnsEMBL::Mapper::
Gap
;
my
$gap_len
=
$cdna_cstart
-
$start
;
$gap
->
start
(
$start
);
$gap
->
end
(
$cdna_cstart
-
1
);
push
@out
,
Bio::EnsEMBL::Mapper::
Gap
->
new
(
$start
,
$cdna_cstart
-
1
);
#start is now relative to start of CDS
$cds_start
=
1
;
push
@out
,
$gap
;
}
my
$end_gap
=
undef
;
if
(
$end
>
$cdna_cend
)
{
#end of coordinates are in the 3prime UTR
$end_gap
=
new
Bio::EnsEMBL::Mapper::
Gap
;
$end_gap
->
start
(
$cdna_cend
+
1
);
$end_gap
->
end
(
$end
);
$end_gap
=
Bio::EnsEMBL::Mapper::
Gap
->
new
(
$cdna_cend
+
1
,
$end
);
#adjust end to relative to CDS start
$cds_end
=
$cdna_cend
-
$cdna_cstart
+
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