[Bioperl-l] Question concerning IUPAC.pm

Aaron Mackey amackey at virginia.edu
Thu Sep 17 10:52:31 UTC 2009


Dear Armin,

Please ask such questions on the BioPerl mailing list.

The Bio::Tools::IUPAC module does the opposite of what you want -- it takes
a sequence containing ambiguous codes (e.g. "Y") and generates all possible
combinations of unambiguous sequences (thus one sequence containing a "C"
instead of "Y", and a second sequence containing a "T" instead of "Y").

However, you can do this:

  my %lookup = Bio::Tools::IUPAC->iupac_rev_iub();

%lookup will now contain the following Perl hash:

A => 'A',
T => 'T',
 C => 'C',
G => 'G',
 AC => 'M',
AG => 'R',
 AT => 'W',
CG => 'S',
 CT => 'Y',
'GT' => 'K',
 ACG => 'V',
ACT => 'H',
 AGT => 'D',
CGT => 'B',
 ACGT=> 'N',
N => 'N'

-Aaron


On Thu, Sep 17, 2009 at 5:39 AM, Armin Schmitt <
armin.schmitt at agrar.hu-berlin.de> wrote:
>
> Dear Aaron,
>
> can I use your module IUPAC.pm to create
> ambiguity symbols?
>
> I.e. Input C,T -> output Y
>
> If yes, how can I do this? A little piece
> of code would be helpful. Otherwise,
> is there another perl module for this
> purpose?
>
> Thank you very much
>
> Armin Schmitt
>
>
> --
> Dr. Armin Schmitt
> Humboldt-Universität zu Berlin
> Department for Crop and Animal Sciences
> Invalidenstraße 42
> 10115 Berlin
> Tel.:   +49-30-2093-9074
> Fax:    +49-30-2093-6397
> E-mail: armin.schmitt at agrar.hu-berlin.de
>
>




More information about the Bioperl-l mailing list