[Bioperl-l] One to three letter code for amino acids
Heikki Lehvaslaiho
heikki@ebi.ac.uk
Thu, 13 Dec 2001 10:19:13 +0000
Jason Stajich wrote:
>
> Somehow I really must have missed the discussion or let it slip out of
> my head... I had added the method 'valid_aa' to CodonTable a little while
> ago. Should it be relocated to SeqUtils?
I missed that. Yes, I think SeqUtils would be a better place for valid_aa().
> In addition, I want to do the following to allow us to centralize the
> places where we keep the aa/nt codes. Okay if I commit it?
Sure.
Centralization is good. Should we move all alphabet related hashes there? We
could take %onecode and %threecode out of Bio::SeqUtils and but keep the
public methods. Then %onecode could be removed from CodonTable, too.
-Heikki
> % cvs diff Bio/Tools/CodonTable.pm
> RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/CodonTable.pm,v
> retrieving revision 1.21
> diff -r1.21 CodonTable.pm
> 168a169
> > use Bio::Tools::IUPAC;
> 272,306c273,274
> < my %iupac_dna =
> < ( 'a' => [qw( a )],
> < 'c' => [qw( c )],
> < 'g' => [qw( g )],
> < 't' => [qw( t )],
> < 'u' => [qw( t )],
> < 'm' => [qw( a c )],
> < 'r' => [qw( a g )],
> < 'w' => [qw( a t )],
> < 'k' => [qw( g t )],
> < 'y' => [qw( c t )],
> < 's' => [qw( c g )],
> < 'v' => [qw( a c g )],
> < 'h' => [qw( a c t )],
> < 'd' => [qw( a g t )],
> < 'b' => [qw( c g t )],
> < 'n' => [qw( a c g t )],
> < 'x' => [qw( a c g t )],
> < );
> <
> < my %iupac_aa =
> < ( A => [qw(A)], B => [qw(D N)],
> < C => [qw(C)], D => [qw(D)],
> < E => [qw(E)], F => [qw(F)],
> < G => [qw(G)], H => [qw(H)],
> < I => [qw(I)], K => [qw(K)],
> < L => [qw(L)], M => [qw(M)],
> < N => [qw(N)], P => [qw(P)],
> < Q => [qw(Q)], R => [qw(R)],
> < S => [qw(S)], T => [qw(T)],
> < U => [qw(U)], V => [qw(V)],
> < W => [qw(W)], X => [qw(X)],
> < Y => [qw(Y)], Z => [qw(E Q)],
> < '*' => ['*']
> < );
> ---
> > my %iupac_dna = Bio::Tools::IUPAC->iupac_iub();
> > my %iupac_aa = Bio::Tools::IUPAC->iupac_iup();
>
> On Wed, 12 Dec 2001, Kris Boulez wrote:
>
> > Quoting Heikki Lehvaslaiho (heikki@ebi.ac.uk):
> > > Kris,
> > >
> > > I brought this up a year or so ago. The consensus then was that we should
> > > not overload current interfaces but instead collect these utility functions
> > > in a separate place. I've put several, including this one, into
> > > Bio::SeqUtils.
> > >
> > Sorry didn't look close enough.
> >
> > Kris,
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l@bioperl.org
> > http://bioperl.org/mailman/listinfo/bioperl-l
> >
>
> --
> Jason Stajich
> Duke University
> jason@cgt.mc.duke.edu
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki@ebi.ac.uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________