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
799274db
Commit
799274db
authored
21 years ago
by
Graham McVicker
Browse files
Options
Downloads
Patches
Plain Diff
moved reverse_comp function into its own utility module
parent
3c2b7d36
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/Utils/Sequence.pm
+70
-0
70 additions, 0 deletions
modules/Bio/EnsEMBL/Utils/Sequence.pm
with
70 additions
and
0 deletions
modules/Bio/EnsEMBL/Utils/Sequence.pm
0 → 100644
+
70
−
0
View file @
799274db
# EnsEMBL module for Bio::EnsEMBL::Utils::Sequence
#
#
=head1 NAME
Bio::EnsEMBL::Utils::Sequence - Utility functions for sequences
=head1 SYNOPSIS
use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp);
my $seq = 'ACTTTAAAGGCTATCCCAATATG';
print "my sequence = $seq\n";
reverse_comp(\$seq);
print "my reverse comp = $seq\n";
=head1 METHODS
=cut
use
strict
;
use
warnings
;
package
Bio::EnsEMBL::Utils::
Sequence
;
use
Exporter
;
use
vars
qw(@ISA @EXPORT_OK)
;
@ISA
=
qw(Exporter)
;
@EXPORT_OK
=
qw(&reverse_comp)
;
=head2 reverse_comp
Arg [1] : reference to a string $seqref
Example : use Bio::EnsEMBL::Utils::Sequence qw(reverse_comp);
$seq = 'ACCTGAA';
reverse_comp(\$seq);
print $seq;
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 : SequenceAdaptor, SliceAdaptor
=cut
sub
reverse_comp
{
my
$seqref
=
shift
;
$$seqref
=
reverse
(
$$seqref
);
$$seqref
=~
tr/acgtrymkswhbvdnxACGTRYMKSWHBVDNX/tgcayrkmswdvbhnxTGCAYRKMSWDVBHNX/
;
return
;
}
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