[Biopython-dev] [Bug 2895] New: Bio.Restriction.Restriction_Dictionary Jython Error Fix+Patch

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Aug 2 02:46:47 UTC 2009


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

           Summary: Bio.Restriction.Restriction_Dictionary Jython Error
                    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: 2891,2892,2893,2894


Jython is limited to JVM method sizes, overly large methods cause JVM
exceptions (java.lang.ClassFormatError: Invalid method Code length ...). 

The Bio.Restriction.Restriction_Dictionary module defines to much data in the
base method, by breaking the defined dicts into pieces held in separate
methods, then merging them, the code will correctly compile in Jython.

Patch:

11,12c11,14
< rest_dict = \
< {'AarI': {'charac': (11, 8, None, None, 'CACCTGC'),
---
> 
> 
> def RestDict1():
>     return {'AarI': {'charac': (11, 8, None, None, 'CACCTGC'),
1503,1504c1505,1508
<             'suppl': ('I',)},
<  'BbvCI': {'charac': (2, -2, None, None, 'CCTCAGC'),
---
>             'suppl': ('I',)} }
> 
> def RestDict2():
> 	return { 'BbvCI': {'charac': (2, -2, None, None, 'CCTCAGC'),
3500c3504,3508
<             'suppl': ('X',)},
---
>             'suppl': ('X',)} }
> 
> 
> def RestDict3():
>     return {
4497c4505,4508
<             'suppl': ('I',)},
---
>             'suppl': ('I',)} }
> 
> def RestDict4():
>     return {
5494,5495c5505,5508
<             'suppl': ('E', 'G', 'I', 'M', 'N', 'V')},
<  'DrdI': {'charac': (7, -7, None, None, 'GACNNNNNNGTC'),
---
>             'suppl': ('E', 'G', 'I', 'M', 'N', 'V')} }
> 
> def RestDict5():
> 	return { 'DrdI': {'charac': (7, -7, None, None, 'GACNNNNNNGTC'),
6479c6492,6495
<             'suppl': ('N',)},
---
>             'suppl': ('N',)} }
> 
> def RestDict6():
>     return {
7194,7195c7210,7214
<                'suppl': ('N',)},
<  'Hpy8I': {'charac': (3, -3, None, None, 'GTNNAC'),
---
>                'suppl': ('N',)} }
> 
> 
> def RestDict7():
>     return { 'Hpy8I': {'charac': (3, -3, None, None, 'GTNNAC'),
8491c8510,8513
<               'suppl': ()},
---
>               'suppl': ()} }
> 
> def RestDict8():
>     return {
9608c9630,9634
<           'suppl': ('F',)},
---
>           'suppl': ('F',)} }
> 
> 
> def RestDict9():
>     return {
11992,11993c12018,12051
< suppliers = \
< {'A': ('Amersham Pharmacia Biotech',
---
> 
> 
> rest_dict = {}
> tmp = RestDict1()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict2()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict3()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict4()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict5()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict6()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict7()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict8()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> tmp = RestDict9()
> for a in tmp:
>     rest_dict[a] = tmp[a]
> 
> 
> def Suppliers():
> 	return {'A': ('Amersham Pharmacia Biotech',
13626,13627c13684,13692
< typedict = \
< {'type145': (('NonPalindromic',
---
> 
> 
> suppliers = Suppliers()
> 
> 
> 
> 
> def TypeDict():
> 	return {'type145': (('NonPalindromic',
14498a14564,14567
> 
> typedict = TypeDict()
> 
>


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