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
1854a99c
Commit
1854a99c
authored
22 years ago
by
Will Spooner
Browse files
Options
Downloads
Patches
Plain Diff
Added ctg2genomic method
parent
a1fedac9
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/RawContig.pm
+30
-0
30 additions, 0 deletions
modules/Bio/EnsEMBL/RawContig.pm
with
30 additions
and
0 deletions
modules/Bio/EnsEMBL/RawContig.pm
+
30
−
0
View file @
1854a99c
...
...
@@ -668,6 +668,36 @@ sub get_all_ExternalFeatures {
}
=
head2:
ctg2genomic
Arg
[
1
]
:
$start
The
start
position
in
contig
coordinates
Arg
[
2
]
:
$end
The
end
position
in
contig
coordinates
Arg
[
3
]
:
(
optional
)
$strand
The
strand
of
the
contig
coordinates
Example
:
@coords
=
$transcript
->
ctg2genomic
(
$start
,
$end
);
Description:
Converts
contig
coordinates
to
genomic
coordinates
.
The
return
value
is
a
list
of
coordinates
and
gaps
.
Returntype
:
list
of
Bio::EnsEMBL::Mapper::
Coordinate
and
Bio::EnsEMBL::Mapper::
Gap
objects
Exceptions
:
none
Caller
:
general
=cut
sub ctg2genomic{
# Map the internal ID onto the golden path
my( $self, $start, $end, $strand ) = @_;
if( ! $end ){ $self->throw( "Required args: contig_start, contig_end" ) }
$strand ||= 1;
my $db = $self->adaptor->db();
my $aa = $db->get_AssemblyMapperAdaptor();
my $ma = $aa->fetch_by_type( $db->assembly_type );
return $ma->map_coordinates_to_assembly( $self->dbID, $start, $end,
$strand );
}
=head2 Methods included only for BioPerl compliance
=cut
...
...
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