CoCalc Public Filesresearch / biomath / polytope_plots / other.sagewsOpen with one click!
Author: Fidel Barrera-Cruz
Views : 46
Compute Environment: Ubuntu 18.04 (Deprecated)
sys.path.insert(0, '/projects/eed1ae93-d17f-4057-942e-19f043f5e6c1/research/biomath/polytope_plots') from rna_poly import RNAPolytope import __main__ __main__.RNAPolytope = RNAPolytope
%time P=loads(open('/projects/eed1ae93-d17f-4057-942e-19f043f5e6c1/research/biomath/polytope_plots/o.nivara_tRNA.sobj').read(),True)
CPU time: 3.80 s, Wall time: 3.84 s
%attach other.sage
%attach main.sage
load('rna_poly.py') P=loads(open('o.nivara_tRNA.sobj').read(),True) #P=RNAPolytope.construct_from_file('o.nivara_tRNA.sobj')
Error in lines 2-2 Traceback (most recent call last): File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 968, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "sage/structure/sage_object.pyx", line 1382, in sage.structure.sage_object.loads (/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:13636) return unpickler.load() File "sage/structure/sage_object.pyx", line 1325, in sage.structure.sage_object.unpickle_global (/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:12920) return getattr(mod, name) AttributeError: 'module' object has no attribute 'RNAPolytope'
RNAPolytope.construct_from_file('o.nivara_tRNA.sobj')
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 968, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "rna_poly.py", line 125, in construct_from_file thepoly = load(filebase) # Attempt to load the polytope from a pickle file File "sage/structure/sage_object.pyx", line 1006, in sage.structure.sage_object.load (/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:11405) X = loads(open(filename).read(), compress=compress) File "sage/structure/sage_object.pyx", line 1382, in sage.structure.sage_object.loads (/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:13636) return unpickler.load() File "sage/structure/sage_object.pyx", line 1325, in sage.structure.sage_object.unpickle_global (/projects/sage/sage-7.3/src/build/cythonized/sage/structure/sage_object.c:12920) return getattr(mod, name) AttributeError: 'module' object has no attribute 'RNAPolytope'
rna_poly.RNAPolytope
import zlib as comp import cPickle from cStringIO import StringIO S=open('o.nivara_tRNA.sobj').read() len(S) s=comp.decompress(S) len(s) unpickler = cPickle.Unpickler(StringIO(s)) P=unpickler.load()
2908285 12554817
Error in lines 9-9 Traceback (most recent call last): File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 968, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> AttributeError: 'module' object has no attribute 'RNAPolytope'