Example #1
0
def _call_sequence_file(t):
    '''Call function for hadoop sequence files'''
    # TODO: check if all sequence files are gzipped
    data = default_api.ungzip_data(t[1])
    unpack = msgpack.unpackb(data.read(), raw=False)
    decoder = MmtfStructure(unpack)
    return (str(t[0]), decoder)
Example #2
0
def call_sequence_file_gzip(t):
    '''
    Call function for hadoop sequence files
    '''
    data = default_api.ungzip_data(t[1])
    unpack = msgpack.unpackb(data.read())
    decoder = mmtfStructure(unpack)
    return (str(t[0]), decoder)
Example #3
0
 def test_gzip_open(self):
     ungzip_data(open("mmtf/tests/testdatastore/4CUP.mmtf.gz", "rb").read())
Example #4
0
 def test_gzip_open(self):
     with open("mmtf/tests/testdatastore/4CUP.mmtf.gz","rb") as fh:
         ungzip_data(fh.read())
Example #5
0
 def test_gzip_open(self):
     ungzip_data(open("mmtf/tests/testdatastore/4CUP.mmtf.gz","rb").read())