[Biopython-dev] [Bug 2894] New: Jython List difference causes failed assertion in CondonTable Fix+Patch
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Sat Aug 1 20:46:38 UTC 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2894
Summary: Jython List difference causes failed assertion in
CondonTable Fix+Patch
Product: Biopython
Version: 1.51b
Platform: Other
OS/Version: Other
Status: NEW
Severity: enhancement
Priority: P2
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: kellrott at ucsd.edu
Different list behaviour in Jython causes assertion to fail because last to
elements on produced list are swapped. Haven't taken the time to figure out if
this caused by sloppy list usage or Jython list weirdness. At this point, will
assume that list order doesn't matter and simple expand the assertion to allow
both cases...
list_ambiguous_codons(['TGA', 'TAA', 'TAG'],IUPACData.ambiguous_dna_values)
Python : ['TGA', 'TAA', 'TAG', 'TAR', 'TRA']
Jython : ['TGA', 'TAA', 'TAG', 'TRA', 'TAR']
NOTE: Fixing this bug causes setup.py to fail (java.lang.ClassFormatError:
Invalid method Code length) because it exposes previously untested bugs
*** biopython-1.51b_orig/Bio/Data/CodonTable.py 2009-05-08 14:20:19.000000000
-0700
--- biopython-1.51b/Bio/Data/CodonTable.py 2009-08-01 13:30:46.000000000
-0700
***************
*** 615,621 ****
assert list_ambiguous_codons(['TAG', 'TGA'],IUPACData.ambiguous_dna_values)
== ['TAG', 'TGA']
assert list_ambiguous_codons(['TAG', 'TAA'],IUPACData.ambiguous_dna_values)
== ['TAG', 'TAA', 'TAR']
assert list_ambiguous_codons(['UAG', 'UAA'],IUPACData.ambiguous_rna_values)
== ['UAG', 'UAA', 'UAR']
! assert list_ambiguous_codons(['TGA', 'TAA',
'TAG'],IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TAR', 'TRA']
# Forward translation is "onto", that is, any given codon always maps
# to the same protein, or it doesn't map at all. Thus, I can build
--- 615,623 ----
assert list_ambiguous_codons(['TAG', 'TGA'],IUPACData.ambiguous_dna_values)
== ['TAG', 'TGA']
assert list_ambiguous_codons(['TAG', 'TAA'],IUPACData.ambiguous_dna_values)
== ['TAG', 'TAA', 'TAR']
assert list_ambiguous_codons(['UAG', 'UAA'],IUPACData.ambiguous_rna_values)
== ['UAG', 'UAA', 'UAR']
! #Jython BUG? For some order Jython swaps the order of the last two
elements...
! assert list_ambiguous_codons(['TGA', 'TAA',
'TAG'],IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TAR', 'TRA']
or\
! list_ambiguous_codons(['TGA', 'TAA',
'TAG'],IUPACData.ambiguous_dna_values) == ['TGA', 'TAA', 'TAG', 'TRA', 'TAR']
# Forward translation is "onto", that is, any given codon always maps
# to the same protein, or it doesn't map at all. Thus, I can build
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list