Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
522c6efb
Commit
522c6efb
authored
Feb 23, 2004
by
Graham McVicker
Browse files
moved reverse_comp method into Bio::EnsEMBL::Utils::Sequence module
parent
799274db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
26 deletions
+4
-26
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
+4
-26
No files found.
modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm
View file @
522c6efb
...
...
@@ -36,6 +36,7 @@ use strict;
use
Bio::EnsEMBL::DBSQL::
BaseAdaptor
;
use
Bio::EnsEMBL::Utils::
Exception
qw(throw deprecate)
;
use
Bio::EnsEMBL::Utils::
Sequence
qw(reverse_comp)
;
@ISA
=
qw(Bio::EnsEMBL::DBSQL::BaseAdaptor)
;
...
...
@@ -110,7 +111,7 @@ sub fetch_by_Slice_start_end_strand {
1
,
undef
,
1
)};
}
if
(
$strand
==
-
1
)
{
_
reverse_comp
(
\
$seq
);
reverse_comp
(
\
$seq
);
}
return
\
$seq
;
}
...
...
@@ -144,7 +145,7 @@ sub fetch_by_Slice_start_end_strand {
#reverse compliment on negatively oriented slices
if
(
$seq_slice
->
strand
==
-
1
)
{
_
reverse_comp
(
\
$tmp_seq
);
reverse_comp
(
\
$tmp_seq
);
}
$seq
.=
$tmp_seq
;
...
...
@@ -166,7 +167,7 @@ sub fetch_by_Slice_start_end_strand {
}
#if they asked for the negative slice strand revcomp the whole thing
_
reverse_comp
(
\
$seq
)
if
(
$strand
==
-
1
);
reverse_comp
(
\
$seq
)
if
(
$strand
==
-
1
);
return
\
$seq
;
}
...
...
@@ -230,29 +231,6 @@ sub store {
}
=head2 _reverse_comp
Arg [1] : reference to a string $seqref
Example : $self->_reverse_comp(\$seqref);
Description: Does an in place reverse compliment of a passed in string
reference. The string is passed by reference
rather than by value for memory efficiency.
Returntype : none
Exceptions : none
Caller : internal
=cut
sub
_reverse_comp
{
my
$seqref
=
shift
;
$$seqref
=
reverse
(
$$seqref
);
$$seqref
=~
tr/acgtrymkswhbvdnxACGTRYMKSWHBVDNX/tgcayrkmswdvbhnxTGCAYRKMSWDVBHNX/
;
return
undef
;
}
=head2 fetch_by_assembly_location
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment