3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
39 my $seq =
'ACTTTAAAGGCTATCCCAATATG';
41 print
"my sequence = $seq\n";
43 reverse_comp( \$seq );
45 print
"my reverse comp = $seq\n";
47 my $compressed_seq =
'(AC)3';
49 print
"my expanded seq is = expand($compressed_seq)";
56 package Bio::EnsEMBL::Utils::Sequence;
63 use vars qw(@ISA @EXPORT_OK);
67 @EXPORT_OK = qw(&reverse_comp &expand);
72 Arg [1] : reference to a
string $seqref
79 Description: Does an in place reverse compliment of a passed in
string
80 reference. The
string is passed by reference
81 rather than by value
for memory efficiency.
84 Caller : SequenceAdaptor, SliceAdaptor
91 $$seqref = reverse( $$seqref );
93 tr/acgtrymkswhbvdnxACGTRYMKSWHBVDNX/tgcayrkmswdvbhnxTGCAYRKMSWDVBHNX/;
100 Arg [1] : reference to a
string $seqref
108 Description: Expands a genomic sequence. The
string is passed by reference
109 rather than by value
for memory efficiency.
112 Caller : SequenceAdaptor, SliceAdaptor
118 $$seq_ref =~ s/(\w*)\((\w+)\)(\d+)/$1.$2 x $3/eg
if ($$seq_ref =~ /\(/);#expressions with parenthesis, expand the alleles