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
ae99a40d
Commit
ae99a40d
authored
22 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up RepeatFeature
parent
ba81c423
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/RepeatFeature.pm
+165
-48
165 additions, 48 deletions
modules/Bio/EnsEMBL/RepeatFeature.pm
with
165 additions
and
48 deletions
modules/Bio/EnsEMBL/RepeatFeature.pm
+
165
−
48
View file @
ae99a40d
...
...
@@ -5,62 +5,95 @@ package Bio::EnsEMBL::RepeatFeature;
use
strict
;
use
Bio::EnsEMBL::
SeqFeature
;
use
Bio::
LocationI
;
use
vars
'
@ISA
';
@ISA
=
qw{ Bio::EnsEMBL::SeqFeature
Bio::LocationI
}
;
@ISA
=
qw{ Bio::EnsEMBL::SeqFeature }
;
#ultra fast hacky constructor for rapid feature creation
=head2 new_fast
Arg [1] : hash reference $hashref
Example : none
Description: This is an ultra fast constructor which requires knowledge of
the objects internals to be used. It is only used by
RepeatFeatureAdaptors (when thousands of repeats need to be
quickly created). The SeqFeature superclass constructor 'new'
should be used in most instances.
Returntype : Bio::EnsEMBL::RepeatFeature
Exceptions : none
Caller : RepeatFeatureAdaptors
=cut
sub
new_fast
{
my
(
$class
,
$hashref
)
=
@_
;
return
bless
$hashref
,
$class
;
}
sub
repeat_consensus_id
{
my
(
$self
,
$repeat_consensus_id
)
=
@_
;
if
(
$repeat_consensus_id
)
{
$self
->
{'
_repeat_consensus_id
'}
=
$repeat_consensus_id
;
}
return
$self
->
{'
_repeat_consensus_id
'};
}
=head2 adaptor
Arg [1] : (optional) Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor $adaptor
Example : $adaptor = $repeat->adaptor;
Description: The adaptor which performs database requests for this object.
This should be set when the object is stored in the database or
retrieved from the database.
Returntype : Bio::EnsEMBL::DBSQL::RepeatFeatureAdaptor
Exceptions : none
Caller : general
=cut
sub
adaptor
{
my
(
$self
,
$adaptor
)
=
@_
;
if
(
defined
$adaptor
)
{
$self
->
{'
_adaptor
'}
=
$adaptor
;
}
return
$self
->
{'
_adaptor
'};
}
=head2 repeat_consensus
Arg [1] : (optional) Bio::EnsEMBL::RepeatConsensus
Example : $repeat_consensus = $repeat->repeat_consensus;
Description: Getter/Setter for the repeat consensus of this repeat
Returntype : Bio::EnsEMBL::RepeatConsensus
Exceptions : none
Caller : general
=cut
sub
repeat_consensus
{
my
(
$self
,
$con
)
=
@_
;
my
(
$self
,
$con
)
=
@_
;
if
(
defined
$con
)
{
$self
->
throw
("
$con
is not a RepeatConsensus
")
unless
$con
->
isa
("
Bio::EnsEMBL::RepeatConsensus
");
$self
->
{'
_repeat_consensus
'}
=
$con
;
}
return
$self
->
{'
_repeat_consensus
'};
if
(
defined
$con
)
{
$self
->
throw
("
$con
is not a RepeatConsensus
")
unless
$con
->
isa
("
Bio::EnsEMBL::RepeatConsensus
");
$self
->
{'
_repeat_consensus
'}
=
$con
;
}
return
$self
->
{'
_repeat_consensus
'};
}
sub
get_RepeatConsensus
{
my
(
$self
)
=
@_
;
my
$rc_id
=
$self
->
repeat_consensus_id
;
return
$self
->
adaptor
->
db
->
get_RepeatConsensusAdaptor
->
fetch_by_dbID
(
$rc_id
);
}
=head2 dbID
Arg [1] : (optional) $db_id
Example : $dbID = $repeat->dbID
Description: getter/setter for this objects internal database identifier
Returntype : int
Exceptions : none
Caller : general
=cut
sub
dbID
{
my
(
$self
,
$db_id
)
=
@_
;
...
...
@@ -70,6 +103,19 @@ sub dbID {
return
$self
->
{'
_db_id
'};
}
=head2 analysis
Arg [1] : (optional) Bio::EnsEMBL::Analysis
Example : $analysis = $repeat_feat->analysis;
Description: Getter/Setter for the analysis that was used to generate this
object
Returntype : Bio::EnsEMBL::Analysis
Exceptions : none
Caller : general
=cut
sub
analysis
{
my
(
$self
,
$analysis
)
=
@_
;
...
...
@@ -79,21 +125,18 @@ sub analysis {
return
$self
->
{'
_analysis
'};
}
sub
validate
{
}
=head2 hstart
# Should these return anything?
sub
phase
{
return
-
1
}
sub
end_phase
{
return
-
1
}
sub
hphase
{
return
-
1
}
sub
hend_phase
{
return
-
1
}
sub
percent_id
{
return
100
}
sub
hpercent_id
{
return
100
}
sub
e_value
{
return
0
}
sub
p_value
{
return
0
}
sub
hp_value
{
return
0
}
Arg [1] : (optional) int $hstart
Example : $hit_start = $repeat->hstart;
Description: Getter/Setter for the start bp of this repeat match on the
consensus sequence.
Returntype : int
Exceptions : none
Caller : general
=cut
sub
hstart
{
my
(
$self
,
$hstart
)
=
@_
;
...
...
@@ -104,6 +147,20 @@ sub hstart {
return
$self
->
{'
_hstart
'};
}
=head2 hend
Arg [1] : (optional) int $hend
Example : $hit_end = $repeat->hend;
Description: Getter/Setter for the end bp of this repeat match on the
consensus sequence.
Returntype : int
Exceptions : none
Caller : general
=cut
sub
hend
{
my
(
$self
,
$hend
)
=
@_
;
...
...
@@ -113,17 +170,24 @@ sub hend {
return
$self
->
{'
_hend
'};
}
sub
hstrand
{
return
1
}
sub
location_type
{
return
'
EXACT
'
}
sub
min_start
{
return
};
sub
min_end
{
return
};
sub
max_start
{
return
};
sub
max_end
{
return
};
=head2 hstrand
Arg [1] : none
Example : none
Description: always returns 1. method exists for consistancy with other
features.
Returntype : int
Exceptions : none
Caller :
=cut
sub
hstrand
{
return
1
;
}
sub
start_pos_type
{
return
'
EXACT
'
}
sub
end_pos_type
{
return
'
EXACT
'
}
sub
to_FTString
{
my
(
$self
)
=
@_
;
...
...
@@ -141,6 +205,59 @@ sub to_FTString {
=head2 repeat_consensus_id
Arg [1] : none
Example : none
Description: DEPRECATED use repeat_consensus->dbID instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub
repeat_consensus_id
{
my
(
$self
,
$repeat_consensus_id
)
=
@_
;
my
(
$f
,
$p
,
$l
)
=
caller
;
$self
->
warn
("
repeat_consensus_id is deprecated, use repeat_consensus
"
.
"
instead. caller =
$f
,
$p
,
$l
");
if
(
$repeat_consensus_id
)
{
$self
->
{'
_repeat_consensus_id
'}
=
$repeat_consensus_id
;
}
return
$self
->
{'
_repeat_consensus_id
'};
}
=head2 get_RepeatConsensus
Arg [1] : none
Example : none
Description: DEPRECATED use repeat_consensus instead
Returntype : none
Exceptions : none
Caller : none
=cut
sub
get_RepeatConsensus
{
my
(
$self
)
=
@_
;
my
(
$f
,
$p
,
$l
)
=
caller
;
$self
->
warn
("
get_RepeatConsensus is deprecated, use repeat_consensus
"
.
"
instead. caller =
$f
,
$p
,
$l
");
my
$rc_id
=
$self
->
repeat_consensus_id
;
return
$self
->
adaptor
->
db
->
get_RepeatConsensusAdaptor
->
fetch_by_dbID
(
$rc_id
);
}
1
;
__END__
...
...
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