Skip to content

Commit

Permalink
Adding deepcopy patch back in. See bug #2380.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoon committed Jun 29, 2008
1 parent 56eb84b commit 22853c1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Bio/Nexus/Nexus.py
Expand Up @@ -666,17 +666,17 @@ def _format(self,options):
if options.has_key('datatype'):
self.datatype=options['datatype'].lower()
if self.datatype=='dna' or self.datatype=='nucleotide':
self.alphabet=IUPAC.ambiguous_dna
self.ambiguous_values=IUPACData.ambiguous_dna_values
self.unambiguous_letters=IUPACData.unambiguous_dna_letters
self.alphabet=copy.deepcopy(IUPAC.ambiguous_dna)
self.ambiguous_values=copy.deepcopy(IUPACData.ambiguous_dna_values)
self.unambiguous_letters=copy.deepcopy(IUPACData.unambiguous_dna_letters)
elif self.datatype=='rna':
self.alphabet=IUPAC.ambiguous_rna
self.ambiguous_values=IUPACData.ambiguous_rna_values
self.unambiguous_letters=IUPACData.unambiguous_rna_letters
self.alphabet=copy.deepcopy(IUPAC.ambiguous_rna)
self.ambiguous_values=copy.deepcopy(IUPACData.ambiguous_rna_values)
self.unambiguous_letters=copy.deepcopy(IUPACData.unambiguous_rna_letters)
elif self.datatype=='protein':
self.alphabet=IUPAC.protein
self.ambiguous_values={'B':'DN','Z':'EQ','X':IUPACData.protein_letters} # that's how PAUP handles it
self.unambiguous_letters=IUPACData.protein_letters+'*' # stop-codon
self.alphabet=copy.deepcopy(IUPAC.protein)
self.ambiguous_values={'B':'DN','Z':'EQ','X':copy.deepcopy(IUPACData.protein_letters)} # that's how PAUP handles it
self.unambiguous_letters=copy.deepcopy(IUPACData.protein_letters)+'*' # stop-codon
elif self.datatype=='standard':
raise NexusError('Datatype standard is not yet supported.')
#self.alphabet=None
Expand Down

0 comments on commit 22853c1

Please sign in to comment.