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
de3ef6d2
Commit
de3ef6d2
authored
25 years ago
by
Tony Cox
Browse files
Options
Downloads
Patches
Plain Diff
implemented the $vc->extend(n,n) method
parent
4f00c022
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/DB/VirtualContig.pm
+45
-3
45 additions, 3 deletions
modules/Bio/EnsEMBL/DB/VirtualContig.pm
with
45 additions
and
3 deletions
modules/Bio/EnsEMBL/DB/VirtualContig.pm
+
45
−
3
View file @
de3ef6d2
...
...
@@ -147,9 +147,50 @@ sub _initialize {
These functions are to implement the ContigI interface
=head2 extend
Title : extend
Usage : $new_vc = $vc->extend(100,100);
Function: Make a new vc by entending an existing one
Example :
Returns : Bio::EnsEMBL::DB::VirtualContig
Args :
=cut
sub
extend
{
my
(
$self
,
$left
,
$right
)
=
@_
;
if
(
!
ref
$self
||
!
$self
->
isa
('
Bio::EnsEMBL::DB::VirtualContigI
')
)
{
$self
->
throw
("
Can only extend a VirtualContigI, Bailing out...
");
}
if
(
!
defined
$left
||
!
defined
$right
){
$self
->
throw
("
Must supply a left and right value when extending a VirtualContig
");
}
my
$current_left
=
$self
->
_left_size
;
my
$current_right
=
$self
->
_right_size
;
my
$current_ori
=
$self
->
_focus_orientation
;
my
$current_focuscontig
=
$self
->
_focus_contig
;
my
$current_focusposition
=
$self
->
_focus_position
;
my
$nvc
=
Bio::EnsEMBL::DB::
VirtualContig
->
new
(
-
focuscontig
=>
$current_focuscontig
,
-
focusposition
=>
$current_focusposition
,
-
ori
=>
$current_ori
,
-
left
=>
$current_left
+
$left
,
-
right
=>
$current_right
+
$right
,
);
return
$nvc
;
}
=head2 primary_seq
Title : seq
Title :
primary_
seq
Usage : $seq = $contig->primary_seq();
Function: Gets a Bio::PrimarySeqI object out from the contig
Example :
...
...
@@ -420,7 +461,8 @@ sub get_all_Genes{
sub
length
{
my
(
$self
,
@args
)
=
@_
;
return
$self
->
_left_size
+
$self
->
_right_size
+
1
;
#return $self->_left_size + $self->_right_size +1;
return
$self
->
_left_size
+
$self
->
_right_size
;
}
...
...
@@ -635,7 +677,7 @@ sub _build_contig_map{
my
$total
=
$left
+
$right
;
print
STDERR
"
leftmost contig is
",
$current_contig
->
id
,"
with
$total
to account for, gone
$current_left_size
of
$left
\n
";
print
STDERR
"
leftmost contig is
",
$current_contig
->
id
,"
with
$total
to account for, gone
$current_left_size
of
$left
\n
";
$self
->
{'
leftmostcontig_id
'}
=
$current_contig
->
id
;
# the first contig will need to be trimmed at a certain point
...
...
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