Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/24a058450d72
Дата изменения: Unknown
Дата индексирования: Mon Oct 1 23:51:41 2012
Кодировка:
allpy: 24a058450d72

allpy

changeset 353:24a058450d72

Fixed references to monomer code tables. (closes #17)
author Daniil Alexeyevsky <me.dendik@gmail.com>
date Fri, 21 Jan 2011 15:28:26 +0300
parents 3d650511614e
children 2ede0318ff95
files allpy/base.py allpy/dna.py allpy/protein.py allpy/rna.py
diffstat 4 files changed, 7 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/allpy/base.py	Fri Jan 21 15:28:00 2011 +0300
     1.2 +++ b/allpy/base.py	Fri Jan 21 15:28:26 2011 +0300
     1.3 @@ -2,7 +2,6 @@
     1.4  
     1.5  import util
     1.6  import fasta
     1.7 -import data.codes
     1.8  
     1.9  default_gaps = set((".", "-", "~"))
    1.10  """Set of characters to recoginze as gaps when parsing alignment."""
    1.11 @@ -45,7 +44,7 @@
    1.12          Monomer.by_name[name] = TheMonomer
    1.13  
    1.14      @classmethod
    1.15 -    def _initialize(cls, codes=data.codes.codes):
    1.16 +    def _initialize(cls, codes=None):
    1.17          """Create all relevant subclasses of Monomer."""
    1.18          # NB. The table uses letters d, r, p for types,
    1.19          # while we use full words; hence, we compare by first letter
     2.1 --- a/allpy/dna.py	Fri Jan 21 15:28:00 2011 +0300
     2.2 +++ b/allpy/dna.py	Fri Jan 21 15:28:26 2011 +0300
     2.3 @@ -1,4 +1,5 @@
     2.4  import base
     2.5 +import data.codes
     2.6  
     2.7  class Monomer(base.Monomer):
     2.8      """DNA monomers: nucleotides."""
     2.9 @@ -6,7 +7,7 @@
    2.10      by_code1 = {}
    2.11      by_code3 = {}
    2.12      by_name = {}
    2.13 -Monomer._initialize()
    2.14 +Monomer._initialize(data.codes.dna)
    2.15  
    2.16  class Sequence(base.Sequence):
    2.17      monomer_type = Monomer
     3.1 --- a/allpy/protein.py	Fri Jan 21 15:28:00 2011 +0300
     3.2 +++ b/allpy/protein.py	Fri Jan 21 15:28:26 2011 +0300
     3.3 @@ -1,4 +1,5 @@
     3.4  import base
     3.5 +import data.codes
     3.6  
     3.7  class Monomer(base.Monomer):
     3.8      """Protein monomers: aminoacids."""
     3.9 @@ -6,7 +7,7 @@
    3.10      by_code1 = {}
    3.11      by_code3 = {}
    3.12      by_name = {}
    3.13 -Monomer._initialize()
    3.14 +Monomer._initialize(data.codes.protein)
    3.15  
    3.16  class Protein(list):
    3.17      """User defined protein; list of protein_sequences."""
     4.1 --- a/allpy/rna.py	Fri Jan 21 15:28:00 2011 +0300
     4.2 +++ b/allpy/rna.py	Fri Jan 21 15:28:26 2011 +0300
     4.3 @@ -1,4 +1,5 @@
     4.4  import base
     4.5 +import data.codes
     4.6  
     4.7  class Monomer(base.Monomer):
     4.8      """RNA monomers: nucleotides."""
     4.9 @@ -6,7 +7,7 @@
    4.10      by_code1 = {}
    4.11      by_code3 = {}
    4.12      by_name = {}
    4.13 -Monomer._initialize()
    4.14 +Monomer._initialize(data.codes.rna)
    4.15  
    4.16  class Sequence(base.Sequence):
    4.17      monomer_type = Monomer