omicsdata.npz package

Submodules

omicsdata.npz.archive module

class omicsdata.npz.archive.Archive(fn)[source]

Bases: object

This is a derivative of the ‘resultserializer’ file format that’s compatible with the visualization tools provides by Pairtree. This class is used to compress numpy data into an npz file type

add(name, data)[source]

Adds key, value pair to the archive

Parameters:
  • name (str) – The key to store the data under in the archive

  • data (object) – The data to store in the archive (np.ndarray, list, np.int32, etc.)

Return type:

None

get(name)[source]

Gets the value associated with a particular key in the archive

Parameters:

name (str) – A key to extract from the archive

Returns:

the data associated with the name input

Return type:

object

get_mutrel(_)[source]

This is an empty function for compatibility

has(name)[source]

Checks if the archive has a particular key value

Parameters:

name (str) – The key to check for in the archive

Returns:

Returns True is the key exists in the archive, false otherwise

Return type:

bool

save()[source]

Saves all of the elements in the ‘to_add’ dictionary without overwriting any existing information

Module contents