NAME
Bio::Tools::IUPAC - Generates unique sequence objects or regular expressions from an ambiguous IUPAC sequence
SYNOPSIS
use Bio::PrimarySeq;use Bio::Tools::IUPAC;# Get the IUPAC code for proteinsmy %iupac_prot = Bio::Tools::IUPAC->new->iupac_iup;# Create a sequence with degenerate residuesmy $ambiseq = Bio::PrimarySeq->new(-seq => 'ARTCGUTGN', -alphabet => 'dna');# Create all possible non-degenerate sequencesmy $iupac = Bio::Tools::IUPAC->new(-seq => $ambiseq);while ($uniqueseq = $iupac->next_seq()) {# process the unique Bio::Seq object.}# Get a regular expression that matches all possible sequencesmy $regexp = $iupac->regexp();
DESCRIPTION
Bio::Tools::IUPAC is a tool that manipulates sequences with ambiguous residues following the IUPAC conventions. Non-standard characters have the meaning described below:
IUPAC-IUB SYMBOLS FOR NUCLEOTIDE (DNA OR RNA) NOMENCLATURE:Cornish-Bowden (1985) Nucl. Acids Res. 13: 3021-3030---------------------------------------------------------------Symbol Meaning Nucleic Acid---------------------------------------------------------------A A AdenineC C CytosineG G GuanineT T ThymineU U UracilM A or C aMinoR A or G puRineW A or T WeakS C or G StrongY C or T pYrimidineK G or T KetoV A or C or G not T (closest unused char after T)H A or C or T not G (closest unused char after G)D A or G or T not C (closest unused char after C)B C or G or T not A (closest unused char after A)X G or A or T or C Unknown (very rarely used)N G or A or T or C Unknown (commonly used)IUPAC-IUP AMINO ACID SYMBOLS:Biochem J. 1984 Apr 15; 219(2): 345-373Eur J Biochem. 1993 Apr 1; 213(1): 2------------------------------------------Symbol Meaning------------------------------------------A AlanineB Aspartic Acid, AsparagineC CysteineD Aspartic AcidE Glutamic AcidF PhenylalanineG GlycineH HistidineI IsoleucineJ Isoleucine/LeucineK LysineL LeucineM MethionineN AsparagineO PyrrolysineP ProlineQ GlutamineR ArginineS SerineT ThreonineU SelenocysteineV ValineW TryptophanX UnknownY TyrosineZ Glutamic Acid, Glutamine* Terminator
There are a few things Bio::Tools::IUPAC can do for you:
- •
-
report the IUPAC mapping between ambiguous and non-ambiguous residues
- •
-
produce a stream of all possible corresponding unambiguous Bio::Seq objects given an ambiguous sequence object
- •
-
convert an ambiguous sequence object to a corresponding regular expression
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Aaron Mackey
Email amackey-at-virginia.edu
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : Bio::Tools::IUPAC->new($seq);Function: Create a new IUPAC object, which acts as a sequence stream (akin toSeqIO)Args : an ambiguously coded sequence object that has a specified 'alphabet'Returns : a Bio::Tools::IUPAC object.
next_seq
Title : next_seqUsage : $iupac->next_seq();Function: returns the next unique sequence objectArgs : none.Returns : a Bio::Seq object
iupac
Title : iupacUsage : my %symbols = $iupac->iupac;Function: Returns a hash of symbols -> symbol components of the right typefor the given sequence, i.e. it is the same as iupac_iup() ifBio::Tools::IUPAC was given a proteic sequence, or iupac_iub() if thesequence was nucleic. For example, the key 'M' has the value ['A', 'C'].Args : noneReturns : Hash
iupac_amb
Title : iupac_ambUsage : my %symbols = $iupac->iupac_amb;Function: Same as iupac() but only contains a mapping between ambiguous residuesand the ambiguous residues they map to. For example, the key 'N' hasthe value ['R', 'Y', 'K', 'M', 'S', 'W', 'B', 'D', 'H', 'V', 'N'],i.e. it matches all other ambiguous residues.Args : noneReturns : Hash
iupac_iup
Title : iupac_iupUsage : my %aasymbols = $iupac->iupac_iup;Function: Returns a hash of PROTEIN symbols -> non-ambiguous symbol componentsArgs : noneReturns : Hash
iupac_iup_amb
Title : iupac_iup_ambUsage : my %aasymbols = $iupac->iupac_iup_amb;Function: Returns a hash of PROTEIN symbols -> ambiguous symbol componentsArgs : noneReturns : Hash
iupac_iub
Title : iupac_iubUsage : my %dnasymbols = $iupac->iupac_iub;Function: Returns a hash of DNA symbols -> non-ambiguous symbol componentsArgs : noneReturns : Hash
iupac_iub_amb
Title : iupac_iub_ambUsage : my %dnasymbols = $iupac->iupac_iub;Function: Returns a hash of DNA symbols -> ambiguous symbol componentsArgs : noneReturns : Hash
iupac_rev_iub
Title : iupac_rev_iubUsage : my %dnasymbols = $iupac->iupac_rev_iub;Function: Returns a hash of nucleotide combinations -> IUPAC code(a reverse of the iupac_iub hash).Args : noneReturns : Hash
count
Title : countUsage : my $total = $iupac->count();Function: Calculates the number of unique, unambiguous sequences thatthis ambiguous sequence could generateArgs : noneReturn : int
regexp
Title : regexpUsage : my $re = $iupac->regexp();Function: Converts the ambiguous sequence into a regular expression thatmatches all of the corresponding ambiguous and non-ambiguous sequences.You can further manipulate the resulting regular expression with theBio::Tools::SeqPattern module. After you are done building yourregular expression, you might want to compile it and make it case-insensitive:$re = qr/$re/i;Args : 1 to match RNA: T and U characters will match interchangeablyReturn : regular expression