Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/raw-rev/6e2152b2f286
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 07:28:57 2012
Кодировка:

# HG changeset patch
# User boris (netbook)
# Date 1287752841 -14400
# Node ID 6e2152b2f286bd35d5a030b8fe89f3757dcfe496
# Parent 16cb30a3b387f3f9fd0821fdbc6d399b9be99b3a
broken: lib:Sequence new argument order in constructor
Sequence::from_fasta planned

diff -r 16cb30a3b387 -r 6e2152b2f286 lib/project.py
--- a/lib/project.py Thu Oct 21 01:00:18 2010 +0400
+++ b/lib/project.py Fri Oct 22 17:07:21 2010 +0400
@@ -129,9 +129,9 @@
else:
alignment_list.append(None)
if "description" in vars():#if there's no description
- sequences.append(sequence.Sequence(name,monomers,description))
+ sequences.append(sequence.Sequence(monomers,name,description))
else:
- sequences.append(sequence.Sequence(name,monomers))
+ sequences.append(sequence.Sequence(monomers,name))
alignment[sequences[-1]]=alignment_list
return sequences,alignment

diff -r 16cb30a3b387 -r 6e2152b2f286 lib/sequence.py
--- a/lib/sequence.py Thu Oct 21 01:00:18 2010 +0400
+++ b/lib/sequence.py Fri Oct 22 17:07:21 2010 +0400
@@ -1,5 +1,5 @@
#!/usr/bin/python
-import monomer
+from monomer import AminoAcidType
from Bio.PDB import PDBParser, CaPPBuilder
from Bio.Seq import Seq
from allpy_pdb import Pdb
@@ -12,12 +12,12 @@
* name -- str with the name of sequence
* description -- str with description of the sequence
* monomers -- list of monomer objects (aminoacids or nucleotides)
- * pdb_chain -- list of Bio.PDB.Chain's
+ * pdb_chains -- list of Bio.PDB.Chain's

TODO: class Protein: container of multiple Sequences,
class ProteinMononer: container of multiple Monomers
"""
- def __init__(self, name, monomers, description=""):
+ def __init__(self, monomers, name='', description=""):
self.name = name
self.description = description
self.monomers = monomers
@@ -47,6 +47,9 @@
print sequence
# FIXME: align and map

+ @staticmethod
+ def from_fasta(self, fasta_str, name='', description='', type=AminoAcidType):
+ seq = Sequence([])