~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to Bio/Symbol/ProteinAlphabet.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: ProteinAlphabet.pm,v 1.7.2.1 2006/10/02 23:10:31 sendu Exp $
 
1
# $Id: ProteinAlphabet.pm 11480 2007-06-14 14:16:21Z sendu $
2
2
#
3
3
# BioPerl module for Bio::Symbol::ProteinAlphabet
4
4
#
17
17
=head1 SYNOPSIS
18
18
 
19
19
    use Bio::Symbol::ProteinAlphabet;
20
 
    my $alpha = new Bio::Symbol::ProteinAlphabet();
 
20
    my $alpha = Bio::Symbol::ProteinAlphabet->new();
21
21
    foreach my $symbol ( $alpha->symbols ) {
22
22
        print "symbol is $symbol\n";
23
23
    }
72
72
=head2 new
73
73
 
74
74
 Title   : new
75
 
 Usage   : my $obj = new Bio::Symbol::ProteinAlphabet();
 
75
 Usage   : my $obj = Bio::Symbol::ProteinAlphabet->new();
76
76
 Function: Builds a new Bio::Symbol::ProteinAlphabet object 
77
77
 Returns : Bio::Symbol::ProteinAlphabet
78
78
 Args    :
90
90
  
91
91
  foreach my $let ( keys %codes  ) {  
92
92
      if( scalar @{$codes{$let}} != 1) { push @left, $let; next; }
93
 
      $symbols{$let} = new Bio::Symbol::Symbol(-name => $aa{$let},
 
93
      $symbols{$let} = Bio::Symbol::Symbol->new(-name => $aa{$let},
94
94
                                               -token => $let);      
95
95
  }
96
96
  foreach my $l ( @left ) {
98
98
      foreach my $sym ( @{$codes{$l}} ) {
99
99
          push @subsym, $symbols{$sym};
100
100
      }
101
 
      my $alpha = new Bio::Symbol::Alphabet(-symbols => \@subsym);
102
 
      $symbols{$l} = new Bio::Symbol::Symbol(-name => $aa{$l},
 
101
      my $alpha = Bio::Symbol::Alphabet->new(-symbols => \@subsym);
 
102
      $symbols{$l} = Bio::Symbol::Symbol->new(-name => $aa{$l},
103
103
                                               -token => $l,
104
104
                                               -matches => $alpha,
105
105
                                               -symbols => \@subsym);