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
e47b6016
Commit
e47b6016
authored
18 years ago
by
Patrick Meidl
Browse files
Options
Downloads
Patches
Plain Diff
lightweight Ensembl feature object for Id mapping
parent
63b1f643
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/IdMapping/TinyFeature.pm
+115
-0
115 additions, 0 deletions
modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm
with
115 additions
and
0 deletions
modules/Bio/EnsEMBL/IdMapping/TinyFeature.pm
0 → 100644
+
115
−
0
View file @
e47b6016
package
Bio::EnsEMBL::IdMapping::
TinyFeature
;
=head1 NAME
=head1 SYNOPSIS
=head1 DESCRIPTION
=head1 METHODS
=head1 LICENCE
This code is distributed under an Apache style licence. Please see
http://www.ensembl.org/info/about/code_licence.html for details.
=head1 AUTHOR
Patrick Meidl <meidl@ebi.ac.uk>, Ensembl core API team
=head1 CONTACT
Please post comments/questions to the Ensembl development list
<ensembl-dev@ebi.ac.uk>
=cut
use
strict
;
use
warnings
;
no
warnings
'
uninitialized
';
use
Bio::EnsEMBL::Utils::
Exception
qw(throw warning)
;
sub
new_fast
{
my
$class
=
shift
;
my
$array_ref
=
shift
;
return
bless
$array_ref
,
$class
;
}
sub
id
{
my
$self
=
shift
;
$self
->
[
1
]
=
shift
if
(
@
_
);
return
$self
->
[
1
];
}
sub
stable_id
{
my
$self
=
shift
;
$self
->
[
2
]
=
shift
if
(
@
_
);
return
$self
->
[
2
];
}
sub
add_Transcript
{
my
$self
=
shift
;
my
$tr
=
shift
;
unless
(
$self
->
[
0
]
eq
'
g
'
and
$tr
->
[
0
]
eq
'
tr
')
{
throw
('
You can only add transcripts to a gene.
');
}
push
@
{
$self
->
[
9
]
},
$tr
;
}
sub
get_all_Transcripts
{
my
$self
=
shift
;
throw
('
Only genes have transcripts.
')
unless
(
$self
->
[
0
]
eq
'
g
');
return
$self
->
[
9
]
||
[]
;
}
sub
add_Translation
{
my
$self
=
shift
;
my
$tl
=
shift
;
unless
(
$self
->
[
0
]
eq
'
tr
'
and
$tl
->
[
0
]
eq
'
tl
')
{
throw
('
You can only add a translation to a transcript.
');
}
$self
->
[
10
]
=
$tl
;
}
sub
add_Exon
{
my
$self
=
shift
;
my
$exon
=
shift
;
unless
(
$self
->
[
0
]
eq
'
tr
'
and
$exon
->
[
0
]
eq
'
e
')
{
throw
('
You can only add exons to a transcript.
');
}
push
@
{
$self
->
[
11
]
},
$exon
;
}
sub
get_all_Exons
{
my
$self
=
shift
;
throw
('
Only transcripts have exons.
')
unless
(
$self
->
[
0
]
eq
'
tr
');
return
$self
->
[
11
]
||
[]
;
}
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