[Biopython-dev] [Bug 2892] New: Jython MatrixInfo.py fix+patch

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Jul 31 20:47:17 UTC 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2892

           Summary: Jython MatrixInfo.py 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
 BugsThisDependsOn: 2890,2891


Jython is limited to JVM method size limitations, overly large methods cause
JVM
exceptions (java.lang.ClassFormatError: Invalid method Code length ...). 
MatrixInfo creates several matrices in the base level of the module, and causes
that exception in Jython.  This can be fixed by putting each of the matrix
definitions in separate methods and then calling those methods to define the
variables.  

Attached is a patch the work in Jython2.5.0 and should have no affect on
CPython.

9c9,10
< available_matrices = ['benner6', 'benner22', 'benner74', 'blosum100',
---
> def gen_available_matrices():
> 	return [
22c23,24
< benner6 = {
---
> def gen_benner6():
> 	return {
78c80,81
< benner22 = {
---
> def gen_benner22():
> 	return {
134c137,138
< benner74 = {
---
> def gen_benner74():
> 	return {
190c194,195
< blosum100 = {
---
> def gen_blosum100():
> 	return {
262c267,268
< blosum30 = {
---
> def gen_blosum30():
> 	return {
334c340,341
< blosum35 = {
---
> def gen_blosum35():
> 	return {
406c413,414
< blosum40 = {
---
> def gen_blosum40():
> 	return {
478c486,487
< blosum45 = {
---
> def gen_blosum45():
> 	return {
550c559,560
< blosum50 = {
---
> def gen_blosum50():
> 	return {
622c632,633
< blosum55 = {
---
> def gen_blosum55():
> 	return {
694c705,706
< blosum60 = {
---
> def gen_blosum60():
> 	return {
766c778,779
< blosum62 = {
---
> def gen_blosum62():
> 	return {
838c851,852
< blosum65 = {
---
> def gen_blosum65():
> 	return {
910c924,925
< blosum70 = {
---
> def gen_blosum70():
> 	return {
982c997,998
< blosum75 = {
---
> def gen_blosum75():
> 	return {
1054c1070,1071
< blosum80 = {
---
> def gen_blosum80():
> 	return {
1126c1143,1144
< blosum85 = {
---
> def gen_blosum85():
> 	return {
1198c1216,1217
< blosum90 = {
---
> def gen_blosum90():
> 	return {
1270c1289,1290
< blosum95 = {
---
> def gen_blosum95():
> 	return {
1342c1362,1363
< feng = {
---
> def gen_feng():
> 	return {
1398c1419,1420
< fitch = {
---
> def gen_fitch():
> 	return {
1444c1466,1467
< genetic = {
---
> def gen_genetic():
> 	return {
1500c1523,1524
< gonnet = {
---
> def gen_gonnet():
> 	return {
1556c1580,1581
< grant = {
---
> def gen_grant():
> 	return {
1612c1637,1638
< ident = {
---
> def gen_ident():
> 	return {
1668c1694,1695
< johnson = {
---
> def gen_johnson():
> 	return {
1724c1751,1752
< levin = {
---
> def gen_levin():
> 	return {
1780c1808,1809
< mclach = {
---
> def gen_mclach():
> 	return {
1836c1865,1866
< miyata = {
---
> def gen_miyata():
> 	return {
1892c1922,1923
< nwsgappep = {
---
> def gen_nwsgappep():
> 	return {
1959c1990,1991
< pam120 = {
---
> def gen_pam120():
> 	return {
2031c2063,2064
< pam180 = {
---
> def gen_pam180():
> 	return {
2103c2136,2137
< pam250 = {
---
> def gen_pam250():
> 	return {
2175c2209,2210
< pam30 = {
---
> def gen_pam30():
> 	return {
2247c2282,2283
< pam300 = {
---
> def gen_pam300():
> 	return {
2319c2355,2356
< pam60 = {
---
> def gen_pam60():
> 	return {
2391c2428,2429
< pam90 = {
---
> def gen_pam90():
> 	return {
2458c2496,2497
< rao = {
---
> def gen_rao():
> 	return {
2514c2553,2554
< risler = {
---
> def gen_risler():
> 	return {
2570c2610,2611
< structure = {
---
> def gen_structure():
> 	return {
2624a2666,2707
> available_matrices = gen_available_matrices()
> benner6 = gen_benner6()
> benner22 = gen_benner22()
> benner74 = gen_benner74()
> blosum100 = gen_blosum100()
> blosum30 = gen_blosum30()
> blosum35 = gen_blosum35()
> blosum40 = gen_blosum40()
> blosum45 = gen_blosum45()
> blosum50 = gen_blosum50()
> blosum55 = gen_blosum55()
> blosum60 = gen_blosum60()
> blosum62 = gen_blosum62()
> blosum65 = gen_blosum65()
> blosum70 = gen_blosum70()
> blosum75 = gen_blosum75()
> blosum80 = gen_blosum80()
> blosum85 = gen_blosum85()
> blosum90 = gen_blosum90()
> blosum95 = gen_blosum95()
> feng = gen_feng()
> fitch = gen_fitch()
> genetic = gen_genetic()
> gonnet = gen_gonnet()
> grant = gen_grant()
> ident = gen_ident()
> johnson = gen_johnson()
> levin = gen_levin()
> mclach = gen_mclach()
> miyata = gen_miyata()
> nwsgappep = gen_nwsgappep()
> pam120 = gen_pam120()
> pam180 = gen_pam180()
> pam250 = gen_pam250()
> pam30 = gen_pam30()
> pam300 = gen_pam300()
> pam60 = gen_pam60()
> pam90 = gen_pam90()
> rao = gen_rao()
> risler = gen_risler()
> structure = gen_structure()
>


-- 
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