mmtfPyspark.utils.mmtfDecoder module

mmtfDecoder.py

Provides efficient methods to decode mmtf structures

convert_entity(input_entity)[source]

Convert an individual entity from byte strings to regular strings

Parameters:

input_entity : list

entities to decode

Returns:

dict

decoded entity

convert_group(input_group)[source]

Convert an individual group from byte strings to regula strings.

Parameters:

input_group : list

the list of input groups

Returns:

dict

decode_entity_list(input_data)[source]

Convert byte strings to strings in the entity list.

Parameters:

input_data : list

the list of entities

Returns:

list

decoded entity list

decode_group_list(input_data)[source]

Convert byte strings to strings in the group map.

Parameters:

input_data : list

the list of groups

Returns:

list

decoded group list

recursive_index_decode(int_array, decode_num=1000)[source]

Unpack an array of integers using recursive indexing.

Parameters:

int_array : list

the input array of integers

decode_num : int

the number used for decoding [1000]

Returns:

numpy.array

return the numpy.array of integers after recursive index decoding

run_length_decoder_numpy(in_array)[source]

Decodes a run length encoded array

Parameters:

in_array : list

the input list to apply run length decoder on